Organizing points of a Trimmed Brep

I haven’t found a solution on the forums -any help would be greatly appreciated. Unrelated/Related I’m working on a curtain wall model and have run into an issue getting the points I need to continue modeling. I’ve come across some similar post but either the result wasn’t what I was looking for after giving it a try or I laced the inputs to use those tools.

The closest I’ve come to getting the points I’m after is sorting by plane; however this still has points out of order. My end goal is to take 4 points generated from the upper and lower horizontal member and connect them (third picture).

Internalized section of code attached. (113.7 KB) (122.4 KB)

1 Like

sortfromtrim Edited (116.3 KB)

1 Like

Thank you both. Just getting back to the office and these are much more elegant than the cheat work around I came up with after the post. I ended up creating a surface across the back face to solve for the intersection and grab my points. Definitely need to get read up on using more Tree based logic like Quan Li suggested and wrap my head around the point generation Rajeev provided.