Is there a easy way to check that two groups have common part

I have the group which has common part with other groups and this group will trim those groups. But first I have to find groups to be trimmed…

The only thing, which comes to my mind is to use intersect method of Geom::BoundingBox object to narrow down a set of groups to be trimmed (intersection of bounding boxes of groups doesn’t guarantee of course that groups have common part but in case if they have a common part intersection of their bounds will not be empty for sure). Then it is possible just to iterate through groups filtered such a way and perform subtraction (subtraction will fail anyway and should return nil in case if groups do not intersect with each other).
As for me I don’t know if it is possible to check more precisely if two groups intersect with each other without performing any kind of boolean operation (which seem to be a non-easy way to check).

I open sourced my solid tools some time ago, maybe that is of help.

Beware that the code isn’t very good as it is a quite old project from when I was relatively new at writing plugins.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.