#include <Prs3d_PointAspect.hxx>
#include <Prs3d_Presentation.hxx>
#include <Prs3d_TextAspect.hxx>
+#include <Prs3d_ToolCylinder.hxx>
+#include <Prs3d_ToolSphere.hxx>
+#include <Prs3d_ToolTorus.hxx>
#include <Image_AlienPixMap.hxx>
#include <TColStd_HArray1OfAsciiString.hxx>
theColorValues->Size() >= 2 ? theColorValues->Value (2).ToCString() : "",
theColorValues->Size() >= 3 ? theColorValues->Value (3).ToCString() : ""
};
- return ViewerTest::ParseColor (theColorValues->Size(), anArgs, theColor) != 0;
+ return Draw::ParseColor (theColorValues->Size(), anArgs, theColor) != 0;
}
static bool convertToDatumPart (const TCollection_AsciiString& theValue,
Standard_Boolean toHideLabels = Standard_True;
if (aValues->Size() == 1)
{
- ViewerTest::ParseOnOff (aValues->First().ToCString(), toHideLabels);
+ Draw::ParseOnOff (aValues->First().ToCString(), toHideLabels);
}
else if (aValues->Size() != 0)
{
Standard_Boolean toHideArrows = Standard_True;
if (aValues->Size() == 1)
{
- ViewerTest::ParseOnOff (aValues->First().ToCString(), toHideArrows);
+ Draw::ParseOnOff (aValues->First().ToCString(), toHideArrows);
}
else if (aValues->Size() != 0)
{
gp_Dir aDirection;
gp_Pnt aPos;
+
+ Handle(Font_TextFormatter) aTextFormatter;
for (; anArgIt < theArgsNb; ++anArgIt)
{
TCollection_AsciiString aParam (theArgVec[anArgIt]);
else if (aParam == "-color")
{
Quantity_Color aColor;
- Standard_Integer aNbParsed = ViewerTest::ParseColor (theArgsNb - anArgIt - 1,
- theArgVec + anArgIt + 1,
- aColor);
+ Standard_Integer aNbParsed = Draw::ParseColor (theArgsNb - anArgIt - 1,
+ theArgVec + anArgIt + 1,
+ aColor);
if (aNbParsed == 0)
{
Message::SendFail() << "Syntax error at '" << aParam << "'";
aTextPrs->SetHeight (Draw::Atof(theArgVec[anArgIt]));
}
+ else if (aParam == "-wrapping")
+ {
+ if (++anArgIt >= theArgsNb)
+ {
+ Message::SendFail() << "Syntax error: wrong number of values for parameter '" << aParam << "'";
+ return 1;
+ }
+
+ if (aTextFormatter.IsNull())
+ {
+ aTextFormatter = new Font_TextFormatter();
+ }
+ aTextFormatter->SetWrapping ((Standard_ShortReal)Draw::Atof(theArgVec[anArgIt]));
+ }
else if (aParam == "-aspect")
{
if (++anArgIt >= theArgsNb)
|| aParam == "-subtitlecolor")
{
Quantity_Color aColor;
- Standard_Integer aNbParsed = ViewerTest::ParseColor (theArgsNb - anArgIt - 1,
- theArgVec + anArgIt + 1,
- aColor);
+ Standard_Integer aNbParsed = Draw::ParseColor (theArgsNb - anArgIt - 1,
+ theArgVec + anArgIt + 1,
+ aColor);
if (aNbParsed == 0)
{
Message::SendFail() << "Syntax error at '" << aParam << "'";
}
}
+ aTextPrs->SetTextFormatter (aTextFormatter);
+
if (aHasPlane)
{
aTextPrs->SetOrientation3D (gp_Ax2 (aPos, aNormal, aDirection));
{
toShowHiddenEdges = true;
if (anArgIter + 1 < theArgNb
- && ViewerTest::ParseOnOff (theArgVec[anArgIter + 1], toShowHiddenEdges))
+ && Draw::ParseOnOff (theArgVec[anArgIter + 1], toShowHiddenEdges))
{
++anArgIter;
}
{
toShowCNEdges = true;
if (anArgIter + 1 < theArgNb
- && ViewerTest::ParseOnOff (theArgVec[anArgIter + 1], toShowCNEdges))
+ && Draw::ParseOnOff (theArgVec[anArgIter + 1], toShowCNEdges))
{
++anArgIter;
}
++anArgIter;
aContext->SetLocation (anObj, anObj2->LocalTransformation());
}
- else if (anArg == "-rotate")
+ else if (anArg == "-rotate"
+ || anArg == "-prerotate")
{
toPrintInfo = Standard_False;
if (anArgIter + 7 >= theArgNb)
Draw::Atof (theArgVec[anArgIter + 7]) * (M_PI / 180.0));
anArgIter += 7;
- aTrsf = anObj->LocalTransformation() * aTrsf;
+ if (anArg == "-prerotate")
+ {
+ aTrsf = anObj->LocalTransformation() * aTrsf;
+ }
+ else
+ {
+ aTrsf = aTrsf * anObj->LocalTransformation();
+ }
aContext->SetLocation (anObj, aTrsf);
}
- else if (anArg == "-translate")
+ else if (anArg == "-translate"
+ || anArg == "-pretranslate")
{
toPrintInfo = Standard_False;
gp_Vec aLocVec;
gp_Trsf aTrsf;
aTrsf.SetTranslationPart (aLocVec);
- aTrsf = anObj->LocalTransformation() * aTrsf;
+ if (anArg == "-pretranslate")
+ {
+ aTrsf = anObj->LocalTransformation() * aTrsf;
+ }
+ else
+ {
+ aTrsf = aTrsf * anObj->LocalTransformation();
+ }
aContext->SetLocation (anObj, aTrsf);
}
else if (anArg == "-scale"
+ || anArg == "-prescale"
|| anArg == "-setscale")
{
toPrintInfo = Standard_False;
if (toPrintScale)
{
- if (anArg == "-setscale")
+ if (anArg == "-setscale"
+ || anArg == "-prescale")
{
Message::SendFail() << "Syntax error at '" << anArg << "'";
return 1;
if (hasScaleLoc)
{
aTrsf.SetScale (aScaleLoc, aScale);
+ }
+ else
+ {
+ aTrsf.SetScaleFactor (aScale);
+ }
+
+ if (anArg == "-prescale")
+ {
aTrsf = anObj->LocalTransformation() * aTrsf;
}
else
{
- aTrsf = anObj->LocalTransformation();
- aTrsf.SetScaleFactor (aTrsf.ScaleFactor() * aScale);
+ aTrsf = aTrsf * anObj->LocalTransformation();
}
aContext->SetLocation (anObj, aTrsf);
}
}
- else if (anArg == "-mirror")
+ else if (anArg == "-mirror"
+ || anArg == "-premirror")
{
toPrintInfo = Standard_False;
if (anArgIter + 6 >= theArgNb)
Draw::Atof(theArgVec[theArgNb - 2]),
Draw::Atof(theArgVec[theArgNb - 1]))));
anArgIter += 6;
- aTrsf = anObj->LocalTransformation() * aTrsf;
+ if (anArg == "-premirror")
+ {
+ aTrsf = anObj->LocalTransformation() * aTrsf;
+ }
+ else
+ {
+ aTrsf = aTrsf * anObj->LocalTransformation();
+ }
aContext->SetLocation (anObj, aTrsf);
}
else if (anArg == "-setrotation"
aQuatArgs[2].RealValue(),
aQuatArgs[3].RealValue());
gp_Trsf aTrsf = anObj->LocalTransformation();
- aTrsf.SetRotation (aQuat);
+ aTrsf.SetRotationPart (aQuat);
aContext->SetLocation (anObj, aTrsf);
continue;
}
const TCollection_AsciiString aName (argv[anArgIter++]);
Handle(AIS_MultipleConnectedInteractive) aMultiConObject;
TCollection_AsciiString aColorString (argv[argc-1]);
- Standard_CString aColorName = "";
+ Quantity_Color aColor;
Standard_Boolean hasColor = Standard_False;
if (aColorString.Search ("color=") != -1)
{
hasColor = Standard_True;
aColorString.Remove (1, 6);
- aColorName = aColorString.ToCString();
+ if (!Quantity_Color::ColorFromName (aColorString.ToCString(), aColor))
+ {
+ Message::SendFail() << "Syntax error at " << aColorString;
+ return 1;
+ }
}
const Standard_Integer aNbShapes = hasColor ? (argc - 1) : argc;
anObject = aConnectedOrig;
aContext->Load (anObject);
- anObject->SetColor (ViewerTest::GetColorFromName (aColorName));
+ anObject->SetColor (aColor);
}
if (aMultiConObject.IsNull())
{
bool aVal = true;
if (anArgIter + 1 < theNbArgs
- && ViewerTest::ParseOnOff(theArgVec[anArgIter + 1], aVal))
+ && Draw::ParseOnOff(theArgVec[anArgIter + 1], aVal))
{
++anArgIter;
}
}
}
if (anObjNames.Size() < 2
- || !ViewerTest::ParseOnOff (anObjNames.Last().ToCString(), toTurnOn))
+ || !Draw::ParseOnOff (anObjNames.Last().ToCString(), toTurnOn))
{
Message::SendFail ("Syntax error: wrong number of arguments");
return 1;
return 0;
}
+//===========================================================================
+//function : VTorus
+//purpose : creates and displays a torus or torus segment
+//===========================================================================
+static Standard_Integer VTorus (Draw_Interpretor& /*di*/,
+ Standard_Integer theNbArgs,
+ const char** theArgVec)
+{
+ if (ViewerTest::GetAISContext().IsNull())
+ {
+ Message::SendFail ("Error: no active viewer");
+ return 1;
+ }
+
+ TCollection_AsciiString aName;
+ Standard_Integer aNbSlices = 100, aNbStacks = 100;
+ Standard_Real aMajorRad = -1.0, aMinorRad = -1.0;
+ Standard_Real aPipeAngle = 360.0, aSegAngle1 = 0.0, aSegAngle2 = 360.0;
+ Standard_Real anAngles[3] = { -1.0, -1.0, -1.0 };
+ ViewerTest_AutoUpdater anUpdateTool (ViewerTest::GetAISContext(), ViewerTest::CurrentView());
+ for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter)
+ {
+ TCollection_AsciiString anArg (theArgVec[anArgIter]);
+ anArg.LowerCase();
+ if (anUpdateTool.parseRedrawMode (anArg))
+ {
+ continue;
+ }
+ else if (anArgIter + 1 < theNbArgs
+ && (anArg == "-nbslices"
+ || anArg == "-slices")
+ && Draw::ParseInteger (theArgVec[anArgIter + 1], aNbSlices))
+ {
+ ++anArgIter;
+ }
+ else if (anArgIter + 1 < theNbArgs
+ && (anArg == "-nbstacks"
+ || anArg == "-stacks")
+ && Draw::ParseInteger (theArgVec[anArgIter + 1], aNbStacks))
+ {
+ ++anArgIter;
+ }
+ else if (anArgIter + 1 < theNbArgs
+ && (anArg == "-radius"
+ || anArg == "-majorradius")
+ && Draw::ParseReal (theArgVec[anArgIter + 1], aMajorRad))
+ {
+ ++anArgIter;
+ }
+ else if (anArgIter + 1 < theNbArgs
+ && (anArg == "-piperadius"
+ || anArg == "-minoradius")
+ && Draw::ParseReal (theArgVec[anArgIter + 1], aMinorRad))
+ {
+ ++anArgIter;
+ }
+ else if (anArgIter + 1 < theNbArgs
+ && (anArg == "-pipeangle"
+ || anArg == "-angle")
+ && Draw::ParseReal (theArgVec[anArgIter + 1], aPipeAngle))
+ {
+ ++anArgIter;
+ }
+ else if (anArgIter + 1 < theNbArgs
+ && (anArg == "-segmentanglefrom"
+ || anArg == "-seganglefrom"
+ || anArg == "-segmentangle1"
+ || anArg == "-segangle1")
+ && Draw::ParseReal (theArgVec[anArgIter + 1], aSegAngle1))
+ {
+ ++anArgIter;
+ }
+ else if (anArgIter + 1 < theNbArgs
+ && (anArg == "-segmentangleto"
+ || anArg == "-segangleto"
+ || anArg == "-segmentangle2"
+ || anArg == "-segangle2")
+ && Draw::ParseReal (theArgVec[anArgIter + 1], aSegAngle2))
+ {
+ ++anArgIter;
+ }
+ else if (aName.IsEmpty())
+ {
+ aName = theArgVec[anArgIter];
+ }
+ else if (aMajorRad < 0.0
+ && Draw::ParseReal (theArgVec[anArgIter], aMajorRad))
+ {
+ //
+ }
+ else if (aMinorRad < 0.0
+ && Draw::ParseReal (theArgVec[anArgIter], aMinorRad))
+ {
+ //
+ }
+ else if (anAngles[0] < 0.0
+ && Draw::ParseReal (theArgVec[anArgIter], anAngles[0]))
+ {
+ //
+ }
+ else if (anAngles[1] < 0.0
+ && Draw::ParseReal (theArgVec[anArgIter], anAngles[1]))
+ {
+ //
+ }
+ else if (anAngles[2] < 0.0
+ && Draw::ParseReal (theArgVec[anArgIter], anAngles[2]))
+ {
+ //
+ }
+ else
+ {
+ Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'";
+ return 1;
+ }
+ }
+
+ if (anAngles[2] > 0.0)
+ {
+ aSegAngle1 = anAngles[0];
+ aSegAngle2 = anAngles[1];
+ aPipeAngle = anAngles[2];
+ }
+ else if (anAngles[1] > 0.0)
+ {
+ aSegAngle1 = anAngles[0];
+ aSegAngle2 = anAngles[1];
+ }
+ else if (anAngles[0] > 0.0)
+ {
+ aPipeAngle = anAngles[0];
+ }
+
+ aSegAngle1 = aSegAngle1 * (M_PI / 180.0);
+ aSegAngle2 = aSegAngle2 * (M_PI / 180.0);
+ aPipeAngle = aPipeAngle * (M_PI / 180.0);
+
+ if (aMajorRad <= 0 || aMinorRad <= 0 || aNbSlices <= 0 || aNbStacks <= 0
+ || Abs(aSegAngle2 - aSegAngle1) <= Precision::Angular()
+ || Abs(aPipeAngle) <= Precision::Angular())
+ {
+ Message::SendFail ("Syntax error: wrong parameters");
+ return 1;
+ }
+
+ Handle(Graphic3d_ArrayOfTriangles) aTriangles = Prs3d_ToolTorus::Create (aMajorRad, aMinorRad, aSegAngle1, aSegAngle2, aPipeAngle, aNbSlices, aNbStacks, gp_Trsf());
+ Handle(AIS_InteractiveObject) anIO = new MyPArrayObject (aTriangles);
+ ViewerTest::Display (aName, anIO, false);
+ return 0;
+}
+
+//===========================================================================
+//function : VCylinder
+//purpose : creates and displays a cylinder
+//===========================================================================
+static Standard_Integer VCylinder (Draw_Interpretor& /*di*/,
+ Standard_Integer theNbArgs,
+ const char** theArgVec)
+{
+ if (ViewerTest::GetAISContext().IsNull())
+ {
+ Message::SendFail ("Error: no active viewer");
+ return 1;
+ }
+
+ TCollection_AsciiString aName;
+ Standard_Integer aNbSlices = 100, aNbStacks = 1;
+ Standard_Real aBotRad = -1.0, aTopRad = -1.0, aHeight = -1.0;
+ ViewerTest_AutoUpdater anUpdateTool (ViewerTest::GetAISContext(), ViewerTest::CurrentView());
+ for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter)
+ {
+ TCollection_AsciiString anArg (theArgVec[anArgIter]);
+ anArg.LowerCase();
+ if (anUpdateTool.parseRedrawMode (anArg))
+ {
+ continue;
+ }
+ else if (anArgIter + 1 < theNbArgs
+ && (anArg == "-nbslices"
+ || anArg == "-slices")
+ && Draw::ParseInteger (theArgVec[anArgIter + 1], aNbSlices))
+ {
+ ++anArgIter;
+ }
+ else if (anArgIter + 1 < theNbArgs
+ && (anArg == "-nbstacks"
+ || anArg == "-stacks")
+ && Draw::ParseInteger (theArgVec[anArgIter + 1], aNbStacks))
+ {
+ ++anArgIter;
+ }
+ else if (anArgIter + 1 < theNbArgs
+ && anArg == "-radius"
+ && Draw::ParseReal (theArgVec[anArgIter + 1], aBotRad))
+ {
+ aTopRad = aBotRad;
+ ++anArgIter;
+ }
+ else if (anArgIter + 1 < theNbArgs
+ && anArg == "-bottomradius"
+ && Draw::ParseReal (theArgVec[anArgIter + 1], aBotRad))
+ {
+ ++anArgIter;
+ }
+ else if (anArgIter + 1 < theNbArgs
+ && anArg == "-topradius"
+ && Draw::ParseReal (theArgVec[anArgIter + 1], aTopRad))
+ {
+ ++anArgIter;
+ }
+ else if (anArgIter + 1 < theNbArgs
+ && anArg == "-height"
+ && Draw::ParseReal (theArgVec[anArgIter + 1], aHeight))
+ {
+ ++anArgIter;
+ }
+ else if (aName.IsEmpty())
+ {
+ aName = theArgVec[anArgIter];
+ }
+ else if (aBotRad < 0.0
+ && Draw::ParseReal (theArgVec[anArgIter], aBotRad))
+ {
+ //
+ }
+ else if (aTopRad < 0.0
+ && Draw::ParseReal (theArgVec[anArgIter], aTopRad))
+ {
+ //
+ }
+ else if (aHeight < 0.0
+ && Draw::ParseReal (theArgVec[anArgIter], aHeight))
+ {
+ //
+ }
+ else
+ {
+ Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'";
+ return 1;
+ }
+ }
+
+ if (aBotRad < 0 || aTopRad < 0 || aHeight <= 0 || aNbSlices < 3)
+ {
+ Message::SendFail ("Syntax error: wrong parameters");
+ return 1;
+ }
+
+ Handle(Graphic3d_ArrayOfTriangles) aTriangles = Prs3d_ToolCylinder::Create (aBotRad, aTopRad, aHeight, aNbSlices, aNbStacks, gp_Trsf());
+ Handle(AIS_InteractiveObject) anIO = new MyPArrayObject (aTriangles);
+ ViewerTest::Display (aName, anIO, false);
+ return 0;
+}
+
+//===========================================================================
+//function : VSphere
+//purpose : creates and displays a sphere
+//===========================================================================
+static Standard_Integer VSphere (Draw_Interpretor& /*di*/,
+ Standard_Integer theNbArgs,
+ const char** theArgVec)
+{
+ if (ViewerTest::GetAISContext().IsNull())
+ {
+ Message::SendFail ("Error: no active viewer");
+ return 1;
+ }
+
+ TCollection_AsciiString aName;
+ Standard_Integer aNbSlices = 100, aNbStacks = 100;
+ Standard_Real aRad = -1.0;
+ ViewerTest_AutoUpdater anUpdateTool (ViewerTest::GetAISContext(), ViewerTest::CurrentView());
+ for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter)
+ {
+ TCollection_AsciiString anArg (theArgVec[anArgIter]);
+ anArg.LowerCase();
+ if (anUpdateTool.parseRedrawMode (anArg))
+ {
+ continue;
+ }
+ else if (anArgIter + 1 < theNbArgs
+ && (anArg == "-nbslices"
+ || anArg == "-slices")
+ && Draw::ParseInteger (theArgVec[anArgIter + 1], aNbSlices))
+ {
+ ++anArgIter;
+ }
+ else if (anArgIter + 1 < theNbArgs
+ && (anArg == "-nbstacks"
+ || anArg == "-stacks")
+ && Draw::ParseInteger (theArgVec[anArgIter + 1], aNbStacks))
+ {
+ ++anArgIter;
+ }
+ else if (anArgIter + 1 < theNbArgs
+ && anArg == "-radius"
+ && Draw::ParseReal (theArgVec[anArgIter + 1], aRad))
+ {
+ ++anArgIter;
+ }
+ else if (aName.IsEmpty())
+ {
+ aName = theArgVec[anArgIter];
+ }
+ else if (aRad < 0.0
+ && Draw::ParseReal (theArgVec[anArgIter], aRad))
+ {
+ //
+ }
+ else
+ {
+ Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'";
+ return 1;
+ }
+ }
+
+ if (aRad <= 0 || aNbSlices <= 0 || aNbStacks <= 0)
+ {
+ Message::SendFail ("Syntax error: wrong parameters");
+ return 1;
+ }
+
+ Handle(Graphic3d_ArrayOfTriangles) aTriangles = Prs3d_ToolSphere::Create (aRad, aNbSlices, aNbStacks, gp_Trsf());
+ Handle(AIS_InteractiveObject) anIO = new MyPArrayObject (aTriangles);
+ ViewerTest::Display (aName, anIO, false);
+ return 0;
+}
+
//=======================================================================
//function : VObjZLayer
//purpose : Set or get z layer id for presentable object
aPresentation->Clear();
if (!myMarkerAspect.IsNull())
{
- Prs3d_Root::CurrentGroup (aPresentation)->SetGroupPrimitivesAspect (myMarkerAspect);
+ aPresentation->CurrentGroup()->SetGroupPrimitivesAspect (myMarkerAspect);
}
- Prs3d_Root::CurrentGroup (aPresentation)->AddPrimitiveArray (anArray);
+ aPresentation->CurrentGroup()->AddPrimitiveArray (anArray);
}
void ViewerTest_MarkersArrayObject::ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,
return 1;
}
- ViewerTest::ParseOnOff (theArgVec[anArgIt], anIsCompositeCurve);
+ Draw::ParseOnOff (theArgVec[anArgIt], anIsCompositeCurve);
}
else if (aParam == "-plane")
{
aMgr->RegisterFont (aFont, Standard_True);
theDI << aFont->ToString();
}
+ else if (anArgCase == "-aliases")
+ {
+ TCollection_AsciiString anAliasName;
+ TColStd_SequenceOfHAsciiString aNames;
+ if (anArgIter + 1 < theArgNb
+ && *theArgVec[anArgIter + 1] != '-')
+ {
+ anAliasName = theArgVec[++anArgIter];
+ }
+ if (!anAliasName.IsEmpty())
+ {
+ aMgr->GetFontAliases (aNames, anAliasName);
+ }
+ else
+ {
+ aMgr->GetAllAliases (aNames);
+ }
+ for (TColStd_SequenceOfHAsciiString::Iterator aNameIter (aNames); aNameIter.More(); aNameIter.Next())
+ {
+ theDI << "{" << aNameIter.Value()->String() << "} ";
+ }
+ }
+ else if (anArgIter + 2 < theArgNb
+ && anArgCase == "-addalias")
+ {
+ TCollection_AsciiString anAliasName(theArgVec[++anArgIter]);
+ TCollection_AsciiString aFontName (theArgVec[++anArgIter]);
+ aMgr->AddFontAlias (anAliasName, aFontName);
+ }
+ else if (anArgIter + 2 < theArgNb
+ && anArgCase == "-removealias")
+ {
+ TCollection_AsciiString anAliasName(theArgVec[++anArgIter]);
+ TCollection_AsciiString aFontName (theArgVec[++anArgIter]);
+ aMgr->RemoveFontAlias (anAliasName, aFontName);
+ }
+ else if (anArgIter + 1 < theArgNb
+ && anArgCase == "-clearalias")
+ {
+ TCollection_AsciiString anAliasName(theArgVec[++anArgIter]);
+ aMgr->RemoveFontAlias (anAliasName, "");
+ }
+ else if (anArgCase == "-clearaliases")
+ {
+ aMgr->RemoveFontAlias ("", "");
+ }
else if (anArgCase == "-verbose"
|| anArgCase == "-trace")
{
bool toEnable = true;
if (anArgIter + 1 < theArgNb
- && ViewerTest::ParseOnOff (theArgVec[anArgIter + 1], toEnable))
+ && Draw::ParseOnOff (theArgVec[anArgIter + 1], toEnable))
{
++anArgIter;
}
{
bool toEnable = true;
if (anArgIter + 1 < theArgNb
- && ViewerTest::ParseOnOff (theArgVec[anArgIter + 1], toEnable))
+ && Draw::ParseOnOff (theArgVec[anArgIter + 1], toEnable))
{
++anArgIter;
}
DBRep_DrawableShape::addSurfaceNormals (aNormalMap, myshape, NormalLength, NbAlongU, NbAlongV);
}
- Handle(Graphic3d_Group) aPrsGroup = Prs3d_Root::NewGroup (thePrs);
+ Handle(Graphic3d_Group) aPrsGroup = thePrs->NewGroup();
aPrsGroup->SetGroupPrimitivesAspect (myDrawer->ArrowAspect()->Aspect());
const Standard_Real aArrowAngle = myDrawer->ArrowAspect()->Angle();
TCollection_AsciiString aParam (theArgs[anArgIter]);
aParam.LowerCase();
if (anArgIter == 2
- && ViewerTest::ParseOnOff (aParam.ToCString(), isOn))
+ && Draw::ParseOnOff (aParam.ToCString(), isOn))
{
continue;
}
{
isOriented = Standard_True;
if (anArgIter + 1 < theArgNum
- && ViewerTest::ParseOnOff (theArgs[anArgIter + 1], isOriented))
+ && Draw::ParseOnOff (theArgs[anArgIter + 1], isOriented))
{
++anArgIter;
}
"\n\t\t: [-angle angle=0]"
"\n\t\t: [-zoom {0|1}=0]"
"\n\t\t: [-height height=16]"
+ "\n\t\t: [-wrapping width=40]"
"\n\t\t: [-aspect {regular|bold|italic|boldItalic}=regular]"
"\n\t\t: [-font font=Times]"
"\n\t\t: [-2d]"
theCommands.Add ("vlocation",
"vlocation name"
- "\n\t\t: [-reset]"
- "\n\t\t: [-copyFrom otherName]"
- "\n\t\t: [-translate X Y [Z]]"
- "\n\t\t: [-rotate x y z dx dy dz angle]"
- "\n\t\t: [-scale [X Y Z] scale]"
- "\n\t\t: [-mirror x y z dx dy dz]"
- "\n\t\t: [-setLocation X Y [Z]]"
- "\n\t\t: [-setRotation QX QY QZ QW]"
- "\n\t\t: [-setScale [X Y Z] scale]"
- "\n\t\t: [-inheritParentTrsf {on|off}]"
+ "\n\t\t: [-reset] [-copyFrom otherName]"
+ "\n\t\t: [-translate X Y [Z]] [-rotate x y z dx dy dz angle] [-scale [X Y Z] scale]"
+ "\n\t\t: [-pretranslate X Y [Z]] [-prerotate x y z dx dy dz angle] [-prescale [X Y Z] scale]"
+ "\n\t\t: [-mirror x y z dx dy dz] [-premirror x y z dx dy dz]"
+ "\n\t\t: [-setLocation X Y [Z]] [-setRotation QX QY QZ QW] [-setScale [X Y Z] scale]"
"\n\t\t: Object local transformation management:"
- "\n\t\t: -reset reset transformation to identity"
- "\n\t\t: -translate translate object"
- "\n\t\t: -rotate applies rotation to local transformation"
- "\n\t\t: -scale applies scale to local transformation"
- "\n\t\t: -mirror applies mirror to local transformation"
- "\n\t\t: -setLocation assign object location"
- "\n\t\t: -setRotation assign object rotation (quaternion)"
- "\n\t\t: -setScale assign object scale factor"
- "\n\t\t: -inheritParentTrsf option to inherit parent"
- "\n\t\t: transformation or not (ON by default)",
+ "\n\t\t: -reset resets transformation to identity"
+ "\n\t\t: -translate applies translation vector"
+ "\n\t\t: -rotate applies rotation around axis"
+ "\n\t\t: -scale applies scale factor with optional anchor"
+ "\n\t\t: -mirror applies mirror transformation"
+ "\n\t\t: -pretranslate pre-multiplies translation vector"
+ "\n\t\t: -prerotate pre-multiplies rotation around axis"
+ "\n\t\t: -prescale pre-multiplies scale transformation"
+ "\n\t\t: -premirror pre-multiplies mirror transformation"
+ "\n\t\t: -setLocation overrides translation part"
+ "\n\t\t: -setRotation overrides rotation part with specified quaternion"
+ "\n\t\t: -setScale overrides scale factor",
__FILE__, VSetLocation, group);
theCommands.Add ("vsetlocation",
"alias for vlocation",
"\n\t\t: Creates and displays a segment from named points.",
__FILE__, VTriangle,group);
+ theCommands.Add ("vtorus",
+ "vtorus name [R1 R2 [Angle1=0 Angle2=360] [Angle=360]]"
+ "\n\t\t: [-radius R1] [-pipeRadius R2]"
+ "\n\t\t: [-pipeAngle Angle=360] [-segmentAngle1 Angle1=0 -segmentAngle2 Angle2=360]"
+ "\n\t\t: [-nbSlices Number=100] [-nbStacks Number=100] [-noupdate]"
+ "\n\t\t: Creates and displays a torus or torus segment."
+ "\n\t\t: Parameters of the torus :"
+ "\n\t\t: - R1 distance from the center of the pipe to the center of the torus"
+ "\n\t\t: - R2 radius of the pipe"
+ "\n\t\t: - Angle1 first angle to create a torus ring segment"
+ "\n\t\t: - Angle2 second angle to create a torus ring segment"
+ "\n\t\t: - Angle angle to create a torus pipe segment",
+ __FILE__, VTorus, group);
+
+ theCommands.Add ("vcylinder",
+ "vcylinder name [R1 R2 Height] [-height H] [-radius R] [-bottomRadius R1 -topRadius R2]"
+ "\n\t\t: [-nbSlices Number=100] [-noupdate]"
+ "\n\t\t: Creates and displays a cylinder."
+ "\n\t\t: Parameters of the cylinder :"
+ "\n\t\t: - R1 cylinder bottom radius"
+ "\n\t\t: - R2 cylinder top radius"
+ "\n\t\t: - Height cylinder height",
+ __FILE__, VCylinder, group);
+
+ theCommands.Add ("vsphere",
+ "vsphere name [-radius] R"
+ "\n\t\t: [-nbSlices Number=100] [-nbStacks Number=100] [-noupdate]"
+ "\n\t\t: Creates and displays a sphere.",
+ __FILE__, VSphere, group);
+
theCommands.Add("vobjzlayer",
"vobjzlayer : set/get object [layerid] - set or get z layer id for the interactive object",
__FILE__, VObjZLayer, group);
"\n\t\t: [-findAll fontNameMask] [-findInfo fontName]"
"\n\t\t: [-unicodeFallback {on|off}]"
"\n\t\t: [-clear] [-init] [-list] [-names]"
+ "\n\t\t: [-aliases [aliasName]] [-addAlias Alias FontName] [-removeAlias Alias FontName] [-clearAlias Alias] [-clearAliases]"
"\n\t\t: Work with font registry - register font, list available fonts, find font."
"\n\t\t: -findAll is same as -find, but can print more than one font when mask is passed."
"\n\t\t: -findInfo is same as -find, but prints complete font information instead of family name.",