Draw cylinder axis

Feel free to ask any question here
Post Reply
Abouyowan
Posts: 1
Joined: Fri Nov 20, 2020 4:37 pm

Draw cylinder axis

Post 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.
Attachments
1605890375068-min.jpg
1605890375068-min.jpg (774.76 KiB) Viewed 2730 times
1605890375074-min.jpg
1605890375074-min.jpg (534.59 KiB) Viewed 2730 times
daniel
Site Admin
Posts: 7721
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Draw cylinder axis

Post 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.
Daniel, CloudCompare admin
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: Draw cylinder axis

Post 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 :)
daniel
Site Admin
Posts: 7721
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Draw cylinder axis

Post by daniel »

Maybe we could add this 'local system' thing to the 'Primitive factory'?
Daniel, CloudCompare admin
Post Reply