Page 1 of 1
[request] Orient to axis
Posted: Thu May 24, 2012 3:55 pm
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.
Re: [request] Orient to axis
Posted: Fri May 25, 2012 7:11 am
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...
Re: [request] Orient to axis
Posted: Thu Jun 07, 2012 2:20 pm
by Pfalkingham
Alright, no problem. For my purposes pen and paper will do fine!
Re: [request] Orient to axis
Posted: Thu Jun 27, 2013 7:38 pm
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
Re: [request] Orient to axis
Posted: Thu Jun 27, 2013 8:58 pm
by daniel
This message was spam in fact!