I think I heard Mesh is rewritten from scratch and now vertices are double precision. But seems like Rhino.Geometry.Mesh is still single precision (but I do see NGons…) Is there a new mesh class supports double precision or is it postponed to Rhino 7?
I had a small house modeled by a mesh and it’s origin was set to somewere in the atlantic ocean…
[Memo]Probably I was only one who doesn’t know but I think leaving some notes is helpful…
Mesh.Vertices always returns Point3f.
But you can get a Point3d by Mesh.Vertices.Point3dAt()
Mesh.Vertices.Add() now accepts both Point3f/Point3d
Mesh.Vertices.SetVertex() now accepts both Point3f/Point3d
foreach(var P in mesh.Vertices) loops over Point3f.
[edit: this statement is wrong] But you can still call foreach(Point3d P in mesh.Vertices) which loops over Point3d.
But you can still call foreach(Point3d P in mesh.Vertices) which loops over Point3d.
Unfortunately this is a misunderstanding, you would get a single precision vertex in double-precision format, because of implicit casting of Point3f to Point3d. Any enumeration of mesh.Vertices will give single precision Point3f values!!
You’re safest if you use mesh.Vertices.To3dPointArray() and iterate that.