@ChristopherBotha, you might write your own smoothing algorithm. Just get the vertex neighbours of every mesh vertex (v) and then move v to to the average position of all its neighbours.
In the Rhino WIP C++ SDK, the RhinoSmoothMesh function provides the functionality of the Smooth command. As this is not exposed in RhinoCommon yet, I’ve added a YouTrack item to do so.
because im an ornery kind of guy i dug around and found the laplacian routines written for unity. Most of the commands are easy to port over (Vector3D to vector3d etc) and I had to write my own mathf.approximate for determining neighbour epsilon equality, Where i am stuck now the function is expecting the vertex list in vector3d not point3d.
The unity dll does this automatically in format vector3D[] vectors = mesh.vector3d().
I can extract from rhino mesh.vertex a point3d and point3f list but no vector3d list.
I cant seem to extract an edge list to vectors either?
may be simpler to convert the routine to do the math on point3ds… but im lazy…
Self resolved. EBKAC. The routine wants vertices and edges. I reread it.
Its not Unity as Unity also has no smoothing algorithms its written in C# to augment.
Near finished porting it over the Mathf function is tricky to get right as my mesh softens sometimes and other times it crashes out. The approximate function in mathf uses some fuzzy logic to determine neighbours because my self intersecting meshes crash out.
The softening also results in a slight downscale on each iteration which I’m trying to factor…
Purely a “for fun” project to keep my teeth sharp.