Trimmed NURB issue

Hi , I am trying to trim a NURB and the result is unexpected ( OCC 7.2.0)

  • I have an untrimmed NURB ( untrimmed_surface.brep)
  • I have projected a polygonal boundary onto the NURB to create a UV polygon ( these UV locations evaluated on the NURB are trimmingWire3DOnSurface.brep).
    • untrimmed_surface_with_uv_trimming_wire.png shows the trimming polygon evaluated on the NURB surface.
  • As a 'trimming curve' needs to be an actual curve I create a periodic spline of degree 1 using Geom2dAPI_PointsToBSpline that interpolates the polygonal UV locations and apply that as a trimming curve on the NURB surface
    • In 2D UV space the trimming curve is trimmingUVCurve2d.brep
    • It interpolates and overlays the piece wise UV polygon trimmingWireUV.brep
      • To me this implies I have created a correct UV trimming curve
  • However, the result is unexpected when the trimming curve is applied to the NURB surface - see untrimmedsurface_with_trimming_spline.png
    • The trimming curve does not follow the expected outline, it has developed some 'lobes' at the corners.
    • The final "trimmed" NURB is trimmed_surface.brep
Andrew Cunningham's picture

After much digging around, and some great help from OpenCASCADE experts, the fundamental issue is that the NURB surface is of degree 14. Trying to come up with a trimming curve that behaves as one might intuitively expect is very difficult in some areas of the surface.