1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40: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

@@ -42,17 +42,6 @@ static void ShapeEnumToString(const TopAbs_ShapeEnum T, TCollection_AsciiString&
else if (T == TopAbs_EDGE) N = "e";
else if (T == TopAbs_VERTEX) N = "v";
}
static void OrientationToString(const TopAbs_Orientation o, TCollection_AsciiString& N)
{
switch (o) {
case TopAbs_FORWARD : N = "FORWARD" ; break;
case TopAbs_REVERSED : N = "REVERSED"; break;
case TopAbs_INTERNAL : N = "INTERNAL"; break;
case TopAbs_EXTERNAL : N = "EXTERNAL"; break;
}
}
#endif
#ifdef OCCT_DEBUG
@@ -684,8 +673,7 @@ TCollection_AsciiString TopOpeBRepBuild_ShapeSet::SNameori(const TopoDS_Shape& S
{
TCollection_AsciiString str;
str=sb+SName(S);
TopAbs_Orientation o = S.Orientation();
TCollection_AsciiString sto;OrientationToString(o,sto);
TCollection_AsciiString sto = TopAbs::ShapeOrientationToString (S.Orientation());
str=str+sto.SubString(1,1);
str=str+sa;
return str;

View File

@@ -17,20 +17,8 @@
#ifdef DRAW
#include <DBRep.hxx>
static TCollection_AsciiString PRODINS("dins ");
static void OrientationToString(const TopAbs_Orientation o, TCollection_AsciiString& N)
{
switch (o) {
case TopAbs_FORWARD : N = "FORWARD" ; break;
case TopAbs_REVERSED : N = "REVERSED"; break;
case TopAbs_INTERNAL : N = "INTERNAL"; break;
case TopAbs_EXTERNAL : N = "EXTERNAL"; break;
}
}
#endif
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Surface.hxx>
@@ -586,10 +574,10 @@ TCollection_AsciiString TopOpeBRepBuild_WireEdgeSet::SNameVEE(const TopoDS_Shape
TopAbs_Orientation oVE1,oVE2; Standard_Boolean conn = VertexConnectsEdges(V,E1,E2,oVE1,oVE2);
str=SName(VV)+" ";
str=str+SNameori(E1)+" V/E1 : ";
TCollection_AsciiString so1;OrientationToString(oVE1,so1);so1.UpperCase();
TCollection_AsciiString so1 = TopAbs::ShapeOrientationToString (oVE1);
str=str+so1.SubString(1,1)+" ";
str=str+SNameori(E2)+" V/E2 : ";
TCollection_AsciiString so2;OrientationToString(oVE2,so2);so2.UpperCase();
TCollection_AsciiString so2 = TopAbs::ShapeOrientationToString (oVE2);
str=str+so2.SubString(1,1)+" ";
return str;
}