Skip to content

Point Cloud from cc_HObject #208

@RohitMNair

Description

@RohitMNair

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions