I have a network of lines that forms a complex hexagon grid. What I’m trying to do is convert this network into a mesh and also retain the same faces. I need this in order to use the deconstruct mesh utility and mesh connectivity features. The face normals and vertice normals are really handy features.
Is there any way to do this? I tried using the plankton mesh, but I wasn’t able to deconstruct the plankton mesh or use evaluate the mesh using any tools. I tried looking, but couldn’t find any.
I also tried the ngon mesh plugin, but I couldn’t get any desireable results out of it.
Ah, that’s a shame. So i guess I would have to go about creating a surface at each mesh face. I was hoping to avoid this as the gh file becomes unnecessarily heavy. Meshes are nice and light to work with, not to mention the connectivity data
Which information specifically are you missing?
Face and vertex normals are more ambiguous with non planar ngons than for triangular meshes, but there are reasonable ways to calculate them which would be possible to add.
You would need closed polylines.
Adjacency is ready for you as well for faces, edges and vertices and combinations of them.
Incase you need a library there is NGonsCore.dll
I need the vertex normals, face normals, and neighbouring vertices. I tried getting the neighbours, but it always gives me the triangulated mesh neighbours.
What I tried doing is using the centre of the polyline and then getting a normal from that point. This is getting really heavy really fast and doesn’t feel like the right direction. What kind of method would you suggest?
Thanks, I am currently experimenting with it. Is there any specific style that I can use for an Ngon mesh that can give me similar results to deconstruct mesh?
Ngon mesh is the same rhino mesh, so you can use native grasshopper components as well.
To deconstruct mesh I always use GetPolylines component and construct FromPolylines.
What specific thing you are looking for, I can write incase it is useful?
I bet you would need a deconstruct component and construct component that has additional ngon data.
But there is already a component that does similar thing AdjustVertices. It lets you change vertex position.
For instance this would do a trick to adjust vertices.
It takes all vertices from Mesh MB and changes MA vertices positions of MB.
MB faces information is ignored so F input can be whatever.
I used that in combination with the Ngon mesh creator. The only part I am not completely happy about is the way I am getting the face normals. Though this has solved my problem, I don’t know if there is a more elegant way to achieve the same.
Is this one of the methods you were talking about @DanielPiker? I have basically taken all the vertex normals of a the polyline boundary, and created an average normal that is at the centre of the polyline.