Unite regions doesn't work. A bug in BricsCAD?

My company have a plugin we develove that works perfect in AutoCAD since the last 20 years and now when we are adjusting it for BricsCAD we get some errors.

I have a list of different regions that I want to combine (unite) to a single big region and it works with some drawings.

I have a very simple function:

for (int j = 0; j < i; j ++)
{
totalRegion->booleanOper(AcDb::BoolOperType::kBoolUnite, (AcDbRegion*)region_list[j]);
}

When I run it I get the following message:
Modeling operation error:
system inconsistency processing edge coincidence

If I as a test draw the different regions in the 'region_list' everything looks okay from what I can see and if I use the UNITE command inside autocad and marks all the regions it works and I can get the result I had hoped the code above would solve.

I can't find anything wrong with my code so it must be a bug. Especially since it has worked in AutoCAD since 20 years.

Comments

  • Dear Samuel,
    can you report this problem (with sample dwg file with indicators which regions you select, and in which sequence, and the code here) to our SupportRequest system.

    Also, have you tried whether the UNION command does work ?
    many greetings !

  • Well it's not so easy since my plugin creates all the regions so nothing is shown up on the drawing until the last combined region is viewed (the one that doesn't work). I tried to draw out all the individual regions and used the UNION command to manually combine them to see if that worked and it did. So something is not correct with the command:
    newRegion->booleanOper(AcDb::BoolOperType::kBoolUnite, (AcDbRegion*)region);

  • It's 2D regions so rather simple ones. I tried to move the objects (that the program will calculate the regions for ) closer to each other and when it works so it seems like if two regions are to far away it won't work in all cases.

  • When moving the objects around (without changing them) I got one one occasion this error instead of the previous one:
    Modeling operation error:
    Two or more vertices of one body mapped to a single entity of other body

  • Dear Samuel,
    maybe, can you create a dwg with those regions which do not unite via booleanOper() ?
    Also, can you check the orientation of the regions (normal up or down, or being parallel, but not codirectional) ?
    Sometimes the API function could behave a bit different than the UNION command (even if this should not happen) ... so if there is any chance for a reproducable case for us, it would really help ...
    sorry for not having better news right now :-(
    many greetings !