Page 1 of 1

Draw cylinder axis

Posted: Fri Nov 20, 2020 4:47 pm
by Abouyowan
Hello,

I have a point cloud on which I fitted some primitive shapes. I would like to draw a cylinder axis then to draw the intersection between the axis and a plane. Could you tell me if it is possible and how to do it please ?

Thanks a lot and have a nice week-end.

Re: Draw cylinder axis

Posted: Fri Nov 20, 2020 10:50 pm
by daniel
Hum, not easily.

You can retrieve the cylinder axis (direction) by looking at the 'Transformation history matrix' section of the cloud properties (that's the 3rd column of the matrix).

But then, you would have to create 2 points of a segment that represent this axis (i.e. center of the cylinder bounding-box - X * axis direction, center of the cylinder bounding-box + X * axis direction). Compute these 2 points and save them in a file with '.poly' as extension ('X Y Z' on 2 separate lines). Then load it in CC.

Re: Draw cylinder axis

Posted: Wed Nov 25, 2020 11:42 pm
by WargodHernandez
Not exactly what you asked for but I do this trick when I want a "local" axis system. I have a base model which is just single line segments 1 for each axis from 0 to 1 and a plane on each pair of axis xy, yz, xz and then I just load that model and apply a transform to the entire model based on the transform of whatever I was trying to see in a local coordinate system.
So for your cylinders copy the transform and then apply it to my model and it will have one axis in line with the cylinder axis. And you could then measure cloud to plane, cloud farthest from the local axis to determine how long the axis line should be.

Daniel's method makes more sense in this case but I have found a lot of uses for the "local axis" model and I don't find a reason to share very often :)

Re: Draw cylinder axis

Posted: Thu Nov 26, 2020 8:53 am
by daniel
Maybe we could add this 'local system' thing to the 'Primitive factory'?