We use open cascade in C# code for reading STEP with XCAFDoc_ShapeTool (OCCCSharp library)
After reading STEP file when we iterate each entity, for Spline entities we are facing issue.
Suppose we have Ellipse hole(2 Spline curves) on sheet body. We get proper knot values for 1 Spline and for another Open cascade returning knot vector with same value as explained in below code snippet.
Attached sample file.
BRepAdaptor_Curve adaptor = new BRepAdaptor_Curve(occEdge);
CurveType type = (CurveType)adaptor.GetCurveType();
if (type == CurveType.GeomAbs_BSplineCurve)
Geom_BSplineCurve spline = adaptor.BSpline();
TColStd_Array1OfReal knotArray = new TColStd_Array1OfReal(0,spline.NbKnots()-1);
spline.Knots(ref knotArray); // OpenCascade 7.2 returning same KnotArray values e.e (0, 0) or (1, 1, 1, 1, 1) . Before OCCT 7.2 upgrade it was working fine.
Need knot vector with correct values.