mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0031984: Modeling Algorithms - Sweep crashes if Bi-normal is given
Small modification in BRepFill_Sweep: to avoid exception, return status NotDone if construction of pipe surface fails.
This commit is contained in:
parent
2c8eacb996
commit
dd56857183
@ -2969,13 +2969,25 @@ void BRepFill_Sweep::Build(TopTools_MapOfShape& ReversedEdges,
|
|||||||
// Construction of the shell
|
// Construction of the shell
|
||||||
TopoDS_Shell shell;
|
TopoDS_Shell shell;
|
||||||
B.MakeShell(shell);
|
B.MakeShell(shell);
|
||||||
|
Standard_Integer aNbFaces = 0;
|
||||||
for (ipath=1; ipath<=NbPath; ipath++)
|
for (ipath=1; ipath<=NbPath; ipath++)
|
||||||
for (isec=1; isec <=NbLaw; isec++) {
|
for (isec=1; isec <=NbLaw; isec++)
|
||||||
const TopoDS_Shape& face = myFaces->Value(isec, ipath);
|
{
|
||||||
|
const TopoDS_Shape& face = myFaces->Value(isec, ipath);
|
||||||
if (!face.IsNull() &&
|
if (!face.IsNull() &&
|
||||||
(face.ShapeType() == TopAbs_FACE) ) B.Add(shell, face);
|
(face.ShapeType() == TopAbs_FACE) )
|
||||||
|
{
|
||||||
|
B.Add(shell, face);
|
||||||
|
aNbFaces++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (aNbFaces == 0)
|
||||||
|
{
|
||||||
|
isDone = Standard_False;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
TopTools_ListIteratorOfListOfShape It(myAuxShape);
|
TopTools_ListIteratorOfListOfShape It(myAuxShape);
|
||||||
for (; It.More(); It.Next()) {
|
for (; It.More(); It.Next()) {
|
||||||
const TopoDS_Shape& face = It.Value();
|
const TopoDS_Shape& face = It.Value();
|
||||||
|
12
tests/bugs/modalg_7/bug31984
Normal file
12
tests/bugs/modalg_7/bug31984
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
puts "=============================================="
|
||||||
|
puts " 0031984: Sweep crashes if Bi-normal is given"
|
||||||
|
puts "=============================================="
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
restore [locate_data_file bug31984.brep] a
|
||||||
|
explode a
|
||||||
|
|
||||||
|
mksweep a_1
|
||||||
|
addsweep a_2
|
||||||
|
setsweep -CN 0 0 1
|
||||||
|
buildsweep result
|
Loading…
x
Reference in New Issue
Block a user