Bug :: Axis Icon + CPlane

Next
 From:  tyglik
2008.1 
Hi Michael,

I have just installed a new beta. I like an axis label options. Now with making a couple of small scripts myself to change the axis labels quickly I will be able to type coordinates in Rhino fashion. It means for example 5,5 instead of 5,0,5 in Front view...

I think there is a small bug in handling axis icon. When I try to reset cplane while no object is visible or there is no object at all, the axis icon doesn't update properly until I manipulate a viewport or start drawing a new object.

Petr
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
2008.2 In reply to 2008.1 
Hi Petr - I hadn't really thought about using the axis labels to control temporary coordinates like that, but it should work for that.

The idea behind those labels were more for making a one time change for people who liked to work all the time in a system with Y-up or some different axis system than the default.

The idea for doing a more temporary shift for like 5,5 working the front view would be to use Construction Planes instead for that.

You can set up a key to set the global construction plane to be the front plane with this script:
code:
script:moi.view.setCPlane( moi.vectorMath.createFrontFrame() );

or for the Right side plane:
code:
script:moi.view.setCPlane( moi.vectorMath.createRightFrame() );

And when you are done you can reset the cplane back to the default world plane with this script:
code:
script:moi.view.resetCPlane();


When the cplane is set as a global cplane (whether "Apply to all views" is set in the View/CPlane UI, or the second optional parameter to moi.view.setCPlane() is true which is the default), then coordinates that you enter will be in that cplane coordinate system, so it is also another way to control your point input.

So if you use that first script above it should have the same type of effect as changing the axis labels, it is up to you which one you would like to use. I guess one nice effect of changing the labels is that you can see them labeled in the that lower-left axis icon - that does not change when the cplane changes. But the CPlane method allows for more flexibility since it can be oriented to an object and you can set the origin point.


> When I try to reset cplane while no object is visible or there
> is no object at all, the axis icon doesn't update properly
> until I manipulate a viewport or start drawing a new object.

Hmmm, I can't seem to repeat that over here. I tested by setting up 2 scripts to change the axis labels:
code:
script:moi.view.axisLabels = 'x,z,y';

code:
script:moi.view.axisLabels = 'x,y,z';

And when I trigger these it seems to update the display as expected, even when there are no objects...

Is there anything else you can tell me about how to trigger the problem?

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
2008.3 In reply to 2008.1 
Hi Petr, also maybe I'm not quite sure which piece has the problem - the axis label thing and cplanes are pretty much 2 different areas.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  tyglik
2008.4 In reply to 2008.3 
Sorry Michael, actual both of them are involved, I think...

Try this:

- draw a cube
- rotate it in top and front view using edit frame
- place a Cplane on one of cube's side
- delete the cube
- NOW, go to View>Cplane and push "Reset CPlane" button
- you can see that axis icon flicks a bit, but it still remains
in more or less original position until you manipulate viewport (pan, rotate, zoom..)

Petr
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  tyglik
2008.5 In reply to 2008.2 
Wow! Many thanks, Michael. I though I would write that scripts myself after digging in the js file or dll library via VBA for Excel object browser, for example :) -Petr
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
2008.6 In reply to 2008.4 
Thanks Petr, I can follow that one now and repeat it, should be easy to fix now.

Another note - a shortcut for reset cplane is to either right-click or left-click a second time on the View / CPlane button.

And you've probably seen this already, but when you use "Apply to all views", then the cplane will become global and also the Top/Front/Right views will shift to be plan views of the cplane. That's also when your typed in coordinates will use cplane coordinates as well. The Top/Front/Right view labels will show like Top (cplane) while this is active, and also the x,y,z point coordinate readout on the bottom toolbar will show a "c" in front the point coordinates to indicate they are cplane coordinates and not world coordinates that you looking at there.

If you uncheck "Apply to all views", then the cplane will only be applied to the 3D viewport and the Top/Front/Right views will remain viewing in the world axis directions and typed in coordinates will not be changed.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
2008.7 In reply to 2008.5 
Hi Petr,

> or dll library via VBA for Excel object browser, for example :) -Petr

Another note - you can also use oleview.exe, it comes with Visual Studio and it also looks like you can get it here:
http://www.microsoft.com/downloads/details.aspx?familyid=5233b70d-d9b2-4cb5-aeb6-45664be858b6&displaylang=en

That will let you view the type library for a DLL, you can use it to see the moi.idl file that was used for any particular MoI release. In oleview.exe you go to File / View TypeLib and pick the moi_lib.dll file.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
2008.8 In reply to 2008.1 
Hi Petr, ok that "reset cplane with no objects visible" bug is now fixed up for the next beta release, thanks for reporting it!

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All