mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +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:
parent
c3da64a686
commit
3940436ae2
@ -126,9 +126,9 @@
|
|||||||
BSplineCurve_retour CC;
|
BSplineCurve_retour CC;
|
||||||
if (SC->IsKind(STANDARD_TYPE(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve))) {
|
if (SC->IsKind(STANDARD_TYPE(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve))) {
|
||||||
const Handle(TColStd_HArray1OfReal)& aWeight = BSCWR->WeightsData();
|
const Handle(TColStd_HArray1OfReal)& aWeight = BSCWR->WeightsData();
|
||||||
TColStd_Array1OfReal W(1,NbPoles);
|
TColStd_Array1OfReal W(1, NbPoles - aSumMulDiff);
|
||||||
for (i=1; i<=NbPoles; i++)
|
for (i= 1 + aFMulDiff; i<= NbPoles - aLMulDiff; i++)
|
||||||
W.SetValue(i,aWeight->Value(i));
|
W.SetValue(i - aFMulDiff,aWeight->Value(i));
|
||||||
CC = new BSplineCurve_gen(Poles, W, Kn, Mult, Deg, shouldBePeriodic);
|
CC = new BSplineCurve_gen(Poles, W, Kn, Mult, Deg, shouldBePeriodic);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
31
tests/bugs/step/bug30921
Normal file
31
tests/bugs/step/bug30921
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "OCC30921"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
##########################################################################
|
||||||
|
# STEPCAFControl_Reader incorrectly reads the specified stp file
|
||||||
|
##########################################################################
|
||||||
|
|
||||||
|
stepread [locate_data_file bug30921.stp] a *
|
||||||
|
tpcompound result
|
||||||
|
|
||||||
|
checkprops result -s 288180
|
||||||
|
puts "REQUIRED All: Faulty shapes in variables faulty_1 to faulty_39"
|
||||||
|
checkshape result
|
||||||
|
|
||||||
|
set nbshapes_expected "
|
||||||
|
Number of shapes in shape
|
||||||
|
VERTEX : 2858
|
||||||
|
EDGE : 4331
|
||||||
|
WIRE : 1758
|
||||||
|
FACE : 1514
|
||||||
|
SHELL : 21
|
||||||
|
SOLID : 21
|
||||||
|
COMPSOLID : 0
|
||||||
|
COMPOUND : 1
|
||||||
|
SHAPE : 10504
|
||||||
|
"
|
||||||
|
|
||||||
|
|
||||||
|
checknbshapes result -ref ${nbshapes_expected} -t -m "Shape"
|
||||||
|
checkview -display result -3d -path ${imagedir}/${test_image}.png
|
Loading…
x
Reference in New Issue
Block a user