On_NurbsSurface to ON_RevSurface

Hello ,

With RhinoSdk , do you know if there is a function to convert/simplify a ON_BrepFace with basis surface ON_NurbsSurface to a ON_BrepFace with ON_RevSurface ?


You’ll probably have to do something like: (disclaimer: I haven’t tested this)

  • add the ON_RevSurface to the ON_Brep.m_S surfaces array, use brep.AddSurface(ON_Surface *)
  • call face.ChangeSurface(<new-surface-array-index>, true) with the second argument true to indicate a rebuild of the edge curves, because the parameterisation of the old and new surfaces will most likely be different.
  • afterwards, use brep.Compact() to remove any unused surfaces.



hello menno ,

I succeed , I create the brep with nurbs surfaces , use RhinoRepairBrep to correct the different tolerance on edge and vertex , and then I replace all revolution by the ON_RevSurface , and use again RhinoRepairBrep for getting a better tolerance .


1 Like