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

Previous
Next
 From:  hadri1
11862.9 
Hi Michael,

Thank you for your answer.

i liked the idea of not having to create and extrude each time you want to have a displacement in a Given plane, so using a CPlane is a great idea.
unluckily, i created the Cplane, but i am not able to snap onto the intersection between the Cplane and the line.
i am using Moi 4.0.

A video has been added in the same link.

Hadri1
  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.10 In reply to 11862.9 
Hi hadri1,

> unluckily, i created the Cplane, but i am not able to snap onto the intersection
> between the Cplane and the line.

Your Cplane isn't working because you've got the "Align to objects" option turned off when you place the cplane onto the plane's corner point.



When this option is disabled then only the origin point of the cplane is modified and the x/y/z axis directions remain in world orientations.

To get your cplane intersection working you need to turn on the "Align to objects" option when setting the cplane so the z axis will be normal to the plane, like this:



If it looks like this (below) as in your video it still has world axis directions for the construction plane's x/y/z axes.



- 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:  hadri1
11862.11 
OK ! it is working.
My initial neeed was to move the point in the plane orthogonal to the X axis but without need to create an actual plane object.
Creating a CPlane is ok but using the "use object orientation" is not the solution for me because i don't want to add a plane object.
But as you will see in the "2025-12-14_09h34_28" video, it is possible to make in work without using this option if you manually change the z axis.


the process would be :
1 : create a Cplane at the selected point
2 : move the Z axis to the direction on the plane normal
3 : use the move function and now the CPlane In works.
4 : reset Cplane when you are done.

i think the process could be improved.

without adding a displacement gizmo, i think that if you can activate the CPlane intersection on the 3 standard planes [ (x,y) (y,z) and (x,z) ] and not only the (x,y) plane.
If you wand to limit the computation power, you can limit this computation to the object that the user is hovering onto. (so with the "on" snapping status)

This way you won't need to manually move the Z axis. and with 2 shortcut script if would be done !

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

For now i will definitely go with your solution.

Thank you again 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.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-8  9-15