Construct mesh on Grasshopper using external information

Hello everyone,
I am a new user of Grasshopper, and recently I’ve been trying to insert mesh information to a grasshopper model to feed a finite element analysis. Thus, I am using a third-party mesh generator that is compatible with Rhinoceros. Using the “DeMesh” command on Grasshopper, I was able to break the mesh information into the coordinates and the nodes of each element (vertices and faces, as displayed in the figure):

Nonetheless, this process made me question the possibility of recreating the mesh using the “ConMesh” command of Grasshopper without linking with the .3dm file mesh. For example, is it possible to create a mesh inside Grasshopper only with the information panels related to the vertices and faces? As displayed in the following picture:

The vertices information is a list of vectors that I believe is possible to recreate. However, I could not identify which type of data represents the faces information (example: T(124;132;84). Anyone knows if I can create the mesh only with this information, and if so, how could I do that without linking it to the mesh information on the .3dm file? Without this link, I could bring directly from the mesh generator to Grasshopper the mesh data and make my model more independent.

Best regards,


The T{x, y, z} syntax just means Triangular face and the vertex indices. As long as you have that in a text file someplace (or can generate it), then you don’t need the 3dm. What format is your data in from the external mesh generator?

I should point out that the quad and triangular remeshing abilities of Rhino 7 and associated Grasshopper components (TriRemesh and Quad Remesh) are now very good at producing decent FEM friendly meshes, so you might not need the third party tools.

1 Like

Thank you so much for your reply johnharding! The mesh data is generated on a text file, here is an example of the data format:
outputMesh.txt (8.2 KB)

Do you have an idea how could I transform this information into a readable format for Grasshopper? I made a test trying to copy the content extracted from the mesh to other panels, however, it was not readable with the ConsMesh command. I could not replicate the information on the grasshopper format for the vertices and faces.
Thank you for the tip on the TriRemesh and Quad Remesh commands, I will take a look at that. Do you know if the software also supports three-dimensional mesh? As displayed below:

The text files need a little edit (to give consistent separators, just replace the variable gaps using notepad with commas for example) and I would split them into two files, vertices and faces. With that in mind, you can read the text and construct the mesh pretty easily as follows: (9.2 KB)
outputMesh_vertices.txt (2.1 KB)
outputMesh_faces.txt (1.6 KB)

(note that there is a little expression on the Mesh Quad component, as engineering software tends to start vertex lists with index ‘1’ instead of ‘0’ so you have to shift them).

The components I mentioned are good for remeshing any surface or mesh, closed or otherwise so definitely would work fine for those primitives.

1 Like

Thank you so much johnharding. I can’t believe it worked, this is incredible!
I will try for the other type of primitives! Thank you!