1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-24 13:50:49 +03:00

0028646: Draw Harness, ViewerTest - rename vsetfilter command with vselfilter

TopAbs::ShapeTypeToString() is now used instead of duplicating TopAbs_ShapeEnum printing code.
vselmode now accepts shape type string for activating standard AIS_Shape selection modes.
This commit is contained in:
kgv
2017-05-16 16:37:18 +03:00
committed by abv
parent c9776c7ac0
commit d2e6068829
17 changed files with 198 additions and 505 deletions

View File

@@ -1019,65 +1019,22 @@ void DBRep_DrawableShape::Dump(Standard_OStream& S)const
void DBRep_DrawableShape::Whatis(Draw_Interpretor& s)const
{
if (!myShape.IsNull()) {
s << "shape ";
switch (myShape.ShapeType()) {
case TopAbs_COMPOUND :
s << "COMPOUND";
break;
case TopAbs_COMPSOLID :
s << "COMPSOLID";
break;
case TopAbs_SOLID :
s << "SOLID";
break;
case TopAbs_SHELL :
s << "SHELL";
break;
case TopAbs_FACE :
s << "FACE";
break;
case TopAbs_WIRE :
s << "WIRE";
break;
case TopAbs_EDGE :
s << "EDGE";
break;
case TopAbs_VERTEX :
s << "VERTEX";
break;
case TopAbs_SHAPE :
s << "SHAPE";
break;
}
if (myShape.IsNull())
{
return;
}
s << " ";
s << "shape " << TopAbs::ShapeTypeToString (myShape.ShapeType())
<< " " << TopAbs::ShapeOrientationToString(myShape.Orientation());
switch (myShape.Orientation()) {
case TopAbs_FORWARD :
s << "FORWARD";
break;
case TopAbs_REVERSED :
s << "REVERSED";
break;
case TopAbs_INTERNAL :
s << "INTERNAL";
break;
case TopAbs_EXTERNAL :
s << "EXTERNAL";
break;
}
if (myShape.Free()) s <<" Free";
if (myShape.Modified()) s <<" Modified";
if (myShape.Orientable()) s <<" Orientable";
if (myShape.Closed()) s <<" Closed";
if (myShape.Infinite()) s <<" Infinite";
if (myShape.Convex()) s <<" Convex";
}
if (myShape.Free()) s <<" Free";
if (myShape.Modified()) s <<" Modified";
if (myShape.Orientable()) s <<" Orientable";
if (myShape.Closed()) s <<" Closed";
if (myShape.Infinite()) s <<" Infinite";
if (myShape.Convex()) s <<" Convex";
}
//=======================================================================
//function : LastPick
//purpose :