Stacked control points in Geom_BSplineCurve

Hi

I use Geom_BSplineCurve via the PythonOCC bindings.

Third party apps pass me NURBS curves with stacked control points - these raise an error with OCC:

Standard_ConstructionErrorBSpline curve: # Poles and degree mismatch raised from method Geom_BSplineCurve of class Geom_BSplineCurve

I have used the same parameters in OpenNURBS and it handles it fine. I believe I need to split the NURBS into multiple at the stacked control points, but I don't know how to proceeed.

Attached is the nurbs data in a format that can be loaded into this site

Thanks.

Attachments: 
Dmitrii Pasukhin's picture

Hello, from your sample I see that repeated points has the same weigh and the same knot. Your link process doubled elements and combine them, OCC has no option to do that automatically. You need to filter repeating by yourself. It should be fast implementation to check the position, weight and know koef. And if prev element is the same, skip that. And in the final result you will have filtered data set.

Best regards, Dmitrii.

Michael Capocci's picture

Thanks Dmitrii, will do that and let you know how it goes. I receive these nurbs from another application so have to handle whatever they throw at me!