Snap to orthogonal views

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Snap to orthogonal views

randress
FEATool v1.13 includes menu buttons to snap the view to each of three orthogonal planes.  This makes it very convienent to access these features which were previously available by a right click on the figure from certain view mode(s).

At times I would like to have a view snapped to, say, -XZ (XZ, looking from the other direction).  I expect there is a command (MATLAB Command) to do this, but I cannot seem to locate it.  The closest I find is the "view" command.  But, while I can get "view([a b c])" to control the view of a new figure (figure 3 for example), I cannot see how to make it apply to the FEATool figure.

I am not asking for a new feature, only how this (or setting any other custom viewpoint) might be done when needed from MATLAB.

Kind regards,
-Randal
Reply | Threaded
Open this post in threaded view
|

Re: Snap to orthogonal views

Precise Simulation
Administrator
All FEATool graphics objects have the HandleVisibility property set to "off" by default, so as not accidentally effect plotting and working with graphics in the Matlab CLI (otherwise you could easily accidentally close everything and lose all work with a "close all" command for example). So in order to be able to apply graphics functions you have to first find and extract the graphics object handle, for example:

  h_featool_fig = findall( 0, 'Tag', 'featool_gui_main_window' );   % 0 is the handle to the Matlab root object.
  h_featool_axes = findall( h_featool_fig, 'Type', 'axes' );
  view( h_featool_axes, 0, 180 )
Reply | Threaded
Open this post in threaded view
|

Re: Snap to orthogonal views

randress
Precise Simulation wrote
  h_featool_fig = findall( 0, 'Tag', 'featool_gui_main_window' );   % 0 is the handle to the Matlab root object.
  h_featool_axes = findall( h_featool_fig, 'Type', 'axes' );
  view( h_featool_axes, 0, 180 )
Nice! ... looks like a 3 line script to me (with 2 args :-)

To quote a old boss of mine, "It's easy, if you know how"...

Thanks for the lesson and the code,
-Randal