}
+//=======================================================================
+//function : OCC30708_1
+//purpose : Tests initialization of the TopoDS_Iterator with null shape
+//=======================================================================
+static Standard_Integer OCC30708_1 (Draw_Interpretor& di, Standard_Integer, const char**)
+{
+ TopoDS_Iterator it;
+ try
+ {
+ OCC_CATCH_SIGNALS
+
+ TopoDS_Shape empty;
+ it.Initialize (empty);
+
+ }
+ catch (Standard_Failure)
+ {
+ di << "Cannot initialize TopoDS_Iterator with null shape\n";
+ return 0;
+ }
+
+ if (it.More())
+ di << "Incorrect Iterator initialization: method More() returns true on null shape\n";
+
+ return 0;
+}
+
+//=======================================================================
+//function : OCC30708_2
+//purpose : Tests initialization of the BRepLib_MakeWire with null wire
+//=======================================================================
+static Standard_Integer OCC30708_2 (Draw_Interpretor& di, Standard_Integer, const char**)
+{
+ try
+ {
+ OCC_CATCH_SIGNALS
+
+ TopoDS_Wire empty;
+ BRepLib_MakeWire aWBuilder (empty);
+ }
+ catch (Standard_Failure)
+ {
+ di << "Cannot initialize BRepLib_MakeWire with null wire\n";
+ }
+
+ return 0;
+}
void QABugs::Commands_20(Draw_Interpretor& theCommands) {
const char *group = "QABugs";
"QAEndsWith string endstring",
__FILE__, QAEndsWith, group);
+ theCommands.Add ("OCC30708_1", "Tests initialization of the TopoDS_Iterator with null shape",
+ __FILE__, OCC30708_1, group);
+
+ theCommands.Add ("OCC30708_2", "Tests initialization of the BRepLib_MakeWire with null shape",
+ __FILE__, OCC30708_2, group);
+
return;
}
myOrientation = S.Orientation();
else
myOrientation = TopAbs_FORWARD;
- myShapes.Initialize(S.TShape()->myShapes);
+
+ if (S.IsNull())
+ myShapes = TopoDS_ListIteratorOfListOfShape();
+ else
+ myShapes.Initialize(S.TShape()->myShapes);
+
if (More()) {
myShape = myShapes.Value();
myShape.Orientation(TopAbs::Compose(myOrientation,myShape.Orientation()));
- //modified by NIZNHY-PKV Fri Jan 16 07:42:30 2009f
if (!myLocation.IsIdentity())
- //modified by NIZNHY-PKV Fri Jan 16 07:42:37 2009t
myShape.Move(myLocation);
}
}
if (More()) {
myShape = myShapes.Value();
myShape.Orientation(TopAbs::Compose(myOrientation,myShape.Orientation()));
- //modified by NIZNHY-PKV Fri Jan 16 07:42:30 2009f
if (!myLocation.IsIdentity())
- //modified by NIZNHY-PKV Fri Jan 16 07:42:37 2009t
myShape.Move(myLocation);
}
}