Hello,
I am using the API for a simulation. I am using a model that automatically plots out a bunch of sets of x-y-z axes that look like they are centered at each joint. I do not want these axes displayed. I have been trying to turn them off using a variety of objects. I started by obtaining a BodySet from the model I am using. I then created a FrameGeometry object from each Body. I then tried messing with Frame, PropertySet, and VisualRepresentation objects, but I could not find a function in any of them to turn off the axes.
Do you know technically what object controls the display of the axes, and how to get to that object from a given model?
Thank you,
Joel Quarnstrom
Visualize Frame Axes
- Joel Quarnstrom
- Posts: 11
- Joined: Tue Jun 30, 2020 9:40 am
- Ayman Habib
- Posts: 2252
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Visualize Frame Axes
Hi Joel,
The API visualizer has a drop down menu to show/hide all frames, you can try that.
"Global visualization controls" are managed by a ModelDisplayHints object that you can access as in
Finer control of objects may or may not be available to the low level API visualizer but is available through properties in XML files that are respected by the GUI. All Geometry objects have associated Appearance that controls their visibility/color/size.
Hope this helps,
-Ayman
The API visualizer has a drop down menu to show/hide all frames, you can try that.
"Global visualization controls" are managed by a ModelDisplayHints object that you can access as in
Code: Select all
model.updDisplayHints().set_show_frames(false);
Hope this helps,
-Ayman
- Joel Quarnstrom
- Posts: 11
- Joined: Tue Jun 30, 2020 9:40 am
Re: Visualize Frame Axes
I was unable to get that code to work. I tried it both before and after the setUseVisualizer(true) command, but the axes were plotted both times.
I also tried turning them off from the visualizer window, but that did not work either.
Do you have any suggestions on what I am doing wrong?
Thanks,
Joel
I also tried turning them off from the visualizer window, but that did not work either.
Do you have any suggestions on what I am doing wrong?
Thanks,
Joel
- Ayman Habib
- Posts: 2252
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Visualize Frame Axes
Hi Joel,
It's rather hard to debug your code without seeing it, if a short snippet you can post it here, or open a bug/issue and attach a minimal example to reproduce and we'll help you troubleshoot.
Generally, finer control may not be available in the API visualizer and while Bodies are shown as Frames, there could be other objects in the model that show as Frames as well (e.g. Geometry, Joints or Forces). It may help you troubleshoot if you load the model in the GUI, to see what the Frame Axes you're trying to control actually stand for.
Best regards,
-Ayman
It's rather hard to debug your code without seeing it, if a short snippet you can post it here, or open a bug/issue and attach a minimal example to reproduce and we'll help you troubleshoot.
Generally, finer control may not be available in the API visualizer and while Bodies are shown as Frames, there could be other objects in the model that show as Frames as well (e.g. Geometry, Joints or Forces). It may help you troubleshoot if you load the model in the GUI, to see what the Frame Axes you're trying to control actually stand for.
Best regards,
-Ayman