Extract contours from boolean union

Hello,
I would like to extract contours for cnc and lasercutting.
I have build my model from closed solid polysurfaces.
By either boolean union and boolean difference I have created the holes and the teeth.

I run a python script:
( Flatten model components (simple "flat" boxes) into co-planar rectangles )

The teeth from the boolean union disappear, the holes are not a problem.

Is there a way to fix this?
(I think the problem is in the way the geometry is build.(?))

I am on Rhino 7

Thanks a lot.

example.3dm (1.6 MB)

UnrollPolySrfPanels3.py (5.2 KB)

Hi @Biglint !

i’ve tried to use _MergeAllCoplanarFaces and it seems to work.

Here’s al link on how it works: MergeCoplanarFace

Hello Paolo,
Thank you very much.
This works perfectly.
:star_struck:
Vriendelijke groet,
Maarten