[request] Orient to axis

To post any request/idea for new functionalities
Post Reply
Pfalkingham
Posts: 5
Joined: Wed Mar 02, 2011 3:52 pm
Contact:

[request] Orient to axis

Post by Pfalkingham »

Would it be possible to rotate a mesh/pointcloud within a plane to align to an axis via picking two points?

i.e: I'm orientating a pointcloud to the horizontal (XY) using the plane fitting tool, and would then like to rotate it within that plane so it remains horizontal, but such that a linear feature (as defined by start and end points) is now in line with an axis.
daniel
Site Admin
Posts: 7709
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: [request] Orient to axis

Post by daniel »

Right now there's no mean to do that simply in CloudCompare.

You can pick two points (with the point picking tool) and get the corresponding vector from the console.

Then... you take a paper and a pen (or matlab) and you find the corresponding rotation matrix (around Z, so it shouldn't be too hard). Eventually, you can apply it with the "Edit > Transform" tool.

For the future, we could rather easily add this kind of feature to the "point picking tool":
[*] if you pick a line segment --> option to make it coincide with X, Y, or Z
[*] if you pick a triangle (plane) --> option to make it coincide with XY, XZ or YZ

But taking into account both constraints would require much more work/dialog widgets...
Daniel, CloudCompare admin
Pfalkingham
Posts: 5
Joined: Wed Mar 02, 2011 3:52 pm
Contact:

Re: [request] Orient to axis

Post by Pfalkingham »

Alright, no problem. For my purposes pen and paper will do fine!
noornazeer
Posts: 1
Joined: Thu Jun 27, 2013 7:36 pm

Re: [request] Orient to axis

Post by noornazeer »

nicktecky wrote:You need to re-create the auto orient behavior using a simple expression. Add this to the orientation parameter:

my_orient=lookAt(position,thisComp.layer("Camera").position)
X=orientation[0];
Y=my_orient[1];
Z=orientation[2];

[X,Y,Z]

You may need to add an angular value to compensate for flipping.
that doesn't really worked for me
daniel
Site Admin
Posts: 7709
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: [request] Orient to axis

Post by daniel »

This message was spam in fact!
Daniel, CloudCompare admin
Post Reply