screen space move
All  1-5  6-12

Previous
Next
 From:  pior (PIOR_O)
10112.6 In reply to 10112.4 
Hi there again - this has proven extremely useful so far, it makes freeform modeling a MOI an absolute breeze.
Diving deeper into this, Is there also a way to create the temporary plane at the world location of the currently selected component ? With a fallback if nothing is selected.
  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
10112.7 In reply to 10112.6 
Hi Pior,

re:
> Diving deeper into this, Is there also a way to create the temporary plane at the world location of the
> currently selected component ? With a fallback if nothing is selected.

What does the "world location" mean, is it the center of the selected object's bounding box?

And you mean with the view direction as the plane's normal?

And what should the fallback do?

- 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:  pior (PIOR_O)
10112.8 In reply to 10112.7 
Hello Michael ! Thank you for the follow up-as always. I'll try to clarify.

- Indeed that's what I mean by "world location" : the location of the bounding box of the currently selected object (or objects). That way the plane would appear right where it is needed for drafting, as screen space sketching very often relates to an existing element of a design (like for instance drafting the outline of a headlight at the location where it will be ultimately be, near the front of the body of a car.)

- As for the fallback if no object is selected : that would be the behavior of the script from just earlier, which is to have the custom, view-aligned Cplane by place at the world origin. But maybe that's self-evident and/or already built into the command.

Btw, is there an api/command reference page out there for all the tools ? Like for instance how to add options in scripts/shortcuts for things like "apply to all views", and so on.
[edit] Probably this ? http://kyticka.webzdarma.cz/3d/moi/

EDITED: 20 Jan 2021 by PIOR_O

  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
10112.9 In reply to 10112.8 
Hi Pior, try this one for targeting it on selected objects:

script:/* Orient cplane to 3D view direction, origin on selected objecs */ var frame = moi.ui.mainWindow.viewpanel.getViewport('3D').targetFrame; frame.origin = moi.view.getCPlane().origin; var objs = moi.geometryDatabase.getSelectedObjects(); if ( objs.length > 0 ) { frame.origin = objs.getHighAccuracyBoundingBox().center; } moi.view.setCPlane( frame );


> Btw, is there an api/command reference page out there for all the tools ? Like for instance how to add
> options in scripts/shortcuts for things like "apply to all views", and so on.

There is some at http://moi3d.com/wiki/Scripting but it's not complete.

- 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:  pior (PIOR_O)
10112.10 In reply to 10112.9 
Hello Michael -

Well, what can I say ... this is brilliant really !! So snappy and useful, that's exactly it.
Is the custom Cplane feature (as run like in this script) always tied to all views, or can it be related to the perspective view only, leaving the other (orthos) unaffected ?

Anyways, really great stuff. It opens up a lot of doors for freeform cuts, and so on.
  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
10112.11 In reply to 10112.10 
Hi Pior,

re:
> Is the custom Cplane feature (as run like in this script) always tied to all views, or can it be related to
> the perspective view only, leaving the other (orthos) unaffected ?

It can be set just for the 3D view without changing the ortho views. Try this:

script:/* Orient cplane to 3D view direction, origin on selected objects */ var frame = moi.ui.mainWindow.viewpanel.getViewport('3D').targetFrame; frame.origin = moi.view.getCPlane().origin; var objs = moi.geometryDatabase.getSelectedObjects(); if ( objs.length > 0 ) { frame.origin = objs.getHighAccuracyBoundingBox().center; } moi.view.setCPlane( frame, false /*ApplyToAllViews*/ );

- 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:  pior (PIOR_O)
10112.12 In reply to 10112.11 
Well, as per usual this seems to be working perfectly. Thank you so much !!
  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-5  6-12