incompatibility with command boundary
when I call the command boundary in AutoCAD and when there are islands inside the boundary, AutoCAD reliably first creates the outer boundary and then the islands. Some applications rely on this order, i.e. when area calculations need to subtract the areas of the islands from the area of the outer boundary.
Unfortunately in BricsCAD I found this to be just the other way: boundary seems to create the islands first and then the outer boundary. As long as I could rely on that behaviour, I could use a different code for calculating the area in BricsCAD than I am using in AutoCAD. But can I rely on that reverse order? Will that be always the case? Or will this behaviour be changed to be compatible with AutoCAD?
Comments
-
Why not do this:
- Call the boundary command.
- Put all the entities (polylines) created by the boundary command in a selection set.
- Loop through this set to find the one with the biggest area.
- All the other polylines in the set are islands.
BTW: In BC7 islands are created last.
0 -
> Why not do this:
>
> 1. Call the boundary command.
> 2. Put all the entities (polylines) created by the boundary command in a selection set.
> 3. Loop through this set to find the one with the biggest area.
> 4. All the other polylines in the set are islands.I already modified my code to do that, but this is not a common solution to the problem, since the boundary command can create more than one outer boundaries when the user klicks into more than one area. I only can do that because I let the user klick only once.
> BTW: In BC7 islands are created last.
Good news :-)
0 -
It can be done if your program:
- prompts the user for a point
- then calls the boundary command with just this point
- then analyses the areas produced
- then loops back to 1.
0