ToNURBS of toroidal RevSurface creates invalid brep

_ToNURBS on the brep in ToNURBS_creates_InvalidBrep.3dm (36.3 KB) will create an invalid brep.

I guess this may be related to RhinoCommon’s Surface.ToNurbsSurface returning 2 for the accuracy parameter when the underlying RevSurface is passed to it.

Hi @spb,

Thanks for reporting. I’ve logged the issue:

Did you make this model in Rhino? Why the tight tolerance?


– Dale

It was imported from a STEP file. The units are inches, so the 0.0004 tolerance is about 0.01 mm.

Although RH-57922 is still open, _ToNURBS in 7.34 doesn’t create an invalid object from my provided example. However, the largest face in the example posted here does become invalid like my example had with a “Distance from start of ON_Brep.m_T[0] to 3d edge …”. They are RevSurfaces in both cases.

You mean the revsurface in Match surface to curve on surface fails.3dm?

– Dale


By the way, _ToNURBS in Rhino 8.0.23297.13303, 2023-10-2 also creates an invalid brep.