Grasshopper

algorithmic modeling for Rhino

Well friends,

This works OK for nurbs (breps) and finds hole curves (inner loop) and the boundary (outer loop).

the 1M question is: where to find SDK stuff (if exists) to do that with meshes? (or is there some add-on that can do it?)

best, Peter

Views: 1748

Replies to This Discussion

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.

Attachments:

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.

Attachments:

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.

Hmm ... this case needs rethinking and some fresh air.

And that's exactly what I did (PS: I don't like leathers in summer)

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service