Hi Christopher,
> It would also be great if the default nudge amount was not
> "1.0" but instead the current grid snap value.
This one should be fairly straightforward - you can retrieve the current grid snap value by: moi.grid.snapSize;
So in the place in Nudge.js where it has the nudge amount = 1.0 make it be = moi.grid.snapSize instead.
The view dependent nudge is likely to be quite a bit more complex. You can get the view frame of the current viewport by calling moi.ui.getActiveViewport().cameraFrame
That returns an IMoiCoordinateFrame which a coordinate system with an origin point, and x y z axis directions. In this case the x-axis of the frame will be in the view's direction towards the right, the y-axis will be in the view's upwards direction and the z axis of the frame will be towards the eye point.
There is another call which returns view angles - but there is not just a single view angle like you say, there is a combination of 3: view.upDownAngle , view.leftRightAngle and view.tiltAngle.
- Michael
|