Finiding shared egdes for 2D planar shapes

I have a couple a of planar 2D geometries which share some edges. What's a good way to find the common edges?

Upon googling I found an old post (https://dev.opencascade.org/content/finding-common-edges-two-surfaces) which works with contiguous edges (but this may not be the case with me). Also, something is described here (https://dev.opencascade.org/doc/overview/html/specification__boolean_ope...), but it seems that most of the mentioned implementations are actually virtual.

Please see if there is something better than caching all the vertices and edges and comparing there values manually.

DKGH's picture

Is there truly no better way of finding common boundaries?

Mikhail Sazonov's picture

If your "geometries share some edges" there is nothing to do, but just use mapping.

If they are not shared but have similar geometry you may use a Boolean operation, like common or fuse.

DKGH's picture

okay, thank you.