1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56: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:
jgv 2021-04-13 16:03:21 +03:00 committed by bugmaster
parent 93e453aa02
commit 1294d5e39e
2 changed files with 27 additions and 3 deletions

View File

@ -2969,13 +2969,25 @@ void BRepFill_Sweep::Build(TopTools_MapOfShape& ReversedEdges,
// Construction of the shell
TopoDS_Shell shell;
B.MakeShell(shell);
Standard_Integer aNbFaces = 0;
for (ipath=1; ipath<=NbPath; ipath++)
for (isec=1; isec <=NbLaw; isec++) {
const TopoDS_Shape& face = myFaces->Value(isec, ipath);
for (isec=1; isec <=NbLaw; isec++)
{
const TopoDS_Shape& face = myFaces->Value(isec, ipath);
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);
for (; It.More(); It.Next()) {
const TopoDS_Shape& face = It.Value();

View 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