algorithmic modeling for Rhino
Hi Peter,
This can be solved using regular grasshopper components:
As for the sdk related to meshes, I do not think there is a method that will directly allow you to extract inner and outer naked edges. You can use the MeshTopologyEdgeList.EdgeLine method to extract all mesh edges. Pairing it with MeshTopologyEdgeList.GetConnectedFaces would let you isolate the naked edges only.
Then apply the same principle as above: join lines, the one with the largest length is the outer edge - all the others are inner.
Well my friend,
I use a similar method already (with far less components) ... but the thing is that sorting ins and outs based on length is a VERY slippery road to follow (I'll make a case for you to demo this).
So far as regards this portion of code (and with surfaces/meshes that are "suitable") the sorting works (is used for find valence 2 points in boundaries - naked stuff - to pull things to other things and feed Kangaroo - some complex relax "this on that" thing that I'm doing right now)
Of course and for "canopy" (AEC oriented so to speak) type of topology in forms (mesh shown is derived from shapes morphed to nurbs and is solely used for finding valence points, nothing else - I hate meshes, he he) ... no problems.
I can not read your definitions from the screenshots, but I understand the downfalls of edge length as a criteria.
You can use the surface area as a more reliable criteria - patch each naked edge curve, calculate its area, the one with the largest one has to be the outer naked edge - all the others are inner ones.
The problem is that topologically speaking, the 'outer' boundary is just another hole, so any method of identifying it will be somewhat arbitrary.
(It's like the joke about the mathematician catching a lion in the desert by building a fence around himself and declaring himself to be on the outside)
Though I should say - as long as the mesh has consistent face orientations and identifiable top and bottom sides, then the outer boundary will be the one whose clockwise/counter-clockwise direction matches that of the faces.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by