Message Boards Message Boards

0
|
6640 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

ToNumericalRegion does not work with rounded rectangle?

Posted 8 years ago
In[113]:= a = Rectangle[{0, 0}, {1, 1}, RoundingRadius -> 0.5];

In[114]:= ToNumericalRegion[a]

Out[114]= NumericalRegion[None, {{0., 1.}, {0., 1.}}]

The bug appears only with Rounding and only if I do not combine this rectangle with other shapes,e.g. by RegionUnion If I combine with other shapes, there is no nasty bug, but rounding does not appear if I make a mesh region out of it.

2 Replies

As a partial workaround we may rasterize the rectangle and then take the ImageMesh:

ImageMesh@
 Rasterize[Graphics[Rectangle[{0, 0}, {1, 1}, RoundingRadius -> 0.1]],
   RasterSize -> 150]
POSTED BY: Gianluca Gorni

you should report bugs to Wolfram Support:

http://support.wolfram.com/kb/12507

POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract