Sorting Coplanar Curves according which Curve Segment they belong to

I am trying to sort curves based on a guide polyline, to check which segment is coplanar, and I can’t seem to figure out how to do it.

Planar test.gh (8.9 KB)

You need to internalize geometry. ‘Curve’ and ‘Windows‘.

Or post a Rhino file (.3dm).

coplanar or closest?

^^

Coplanar, so the solution might look something like this

“Sorting”:interrobang:

Better to describe your goal instead of speculating about how. This sketch is helpful.

You still need to provide geometry;.

What determines placement of windows? Coplanar alone isn’t enough. Closest and coplanar might work.

P.S. No, this is a mess :bangbang:

Oh yes I am sorry I forgot to share the sample rhino file

Sample.3dm (71.9 KB)

I am not sure what you mean by Closest, and not sure how you would sort using 2 different parameters instead of just one, why does it have to be closest AND coplanar?

This is one possible approach but… the wall segment with two windows appears twice, each with only one window. And I didn’t try to isolate the wall segments with no windows. Doing these things is more work than I’m inclined to do now.

windows_2026Jan4a.gh (11.5 KB)

Geometry is internalized so no need for Rhino file.

(But oddly, it doesn’t work correctly in R7, only R8)

Hahaha, Fair enough, I am grateful for the time, it gets me a little closer to figure this out

It’s far from the only way (or best way) so don’t let it constrain your imagination!

This way is better, and it works in R7.

windows_2026Jan4b.gh (11.7 KB)

Note that I wasn’t constrained by your description (“coplanar”).

There are issues when you change the arrangement of the windows, But I am satisfied with your help so far(I’d like to avoid having you do my whole project, so as not to take too much of your time), but I was curious though why do you use mass multiplication with the distance(from the curve closest point) to get the Boolean values is it just a test to see if there is a zero as a way of testing distance for all of the curves?

Without your modified geometry (‘Windows’), I have no comment. Oh, wait, it probably has to do with the window centroids not being adjacent (‘D’ == 0) to any of the wall segments?

“for all of the curves?” - What curves?

But yes. MM returns zero (by branch) if any of the values are zero, making an ideal pattern for Dispatch to separate wall segments that have windows (‘B’ output) from those that don’t (‘A’ output). Note that SrfCP ‘D’ has an expression to round values to three decimal places.

P.S. It worked when I posted it using the geometry you supplied. “Pottery Barn Rule” - You break it, you own it. :wink:

An alternative.

This version is simpler and might work better when you move (misplace / mis-size) the windows?

windows_2026Jan6a.gh (14.4 KB)