move an object on the x,y plane but staying in the 3D view
All  1-11  12-15

Previous
Next
 From:  Michael Gibson
11862.12 In reply to 11862.11 
Hi hadri1, kind of the idea for the "CPlane Int" snap is to intersect with the x/y plane and not x/z or y/z because the x/y plane is visualized in the viewport by the grid.

So when you see a "CPlane Int" you know that you are getting a point on the plane of the grid.

If it intersected with the other planes it would become somewhat more difficult to know which plane that particular intersection is on. There just isn't as strong of a visualization of the other planes unlike the x/y plane which has the grid on it.

What about if you could set up a keyboard shortcut that would let you pick a point and set the cplane's z axis to a specific world axis direction so you wouldn't need to manually drag it.

Is that what you were referring to for this part? :

You wrote:
> "in scripting :
> how do you create the frame at the selected point and then reset when it is done."

- 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
11862.13 In reply to 11862.11 
Hi hadri1, here are some scripts you can set on a shortcut key, copy/paste them in as the "Command" part of the shortcut.

They will get a point for the origin point to use for the cplane and automatically orient the cplane z axis direction to a world axis direction so you can skip the z axis dragging part:

Use this one for z axis (like the Top view):

code:
script:
function DoCPlaneDirZ()
{
	var pp = moi.ui.createPointPicker();

	while ( 1 )
	{
		if ( !pp.waitForEvent() )
			return false;
			
		if ( pp.event == 'finished' )
			break;
	}

	var frame = moi.vectorMath.createTopFrame();
	frame.origin = pp.pt;

	moi.view.setCPlane( frame, false /* Apply to all views */, false /*Orient ortho views*/ );
}

DoCPlaneDirZ();



This one for X axis (like the Right view):

code:
script:
function DoCPlaneDirX()
{
	var pp = moi.ui.createPointPicker();

	while ( 1 )
	{
		if ( !pp.waitForEvent() )
			return false;
			
		if ( pp.event == 'finished' )
			break;
	}

	var frame = moi.vectorMath.createRightFrame();
	frame.origin = pp.pt;

	moi.view.setCPlane( frame, false /* Apply to all views */, false /*Orient ortho views*/ );
}

DoCPlaneDirX();


This one for Y axis (like the Front view):

code:
script:
function DoCPlaneDirY()
{
	var pp = moi.ui.createPointPicker();

	while ( 1 )
	{
		if ( !pp.waitForEvent() )
			return false;
			
		if ( pp.event == 'finished' )
			break;
	}

	var frame = moi.vectorMath.createFrontFrame();
	frame.origin = pp.pt;

	moi.view.setCPlane( frame, false /* Apply to all views */, false /*Orient ortho views*/ );
}

DoCPlaneDirY();


- 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
11862.14 In reply to 11862.12 
For resetting the cplane you can put this on a shortcut key:

script: moi.view.resetCPlane();

I was thinking of how it could be done automatically but it's pretty difficult, it would need to sort of hook itself in to another point pick which may not even be running yet.

- 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:  hadri1
11862.15 
It is perfect ! Thanks !
  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-11  12-15