Orient curves to a plane for nesting

Hello,
I’am trying to orient curves on a plane for cnc cutting. Each module must have three holes in it. Instead everything is going all over the place, like you see on the printscreen. Got stuck, please help. Thank you in advance.

orient objects to plane.gh (34.0 KB)

Your script is a bit complex. Can you simply the problem you are having and share a better description?
For example, are all the modules identical? Do you need the flattened parts to be nested on the sheet?
Sometimes the definition can be designed in a way to help easier flattening.

You are making circles in threes, based on the vertices of your triangles, giving 72 in total. But you have only 24 planes being fed into the Orient as the source planes. I would think that they would have to agree.

Source planes and geometry lists must match. I always like to orient everything to XY first, then orient to a grid for nesting. Also have a look at OpenNest | Food4Rhino

If this what you want you need to separate the curves

orient objects to plane_.gh (35.5 KB)