Isotropix Forums

Getting point cloud geometry

Clarisse Scripting related topics

Getting point cloud geometry

Unread postby jboissinot » Thu Jun 20, 2019 4:39 pm

Hi,

I'm having difficulty with getting the geometry that is used to generate a selected point cloud.

Here is how I get the point cloud but then I'm not quite sure how I can get its geometry:
Code: Select all
pcloud = ix.selection[0].get_module().get_geometry().get_point_cloud()

I am able to check the point cloud support information with using the pcloud.has_support() method but I was wondering if such method for easily getting the support geometry is actually implemented or if we should get it by getting the Geometry attribute value?

Thanks,
Jeremy
jboissinot
 
Posts: 39
Joined: Tue Jan 29, 2019 10:36 pm

Re: Getting point cloud geometry

Unread postby anemoff » Mon Jun 24, 2019 5:54 pm

Hi Jeremy,

Sorry for the late response.

Are you talking about getting the support geometry used by a PointCloud?
If yes, as you guessed, ou need to get the value of the "geometry" attribute of the PointCloud:

python code

pc = ix.get_item('project://scene/point_cloud') # for example...
geom = pc.get_attribute('geometry')
print geom.get_full_name() # do stuff with 'geom'


Cheers,
Anthony Nemoff
Isotropix
R&D Engineer
User avatar
anemoff
 
Posts: 158
Joined: Wed Jan 13, 2016 10:10 am

Re: Getting point cloud geometry

Unread postby jboissinot » Wed Jun 26, 2019 2:20 pm

Hi Anthony,

No worries, yes I was talking about the support geometry used by a point cloud and did end up using the value of the geometry attribute with the attribute.get_object() method to get it. I was just curious to know if there was a better way of doing it with a kind of implemented method in the point cloud module but this works fine with the attribute anyway.

Thank you for confirming,
Jeremy
jboissinot
 
Posts: 39
Joined: Tue Jan 29, 2019 10:36 pm

Re: Getting point cloud geometry

Unread postby anemoff » Mon Jul 08, 2019 3:33 pm

jboissinot wrote:I was just curious to know if there was a better way of doing it with a kind of implemented method in the point cloud module but this works fine with the attribute anyway.

Not really. And some of the intermediary objects accessed through ModuleParticle aren't exposed in Python. So you might have been blocked by that.

I suppose you were able to access the necessary data of the support geometry by using the "geometry" attribute.

Cheers,
Anthony Nemoff
Isotropix
R&D Engineer
User avatar
anemoff
 
Posts: 158
Joined: Wed Jan 13, 2016 10:10 am


Return to Scripting