You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Generate point clouds for child components of a mesh using CloudComPy
labels: question, enhancement
Description
I'm working with a .obj file that contains multiple components, structured like this:
A
- B
- C
- D
I'm using the CloudComPy API to convert this mesh to point clouds. However, I'm encountering difficulties when trying to generate point clouds for each child component (B, C, D).
python
import cloudComPy as cc
cc.initCC()
mesh = cc.loadMesh("path/to/.obj")
child = mesh.getChild(1)
The child object is a cc_HObject, which doesn't seem to contain mesh or point cloud information.
Questions
Is it possible to generate a point cloud for each child component of the mesh?
If so, can we set properties like colors and normals for each respective point cloud?
This is possible in CloudCompare, by selecting each child component and sampling a point cloud for each child component.
Additional Information
The .obj file is obtained from a Siemens NX CAD drawing.
Expected Outcome
Ability to:
Access each child component (B, C, D) of the main mesh (A).
Generate a point cloud for each child component.
Set/Get properties (colors, etc.) for each generated point cloud.
Any guidance or examples would be greatly appreciated.
Thank you!
Hello,
I don't have an example file that meets your requirements, and I can't check whether CloudComPy is able to read it correctly.
Can you provide an example file?
The cc_HObject type is the base type for almost all CloudCompare objects (meshes, point clouds, etc...) and you can have more children than the 3 you expect. Have you explored all the children?
Have you tried opening your file with CloudCompare? If Cloudcompare finds all the expected components, this indicates either a CloudComPy bug, or the need to improve CloudComPy's documentation on this type of case.
Hello, I don't have an example file that meets your requirements, and I can't check whether CloudComPy is able to read it correctly. Can you provide an example file?
The cc_HObject type is the base type for almost all CloudCompare objects (meshes, point clouds, etc...) and you can have more children than the 3 you expect. Have you explored all the children? Have you tried opening your file with CloudCompare? If Cloudcompare finds all the expected components, this indicates either a CloudComPy bug, or the need to improve CloudComPy's documentation on this type of case.
Regards, Paul
// fixed grammar
Thanks, Paul, for your time.
I am able to open the .obj drawing in CloudCompare, I am attaching the .obj and the .prt file. ASSMBLY.zip
I am able to generate Point Cloud for the entire mesh, but not individually for each child component using CloudComPy; There are child components containing meta-data, like materials and vertices coming up in CloudCompare, which I want to ignore for generating Point Cloud, I am interested only in the RGBA and the name of the components.
Though .obj file can be opened by CloudCompare, the assembly mesh is not visible (Might be due to Siemens NX .obj representation), I am still able to sample the points from the Mesh, generate the point cloud and assign them colors. This is what I'm trying to replicate via CloudComPy.
Please let me know if you need any additional information for this.
Hello,
CloudComPy does not handle sub-meshes correctly. The information is present in CloudCompare, but not available in CloudComPy. I'll have to improve CloudComPy's reader to correctly take into account all CloudCompare types. I'll add this to my TODO list, for the next version, hopefully in 2 or 3 weeks.
Activity
prascle commentedon Apr 30, 2025
Hello,
I don't have an example file that meets your requirements, and I can't check whether CloudComPy is able to read it correctly.
Can you provide an example file?
The cc_HObject type is the base type for almost all CloudCompare objects (meshes, point clouds, etc...) and you can have more children than the 3 you expect. Have you explored all the children?
Have you tried opening your file with CloudCompare? If Cloudcompare finds all the expected components, this indicates either a CloudComPy bug, or the need to improve CloudComPy's documentation on this type of case.
Regards,
Paul
RohitMNair commentedon May 2, 2025
I am able to generate Point Cloud for the entire mesh, but not individually for each child component using CloudComPy; There are child components containing meta-data, like materials and vertices coming up in CloudCompare, which I want to ignore for generating Point Cloud, I am interested only in the RGBA and the name of the components.
Though
.objfile can be opened by CloudCompare, the assembly mesh is not visible (Might be due to Siemens NX.objrepresentation), I am still able to sample the points from the Mesh, generate the point cloud and assign them colors. This is what I'm trying to replicate via CloudComPy.Please let me know if you need any additional information for this.
Thanks a lot for your help!
Rohit
prascle commentedon May 6, 2025
Hello,
CloudComPy does not handle sub-meshes correctly. The information is present in CloudCompare, but not available in CloudComPy. I'll have to improve CloudComPy's reader to correctly take into account all CloudCompare types. I'll add this to my TODO list, for the next version, hopefully in 2 or 3 weeks.
Regards,
Paul
RohitMNair commentedon May 7, 2025
Hi Paul,
Thanks for your time and help.
I'll leave this issue open, so we can discuss the case when you eventually develop it.
Thanks!
Rohit
issue CloudCompare#208 read correctly submeshes and some other CloudC…