Validity of trim loops

Hi,

please take a look at the following face inside this 3dm file:
http://downloads.moduleworks.com/public/ProblemSurface.zip

I convert the face into our NLIB-based format by getting the NURBS representation including the 2D U/V trim loops.
In this case, I get a single outer trim loop which consists of 5 edges. When converting this face to NLIB, we see an face that is invalid (smaller).

If I however export this face as a STEP file and re-import it into Rhino, the subsequent conversion to NLIB works correctly. Strangely, there are now 2 trim loops with each 4 edges.

I’m a little confused why the conversion fails with the original NURBS representation.

Thanks
Mark

That surface has control points all over. [F10]
If you shrinktrimmedsrf it’s a lot more reasonable.
I know nothing about NLIB, but the shrunk surface is a lot more palatable.
clk

Hi Chris,

thanks for the reply.
I’ve tried the shrinktrimmedsrf command, and indeed, I was able to convert the face correctly to NLIB.
I wonder if this command is automatically run when it gets exported via STEP?

Is there an API call (RhinoCommon) to do this programmatically?

Thanks
Mark

Changed category to “Rhino Developer”

Call ShrinkFaces() on the Faces collection of a Brep.

See http://4.rhino3d.com/5/rhinocommon/html/M_Rhino_Geometry_Collections_BrepFaceList_ShrinkFaces.htm