Include node in the mesh

Is it possible to include a node in the mesh?
I need to export the mesh and the line to another software so it is important that the mesh has a node on this point so that they are connected.
include node to (9.2 KB)

Instead of adding a vertex, you could simply export the mesh and line as two seperate files, for instance two OBJs. When importing them into the other application, they should appear at the same location.

Meshes can include vertices which aren’t used by any faces, so one way is to just add the point to the vertex list.
If you need it actually connected to the mesh with edges though, you can use this script.
It assumes the vertex lies on a face. If you wanted it to handle the cases where the vertex being added sits exactly on an edge or a vertex of the original mesh, a few more lines would need to be added (4.4 KB)

Improved it a little to take a list of points as input, and handle the cases where the vertex is on an edge or vertex. (6.7 KB)


This works perfectly in a normal surface. I tried to apply it in a multi-level mesh and it gives some strange results in some points:

If the levels are not twisted, it works great.
Thank you
Building mesh.3dm (54.5 KB) (55.7 KB)

Here we go: (54.8 KB)

I’m curious to know how you made the gif? it is quite amazing.

Thank you. This is perfect.

I use the built in Grasshopper slider animate function (just right click any slider and select Animate).
Then I turn the image files into a gif with VirtualDub.


By Daniel

By Rajaa Issa

Gif generator

1 Like


I guess spider nets are in supposed to be optimal in some way, question is in which way, but here’s one concept. Let’s see how long before someone makes an elegant Mesh replica of this concept:

// Rolf


Additional thoughts from the peanut gallery - I use Karamba mesher, which takes points and edges, for this purpose

Hi Daniel I tried to copy paste the content of the c# script into a new Rhino 8 Grasshopper c# script editor and I get an error:

  1. Error running script: ‘IEnumerable’ does not contain a definition for ‘Count’ and no accessible extension method ‘Count’ accepting a first argument of type ‘IEnumerable’ could be found (are you missing a using directive or an assembly reference?)

With the help of @Tom_P in another topic, I was able to fix this script using the new script editor :slight_smile:

I used length instead of count

  private void RunScript(Mesh m, System.Collections.Generic.IEnumerable<Rhino.Geometry.Point3d> p, out object A, out object B)
    if (p is List<Point3d> myList)
    Point3d[] pts = myList.ToArray();
    Mesh m1 = m.DuplicateMesh();
    for(int i = 0;i < pts.Length;i++) (15.5 KB)