algorithmic modeling for Rhino
Or the same thing :
for (int i = 0; i < m.Vertices.Count; i++)
{
m.Vertices[i] = m.Vertices[i] + Vector3f.Multiply(m.Normals[i], (float) offset);
}
A = m;
Thank you for a reply.
In case I have unwelded mesh.
I have mesh where I appended other meshes. The shape looks like a simple box. When I offset it mesh looks exploded. Is there a way to offset unwelded mesh?
The problem is that you need to move coincident point with the same vector. For unwelded mesh the normal at coincident point is not the same. It could be Normal at Face.
See on internet how normals are calculated
http://wiki.polycount.com/wiki/VertexNormal
http://www.slideshare.net/foofiM/polygon-mesh
...
So a solution could be to weld your mesh surely something in this order
mesh.append(other mesh);
mesh.Weld(20);
mesh.Normals.ComputeNormals(); # Attach normal vectors.
mesh.UnifyNormals(); # Make faces point outwards.
And unweld after that ??
Why not just use mesh offset, so that will remove the problem of Unwelded meshes?
Mesh m = GetSomeMesh();
Mesh newMesh = m.Offset(myDistance);
Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com
Mesh offset work well thank you.
I looks like I can correct mesh shading for my mesh by unifying mesh faces loops (wb).
Probably this function does not exist in rhinocommon?
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by