1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0030921: Data Exchange - STEPCAFControl_Reader incorrectly reads the specified stp file -- fix

The number of weights is adjusted to the number of poles in StepToGeom::MakeBSplineCurve(2d).
This commit is contained in:
asuraven
2020-09-15 21:14:39 +03:00
committed by bugmaster
parent c3da64a686
commit 3940436ae2
2 changed files with 34 additions and 3 deletions

View File

@@ -126,9 +126,9 @@
BSplineCurve_retour CC;
if (SC->IsKind(STANDARD_TYPE(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve))) {
const Handle(TColStd_HArray1OfReal)& aWeight = BSCWR->WeightsData();
TColStd_Array1OfReal W(1,NbPoles);
for (i=1; i<=NbPoles; i++)
W.SetValue(i,aWeight->Value(i));
TColStd_Array1OfReal W(1, NbPoles - aSumMulDiff);
for (i= 1 + aFMulDiff; i<= NbPoles - aLMulDiff; i++)
W.SetValue(i - aFMulDiff,aWeight->Value(i));
CC = new BSplineCurve_gen(Poles, W, Kn, Mult, Deg, shouldBePeriodic);
}
else