
Sat, 03/19/2022 - 12:46
Forums:
Hello , I am playing around AIS_VIEWCUBE code sample.
I have created a sample application and CubeView is displayed at left/Bottom screen.
I woul like display it at top/Right
I have used this code:
aisViewCube->SetTransformPersistence(
new Graphic3d_TransformPers(Graphic3d_TransformPers(Graphic3d_TMF_TriedronPers, Aspect_TOTP_RIGHT_UPPER , Graphic3d_Vec2i(100,100))));
But this function doesn't move the AIS_CUBEVIEW
Any suggestion?
Thanks in advance
Attachments:
Sat, 03/19/2022 - 19:03
I guess the code should work, though I don't understand why it calls Graphic3d_TransformPers constructor twice. AIS_ViewCube::SetTransformPersistence() should be called before displaying the object (AIS_InteractiveContext::SetTransformPersistence() could be used afterwards).
Mon, 04/11/2022 - 13:23
ok,it works,sorry for delay.
A last question: I have not found a way to change the color (yellow) of "X","Y",Z"; I have a white backgroung, so the yellow is not readable.
Can show me a function to change text color?
Thanks in advance
Mon, 04/11/2022 - 14:07
X/Y/Z labels are drawn by Prs3d_Drawer::DatumAspect(), which defines per-axis text aspects Prs3d_DatumAspect::TextAspect(). The code might look like this:
Mon, 04/11/2022 - 15:26
Many thanks
Mon, 07/11/2022 - 20:05
After doing some tests with the CubeView, I try to recall the Top view (or more generally any 2d view)
The 2d View is shown but the X and Y axes, as shown in the image, are positioned incorrectly (they have a conflicting sign: X points towards -x and Y points towards -y)
How can I automatically display the axes int the correct position?
Can I get some C ++ code snippets?
I suppose , it need a rotation of the view,but I don't know how
Many Thanks in advance.
Mon, 07/11/2022 - 22:39
Mauro Corbo wrote:
If you click on "Top" side second time it will rotate view to see "Top" label horizontally aligned, if this is what you are looking for.
Mon, 07/11/2022 - 23:02
ok. thanks Krill, I have checked, it runs!