mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-16 10:08:36 +03:00
0027946: Out of range item access in offset algorithm
Out of range access has been eliminated.
This commit is contained in:
parent
c4a2f61e57
commit
d1d68ce714
@ -1452,6 +1452,8 @@ void BRepOffset_Inter2d::ConnexIntByInt
|
|||||||
TopoDS_Shape aLocalWire = W .Oriented(TopAbs_FORWARD);
|
TopoDS_Shape aLocalWire = W .Oriented(TopAbs_FORWARD);
|
||||||
TopoDS_Shape aLocalFace = FI.Oriented(TopAbs_FORWARD);
|
TopoDS_Shape aLocalFace = FI.Oriented(TopAbs_FORWARD);
|
||||||
wexp.Init(TopoDS::Wire(aLocalWire),TopoDS::Face(aLocalFace));
|
wexp.Init(TopoDS::Wire(aLocalWire),TopoDS::Face(aLocalFace));
|
||||||
|
if (!wexp.More())
|
||||||
|
continue; // Protection from case when explorer does not contain edges.
|
||||||
// wexp.Init(TopoDS::Wire(W .Oriented(TopAbs_FORWARD)),
|
// wexp.Init(TopoDS::Wire(W .Oriented(TopAbs_FORWARD)),
|
||||||
// TopoDS::Face(FI.Oriented(TopAbs_FORWARD)));
|
// TopoDS::Face(FI.Oriented(TopAbs_FORWARD)));
|
||||||
CurE = FirstE = wexp.Current();
|
CurE = FirstE = wexp.Current();
|
||||||
|
17
tests/bugs/modalg_6/bug27907
Normal file
17
tests/bugs/modalg_6/bug27907
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "OCC27907"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
#################################################
|
||||||
|
# Exception during offset computation
|
||||||
|
#################################################
|
||||||
|
|
||||||
|
restore [locate_data_file bug27907.brep] s
|
||||||
|
|
||||||
|
# Perform test.
|
||||||
|
offsetparameter 1e-7 p i
|
||||||
|
offsetload s 10
|
||||||
|
offsetperform result
|
||||||
|
|
||||||
|
# Check result validity.
|
||||||
|
checkshape result
|
17
tests/bugs/modalg_6/bug27907_1
Normal file
17
tests/bugs/modalg_6/bug27907_1
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "OCC27907"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
#################################################
|
||||||
|
# Exception during offset computation
|
||||||
|
#################################################
|
||||||
|
|
||||||
|
restore [locate_data_file bug27907_1.brep] s
|
||||||
|
|
||||||
|
# Perform test.
|
||||||
|
offsetparameter 1e-7 p i
|
||||||
|
offsetload s 10
|
||||||
|
offsetperform result
|
||||||
|
|
||||||
|
# Check result validity.
|
||||||
|
checkshape result
|
Loading…
x
Reference in New Issue
Block a user