return 0;
}
+static Standard_Integer QANullifyShape(Draw_Interpretor& di,
+ Standard_Integer n,
+ const char** a)
+{
+ if (n != 2) {
+ di << "Wrong usage.\n";
+ di << "Usage: QANullifyShape shape\n";
+ return 1;
+ }
+ TopoDS_Shape aShape = DBRep::Get(a[1]);
+ aShape.Nullify();
+ DBRep::Set(a[1], aShape);
+ return 0;
+}
+
void QABugs::Commands_20(Draw_Interpretor& theCommands) {
const char *group = "QABugs";
"OCC31785 file.xbf : test reading XBF file in another thread",
__FILE__, OCC31785, group);
+
+ theCommands.Add("QANullifyShape",
+ "Nullify shape. Usage: QANullifyShape shape",
+ __FILE__, QANullifyShape, group);
+
return;
}
//! Destroys the reference to the underlying shape
//! stored in this shape. As a result, this shape becomes null.
- void Nullify() { myTShape.Nullify(); }
+ void Nullify()
+ {
+ myTShape.Nullify();
+ myLocation.Clear();
+ myOrient = TopAbs_EXTERNAL;
+ }
//! Returns the shape local coordinate system.
const TopLoc_Location& Location() const { return myLocation; }
--- /dev/null
+puts "=========="
+puts "0029827: Modeling Data - TopoDS_Shape::Nullify() does not reset location"
+puts "=========="
+puts ""
+
+pload QAcommands
+
+box b1 1 2 1
+box b2 1 1 1
+
+ttranslate b1 0 1 1
+ttranslate b2 1 1 1
+
+QANullifyShape b1
+QANullifyShape b2
+
+set result [compare b1 b2]
+
+set ctr { "same shapes" "equal shapes" }
+
+foreach data ${ctr} {
+ if ![regexp $data $result] {
+ puts "Error: Shapes are not '$data'"
+ break;
+ }
+}
\ No newline at end of file