mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0029827: Modeling Data - TopoDS_Shape::Nullify() does not reset location
TopoDS_Shape::Nullify() nullify not only myTShape but myLocation and myOrient. Nullified shapes are equal and same now. Added test.
This commit is contained in:
@@ -3870,6 +3870,21 @@ static Standard_Integer OCC31785 (Draw_Interpretor& theDI,
|
||||
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";
|
||||
|
||||
@@ -3945,5 +3960,10 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) {
|
||||
"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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user