Hi All,
I’m developing surface geometries which are used to create optical machining files. The surfaces are created through using rhinocommon api and .net 2019.
Once the surfaces are created, split, joined, and converted to breps, I export them as parasolid ‘x_t’ files for input into a CADCAM program for lathe file creation. Accuracy is key here, and I am trying to work to 1e-6 global tolerance.
The issue that I am finding is that the resulting parasolid files may be inverted, and the operator of the CADCAM software has to invert the surface to presumably make the ‘inside’ the ‘outside’. The shape of the the 3d surface does not change.
Does a brep or surface in Rhino have a side to them, and how do I ‘invert’ the brep or surface.
Many thanks,
Hi John - a closed brep should generally always point outward in Rhino; open ones, including ones that may be visually closed but have a naked edge someplace, can point either way. In Rhino, the Dir
or ShowDir
commands will indicate which is which and you can also make a display mode that colors backfaces.
-Pascal
Every surface has an inside or outside but a closed polysurface usually can’t be flipped.
Thanks, that has massively helped.
Can I ask if you know a method for determining the direction of an open surface using Rhinocommand method or property?
Thanks,
The surfaces I am creating are all open, so I should be able to flip them.
Hi John -
In Rhino Common, Brep.Flip()
https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Brep_Flip.htm
-Pascal
Thanks Pascal, I just need to know if a surface needs to be flipped. Can’t seem to find a method or property to check the direction.
Ah - sorry - some of these might help -
Get the Brep.Face.UnderlyingSurface()
Or Surface.NormalAt(U,V)
on a BrepFace
BUT, I would ask the bigger brains on Scripting - McNeel Forum
-Pascal
Thanks so much,
John