Is there any way to test if a Brep is a surface of revolution?
… and extract the generating curve and axis of rotation?
Not sure if there’s a specific function for Breps, but if you can get the underlying surface(s), and the geometry is simple enough, Surfaces have the functions IsCone, IsCyliner, IsSphere and IsTorus.
With some assumptions about how Rhino constructs surfaces of revolution, I can apply heuristics to the Curves3D list to extract an axis of rotation and generating curve. I was hoping that Rhino would note that information somewhere when the surface was constructed.
All this information is available, but not exposed to RhinoCommon yet. I’ll add an item to our to-do list to expose more of the underlying information.
There is the tracking link:
Thanks, Dale. As a developer of shrink-wrap software for over 20 years, I’m impressed by your responsiveness.
I would like to second this request. Having more of the ON_RevSurface information available via RhinoCommon would be really helpful.