Group surfaces and curves based on coplanarity

Hello All,

I have a set of sufaces that are rotated, with coplanar curves on top of them:
rotate
I would like to group them so that I can sort them by coplanarity like this:

1:


2:

3:

how can I do this?

gh file internalized:
group curves and surfaces by coplanarity.gh (5.2 KB)

Thank you!
Renan

That’s a classic hard flat clustering task using just one criterion: coplanar Planes (derived from planar BerpFaces: using the TryGetPlane(out plane, tol) RC Method). Obviously if you cluster the Faces (by index) you have the Outer/Inner Loops clustering on hand as well. That said if you want Faces in contact as well … that’s just another criterion.

For the Planes this is the classic Method:

Notify if you want an indicative C# that does that.

1 Like

Thank you, is there no way to make it using existing components only? if not the yes I would appreciate the C# script!

That’s not my game (at all). So let’s wait … and if nobody provides such a solution I’ll post the C# mentioned.

1 Like

Lol, it’s so bad, it almost funny. :joy:


Lines co-planar to planar surfaces _ vr.gh (18.7 KB)

(Don’t use this. It works, but it can be done without text manipulations)

1 Like


group_crvs_2025Jan8a.gh (20.9 KB)

4 Likes

Oh, thank god. I was doing the dumbest :poop:

1 Like

Thank you Joseph!! This is great.

Thank you everyone for your help!

I’m going to save that cluster.

1 Like

Which one? There are two. isEqual has a useful default (‘B’ = 0) and a ‘T(Tolerance) input, default = 0.0001

The other cluster ColorBa is explained here:

ColorBa