algorithmic modeling for Rhino
IT would be easier to use a loop for that. Check out anemone looping plug in for GH. I am pretty sure it has a water drainage example file.
Attached is the drainage example file in case you cannot find it.
Hi Michael, thank you. I have anemone and could run the example file. But I am afraid it does not work ok with meshes. Tried modifying the file but no luck.
Still the curves might not be exactly what I am after, I specifically need those ditch segments. Just need a way of recognizing which lines are concave or convex.
Hey Daniel, thank you, but in the end this gives me a visual recognition of the ditch places right? How could I grab these "ditches" axis?
Oh sorry, I forgot to mention that. On hoopsnake double click, you will get a window, there you have a loop button. I have used Hoopsnake here precisely because it has that button, because it is a slow process due to the need to take small steps for when it reaches the edges.
But you can replace it with anemone if you prefer.
I been doing some research on how to test whether an edge is concave or convex and found this:
https://www.gamedev.net/forums/topic/508442-determining-whether-an-...
If na and nb are the normals of the both adjacent faces, and pa and pb vertices of the both faces that are not connected to the edge in question, wherein na and pa belongs to the face A, and nb and pb to the face B, then
( pb - pa ) . na <= 0 => ridge edge
as well as
( pb - pa ) . na > 0 => valley edge
Seems to work, (trying with two faces) but now I need to translate it to the whole mesh.
Any ideas?
Assuming the mesh is always triangulated - the 'HingePoints' component in Kangaroo extracts the 2 points at the end of each non-boundary edge, and the points at the tips of the 2 adjacent triangles. From this you can get the normals of the 2 triangles, and then whether the cross product of these is in the same or opposite direction as the edge tells you if it is concave or convex.
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