Page 1 of 2
Ransac - export just meshes
Posted: Thu Feb 01, 2024 12:47 pm
by marcin1212
Hi Guys,
I'm trying to play with the RANSAC plugin, finding all of the cylinders within a point cloud. I get many recognized cylinders, however I'm struggling with exporting them wihtout points (just mesha/geometry).
Is there a simple way to export all found shapes from the tree, but without points?
Marcin
Re: Ransac - export just meshes
Posted: Fri Feb 02, 2024 4:51 pm
by daniel
Right click on the top level entity in the DB (at least the one that contains all the cylinders), and then use the option 'Select children by type and/or name'.
Re: Ransac - export just meshes
Posted: Wed Oct 29, 2025 12:11 pm
by clem
The export with that method has the following format:
Name Points meanX meanY meanZ SF#1 name SF#1 valid values SF#1 mean SF#1 std.dev. SF#1 sum
Cylinder_0001 1106729 -174.136 -1305.54 5.38732 Intensity 1106729 82.9177 36.7795 9.18E+07
vertices 50 -174.117 -1305.12 5.48924
Cylinder_0002 944320 -181.715 -1305.41 5.36241 Intensity 944320 93.1268 40.5955 8.79E+07
vertices 50 -181.725 -1305.12 5.43941
It doesn't have any information on the primative shape size. Is there a way to export the radius and height too? Or at least the name of the CC object, which is in the form "Cylinder (r=1.2323423/h=2.34554)"
Re: Ransac - export just meshes
Posted: Thu Oct 30, 2025 8:11 am
by daniel
Isn't the first column the name of the entity already?
Re: Ransac - export just meshes
Posted: Wed Nov 19, 2025 9:07 pm
by clem
The name in the export does not have radius and height information, only a sequential number
Re: Ransac - export just meshes
Posted: Fri Nov 21, 2025 6:56 pm
by daniel
Which version of CloudCompare do you use?
Re: Ransac - export just meshes
Posted: Mon Nov 24, 2025 2:51 pm
by clem
v2.13.1
Re: Ransac - export just meshes
Posted: Mon Nov 24, 2025 7:08 pm
by daniel
Ok, I see that it's the mesh below the cloud which has the radius and height in its name.
So a trick would be to select all the meshes (you can right click on the top group and use 'Select children by type and/or name' if there are too many).
Then use the 'Edit > Mesh > Sample points' method (with a few points, e.g. 10 000, no need to have too many here I believe).
This will create as many clouds with the same name as the meshes. You'll be able to use batch export on these.
Re: Ransac - export just meshes
Posted: Tue Nov 25, 2025 5:00 pm
by clem
That is helpful and worked to get the original radius and height of each cylinder. An improvment would be to get the current radius and height directly from the primative attributes. For some shapes, I need to adjust the height after RANSAC fitting so the actual height no longer matches the name (see attached screen shot).
Is there a way to access/export the primative attribute table?
Re: Ransac - export just meshes
Posted: Wed Nov 26, 2025 7:02 am
by daniel
You mean programmatically?