mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0027575: Reading STEP file gives an empty result
Exception is raised during translation BSpline curve having only one unique knot. Protection for such case was added Added protection against exception during reading BSpline curve with number of control points equal to 0 Added protection against exception due to using null binder during writing XDE document Test case for issue #27575
This commit is contained in:
@@ -43,7 +43,10 @@
|
||||
lastKnot = aKnots->Value(i);
|
||||
}
|
||||
}
|
||||
|
||||
if(NbUniqueKnots <= 1)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
TColStd_Array1OfReal Kn(1,NbUniqueKnots);
|
||||
TColStd_Array1OfInteger Mult(1,NbUniqueKnots);
|
||||
lastKnot = aKnots->Value(1);
|
||||
@@ -83,6 +86,11 @@
|
||||
//aControlPointsList = new StepGeom_HArray1OfCartesianPoint(1,NbPoles);
|
||||
const Handle(StepGeom_HArray1OfCartesianPoint)& aControlPointsList = BSCW->ControlPointsList();
|
||||
Standard_Integer aSumMulDiff = aFMulDiff + aLMulDiff;
|
||||
Standard_Integer nbP = NbPoles - aSumMulDiff;
|
||||
if( nbP <= 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Array1OfPnt_gen Poles(1,NbPoles - aSumMulDiff);
|
||||
|
||||
for (i = 1 + aFMulDiff; i<= NbPoles - aLMulDiff; ++i)
|
||||
|
Reference in New Issue
Block a user