Grasshopper

algorithmic modeling for Rhino

Creating Multiple Surfaces from Collections of Polylines

Hi all, does anyone know how to create surfaces from a collection of curves/polylines such as in this example? I just want a surface to form within each branch whenever possible (these are building rooftops). Thanks for any tips.

Views: 1433

Attachments:

Replies to This Discussion

Thanks Peter, this is great and certainly a lot to soak up. It works pretty well on a variety of geometry and I'm looking forward to trying it out under more conditions! 

Well ...

IF ... you have CERTIFIED and VALID triangles/quads in a given line graph (and just that) and you can SWEAR that these are OK (don't blame me if not) there's another waaaaay smarter way (and rather bulletproof) to cut the mustard:

  • get the connectivity thingy (either via C# OR via Sandbox) out of a given line graph.
  • work with intersecting Lists of indices (Using the so called point to point connectivity trees). Use a HashSet (That's a "bit" crude way ... but who cares?) to ensure unique results.
  • do the ^$#^%$# triangles/quads as Breps by finding clusters of connected points (triads/quads).
  • join them > elementary my dear Watson.

See the attached that works on chaotic points solely having triads in mind (not suitable for your case as it is ... but if you dig into the code ... you'll get the gist of my meaning with regard List intersections and other freaky stuff).

Of course if you modify this for finding/making something and feed the thing with garbage > garbage is what you'll get (life sucks).

Moral: Learn C# ASAP - forget the rest.

Attachments:

BTW: Make a test: "triangulate" some thingy roughly describing a building. By that I mean create a line graph kinda like having the building envelope (as Brep or Mesh) and then getting the edges out of the BrepFaces or Mesh Faces. Ensure that we talking unique lines in the graph.

If the triangulation is wrong or describes wrongly the "building" then  > go for a ride with a proper super-bike (what about an all black KTM RC8R?).

If the triangulation is good > then use the FindTriads def.

BTW: why not higher order of pts clusters?

1. I hate meshes.

2. I hate patch

BTW: And since I have a feeling that all the above sound Greek to you( (s%$!t happens) here's a demo:

  • An ex "building" is smashed into edges (and some are added since this public version supports only triangles, sorry but the other quite complex thingy is strictly internal).
  • Edges are shuffled (trust nobody).
  • Then the C# does your building ... minus the edges that are MIA (s$#$t happens).
Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service