From: kgv Date: Thu, 10 Jan 2019 12:36:23 +0000 (+0300) Subject: 0029670: Draw Harness - vtrihedron xaxis zaxis is wrong X-Git-Tag: V7_4_0_beta~268 X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff_plain;h=169c944c4b3fc54a4b85096c879c187337b1714e 0029670: Draw Harness - vtrihedron xaxis zaxis is wrong Fixed gp_Ax2 initialization by two vectors. Fixed -labels arguments number check. --- diff --git a/src/ViewerTest/ViewerTest_ObjectCommands.cxx b/src/ViewerTest/ViewerTest_ObjectCommands.cxx index 68cb3b7082..85be1290d3 100644 --- a/src/ViewerTest/ViewerTest_ObjectCommands.cxx +++ b/src/ViewerTest/ViewerTest_ObjectCommands.cxx @@ -339,8 +339,7 @@ namespace return Standard_False; } - aComponent->SetXDirection(aXDir); - aComponent->SetDirection (aZDir); + aComponent->SetAx2 (gp_Ax2 (aComponent->Location(), aZDir, aXDir)); } if (aMapOfArgs.Find ("dispmode", aValues)) @@ -477,10 +476,11 @@ namespace theTrihedron->SetSelectionPriority (aDatumPart, aValues->Value (2).IntegerValue()); } - if (aMapOfArgs.Find ("labels", aValues)) + if (aMapOfArgs.Find ("labels", aValues) + || aMapOfArgs.Find ("label", aValues)) { Prs3d_DatumParts aDatumPart = Prs3d_DP_None; - if (aValues->Size() > 2 + if (aValues->Size() >= 2 && convertToDatumPart(aValues->Value(1), aDatumPart) && aDatumPart >= Prs3d_DP_XAxis && aDatumPart <= Prs3d_DP_ZAxis) // labels are set to axes only @@ -6402,7 +6402,7 @@ void ViewerTest::ObjectCommands(Draw_Interpretor& theCommands) "\n\t\t: trihedron, default state is XYZ" "\n\t\t: -hideLabels allows to show/hide trihedron labels" "\n\t\t: -hideArrows allows to show/hide trihedron arrows" - "\n\t\t: -labels allows to change default X/Y/Z titles of axes" + "\n\t\t: -label allows to change default X/Y/Z titles of axes" "\n\t\t: -attribute sets parameters of trihedron" "\n\t\t: -color sets color properties of parts of trihedron" "\n\t\t: -textColor sets color properties of trihedron labels"