mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user