Visualize Frame Axes

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Joel Quarnstrom
Posts: 11
Joined: Tue Jun 30, 2020 9:40 am

Visualize Frame Axes

Post by Joel Quarnstrom » Wed Jul 15, 2020 12:02 pm

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

Tags:

User avatar
Ayman Habib
Posts: 2237
Joined: Fri Apr 01, 2005 12:24 pm

Re: Visualize Frame Axes

Post by Ayman Habib » Thu Jul 16, 2020 9:19 am

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

Code: Select all

model.updDisplayHints().set_show_frames(false);
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

User avatar
Joel Quarnstrom
Posts: 11
Joined: Tue Jun 30, 2020 9:40 am

Re: Visualize Frame Axes

Post by Joel Quarnstrom » Fri Jul 17, 2020 8:59 am

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

User avatar
Ayman Habib
Posts: 2237
Joined: Fri Apr 01, 2005 12:24 pm

Re: Visualize Frame Axes

Post by Ayman Habib » Fri Jul 17, 2020 9:47 am

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

POST REPLY