// 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();
--- /dev/null
+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