align 3d view to surface
All  1-6  7-9

Previous
Next
 From:  Michael Gibson
9607.7 In reply to 9607.6 
Hi Quaritexa, I think the problem is the target point on the 2D views is not used for anything and so is not getting set. So get the target point through some other way instead of from the top view.

For the angle getting the tilt angle from the Top view and setting it as the 3D view's tilt angle seems to work, try this one:

script: /* Align 3D view to surface */ var vp = moi.ui.mainWindow.ViewPanel.getViewport('3D'), cp = moi.view.getCPlane(); moi.view.setCPlaneInteractive(); var vt = moi.ui.mainWindow.viewPanel.getViewport('top'); vp.setCameraAndTarget(vt.cameraPt, moi.view.getCPlane().origin); vp.tiltAngle = vt.tiltAngle; vp.Projection = 'Parallel'; moi.view.setCplane(cp, true, true);

- 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
9607.8 In reply to 9607.6 
Hi Quaritexa, ok so yes the problem is that when setting the cplane the ortho view's target point did not get updated. MoI does not use the target point on the Top/Front/Right views for anything so that's why it went previously unnoticed.

I've fixed that now for the next v4 beta and also I've added in an optional additional parameter to vp.setCameraAndTarget() so it can take an "up" direction vector to set the view rotation around the camera->target line. So that will be an additional way to control 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

Previous
 From:  vector illustrator (QUARITEXA)
9607.9 In reply to 9607.7 
Thank you very much, Michael. That's exactly what I need.

That's how it works:

EDITED: 8 Dec 2019 by QUARITEXA

Image Attachments:
Size: 1.9 MB, Downloaded: 131 times, Dimensions: 974x696px
  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

 

 
 
Show messages: All  1-6  7-9