Turn "mesh" made of lines in an actual mesh

Hello,
I have to build a particular mesh . I have built it manually using lines, but now i would like to turn it into an actual mesh to apply it to more complex surfaces.

Can you suggest me a solution for this issue ?

Thanks in advance


myfile.gh (21.2 KB)

This is quite close to an equilateral triangle mesh with midedge subdivision.

Deleting the outer loop results in the same topology as on your screenshot.

Do you have Weaverbird installed yet?

midedge_subdivision.gh (19.5 KB)

Alternatively if you want to stick with your approach, you’ll have to split the grid of curves first.

meshfromlines.gh (4.8 KB)

Thanks for the quick response , yes I have weaverbird.

  1. The first method works good, but i don’t know how i can control the number of subdivisions/ cells (is there a place where i can attach a number slider?)
  2. the second approach seems to not work ( maybe i do something wrong, i attach the file).

myfile.gh (22.3 KB)

  1. check the L input you can specify the number of subdivisions.

  2. I exploded the curves and increased the maximum face valence to 6.

myfile.gh (25.2 KB)

ok the second works good, so i will just continue with my appproach. Thanks.

1 Like

Martin Siegrist could you help me with this one?
I do get this error:


Or it works and i only get one face:

line to mesh.gh (12.1 KB)

Here’s a way to sort the intersection parameters…

line to mesh mrtn.gh (22.2 KB)

That was fast, thank you for your help.
I had to change the direction of the lines and now I have two more questions:

  1. Why is this one line still displayed after the “Trim Within Region” component, even though the line is outside the region?

  2. How do I get rid of these triangular faces at the edges? When I open your uploaded file, I see them as well.



    line to mesh v2.gh (12.8 KB)

it appears to be coincident. I wouldn’t worrie too much why this happens and instead use a filter to get just the lines which have the start and end point coincident with the perimeter.

Regarding the triangles… A mesh face is usually either built with three or four vertices. A mesh face can be turned into an Ngon if the faces are coplanar. There is no native command to do this in Grasshopper. The problem is that your mesh from line segments is one big planar mesh. Turning this into Ngons creates one Ngon.

Instead, you could also use the split surface component and then use the polyline perimeters of all the little surfaces to create a mesh per closed polyline. This way you can turn the meshes into Ngons.

line to mesh split-surface-ngons.gh (38.4 KB)

FWIW, the native Mesh.CreateFromLines method automatically adds ngons:


line to mesh v2_AHD.gh (14.5 KB)

2 Likes

thanks to both of you, im gonne creat a new topic to find a solution