ConMesh to build custom surface offset

I was unhappy with Offset as it added additional vertices. Also, I need to know the relation between the original and the new vertices. So I created my own little surface offset:


2024-03-08_ConMesh.gh (11.1 KB)

I use ConMesh to build the offset. I give it the new vertices and the original faces, and I am a bit surprised that this works: After all, the vertices of the original faces don’t coincide with the new vertices.

Is it reliable to do so? Why does this even work?

important: while the word “surface” is generic in everyday language, in rhino it refers to “nurbs surfaces”. your algorithm deals with meshes.

Some mesh offset algorithms do work the way you did it in grasshopper. It calculates the normal of each vertex and moves the new vertices in the direction of that normal.
now the normal is unit vector (which is to say that it moves the vertex 1 unit length). if you add a multiplier battery after the normal output, you can control the distance.

it works because a) the resulting offset has the same number of vertices and b) the face object is simply a list of vertex indices that construct that face. in the pane bellow , you see that each face is a tuple (a list basically).
image

when you’re constructing the resulting mesh, you’re keeping the order of the vertices, and you’re recreating the exact number of faces with the exact lists of vertex indices.

Yes, treat is as colloquial meaning of surface. :sweat_smile: I am fully aware of the difference in meaning inside Rhino.

My expectation was that Offset does so, but it doesn’t. In fact, even for my simple example, the result is slightly different. But the real problem, as I already mentioned, is that Offset may add additional faces. Even if it doesn’t – which depends on the original mesh – I need to have a guarantee that the resulting vertices are in the same order as the original ones. With my algorithm, I do have that.

That’s the explanation I was looking for. Now it all makes sense, thank you!

Just keep in mind the offset is done with vectors at the vertex normals and not like a brep offset where sub-surfaces itself are offset…

2024-03-08_ConMesh_vectors.gh (7.2 KB)

:thinking: That should be what I want. With the mesh that I’m working with, I get a nice and clean output.

Thanks!

1 Like

I wrote that because your title says ‘…surface offset’

To be precise, a mesh consist of vertices and faces, not surfaces.