1
$\begingroup$

I unified several regions in order to create a simple word :

text = RegionUnion[
Rectangle[{10, 10}, {11, 15}],
Rectangle[{13, 10}, {14, 12}],
Parallelogram[{13, 12}, {{1, 0}, {-1, 3}}],
Parallelogram[{13, 12}, {{1, 0}, {1, 3}}],
Disk[{17, 13.5}, 1.5, {-\[Pi]/2, \[Pi]/2}],
Rectangle[{16, 10}, {17, 15}],
Rectangle[{21, 10}, {22, 14}],
Rectangle[{20, 14}, {23, 15}]];
RegionPlot[text]

This works perfectly fine and produces desired result.

However, I now need to obtain a rectangle with the "text" region cut out.

dif = RegionDifference[Rectangle[{0, 0}, {29, 21}], text];
RegionPlot[dif]

The problem is that for some reason this computation never ends.

P.S Actually if the rectangle in

dif = RegionDifference[Rectangle[{0, 0}, {29, 21}], text];

has greater dimension, such as {0,0},{30,30} the RegionPlot works fine.

$\endgroup$
  • $\begingroup$ Please do not use the bugs tag for your question until other people have confirmed your observations. $\endgroup$ – J. M. is away Jun 7 '16 at 19:19
  • $\begingroup$ I see the same effect in version 10.4.1.0 - I cannot see anything unreasonable in what you are doing. It looks like a bug to me. $\endgroup$ – mikado Jun 7 '16 at 21:03
  • $\begingroup$ same here, 10.1 (The larger region is no help). DiscretizeRegion[dif] does return a reasonable result after a very long time. $\endgroup$ – george2079 Jun 7 '16 at 22:05
1
$\begingroup$

This problem is (at least partially) fixed in version 11: the computation takes less than 3 seconds on my machine with versions 11.1.0 and 11.0.1.

With version 10.4.1 the computation takes 255 seconds on my machine running Windows 7 x64.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.