Grasshopper

algorithmic modeling for Rhino

I would like to use a Delaunay mesh to solve for all of the connections of a mesh but I would like to guarantee that specific edges exist along guide curves.

The constructors for a mesh are vertices and Face #'s but is there a way to make a mesh ensuring that some vertices have a topology edge?

Any help on this or other methods of building a mesh from scratch either in code or GH would be greatly appreciated.

Views: 1255

Replies to This Discussion

Hi Andy,

the Grasshopper delaunay solver does not allow you to specify certain fixed edges. You may have to iterate over the resulting mesh and flip edges.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

YES DAVID! I didn't even know what .swapedges was until you said the word "flip" and the thought in my head did just that. I don't have it yet but that is exactly what I need. Thanks

This seems to work, but is not a very reliable method.

Attachments:

Thanks for the effort. I love looking at other peoples code. I should have let people in on the secret that it is for converting contour lines into an accurate mesh and being such all of the lines are planar. I noticed you used a brep intersection when a planar one would do. I have posted my progress as food for thought.

Attachments:

I used a brep because the direction of intersection I chose was perpendicular to the mesh edge. This so that it works on any generic mesh, but in this case projecting the edges to the plane used for the delaunay triangulation works too.

 

Your approach is very similar to mine. One difference is that every time an edge is swapped i start over again from the beginning while you continue down the topologyedges loop. I did this because i thought every time an edge is swapped the mesh topology is recalculated and edge indices might not be the same as before. But yours is working so I might be wrong.

Vicente,

  I want to thank you for your continued interest in this topic. I did a little script that checked to see if the mesh changed the index of the edges like you suspected and it turns out it does not. I'm sure you figured that out by proxy but thats not why I am replying again.

I have a new issue where some mesh triangles are crossing. The flipping and re-flipping of the faces cause them to either end up crossing or they are popped off of the mesh such that two connected faces are the same and create a "spike" (see images). Any ideas on how to prevent this or fix it if it happens?

I have been trying to change the order in which the mesh flips edges but no matter how rigorous the ordering I cant seem to do it.

Attachments:

The top error happens when the quad formed by the two triangles that are joined by the flipped edge is concave. I think this shouldn't happen if the script is detecting the right edges to flip.

The bottom error looks like after flipping an edge only one of the triangles is flipped creating a non-manifold edge. I don't know how that happened.

Can you post a rhino file with a trimmed version of the original geometry and the resulting mesh?

your concave comment gave me an idea... I will get back to you with either a solution or the original geometry. Thanks

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service