Coordinate request 2.14.alpha vs 2.13.2

Feel free to ask any question here
Post Reply
mariolino
Posts: 32
Joined: Fri Sep 08, 2023 11:10 am

Coordinate request 2.14.alpha vs 2.13.2

Post by mariolino »

hello Daniel,

please note that with python inside CC 2.13.2 the request for point coordinates via the following code works, whereas in version CC 2.14.alpha for all coordinates only one value is always returned (perhaps the first....)
All the codes I have written now do not work inside CC 2.14.alpha ..... is it possible to do something ?

thanks
Mario

Code: Select all

import pycc
import numpy as np
cc = pycc.GetInstance()
entities = cc.getSelectedEntities()
if len(entities) != 1:
    print("\nselect point cloud")
else:
    entity = entities[0]
    
    if isinstance(entity, pycc.ccPointCloud):
        cloud_coordinates = np.array(entity.points())
        
        print("\ncoords:")
        for point in cloud_coordinates:
            print(f"({point[0]}, {point[1]}, {point[2]})")
    else:
        print("\nEntity is not a point cloud")
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Coordinate request 2.14.alpha vs 2.13.2

Post by daniel »

Hello, is it with CloudCompy or with the Python plugin within CloudCompare?

These are 2 distinct project from CloudCompare, so it may be more efficient to post this question on their respective github page.
Daniel, CloudCompare admin
mariolino
Posts: 32
Joined: Fri Sep 08, 2023 11:10 am

Re: Coordinate request 2.14.alpha vs 2.13.2

Post by mariolino »

the problem is with

CloudCompare Python Plugin by Thomas Montaigu

thanks
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Coordinate request 2.14.alpha vs 2.13.2

Post by daniel »

Daniel, CloudCompare admin
mariolino
Posts: 32
Joined: Fri Sep 08, 2023 11:10 am

Re: Coordinate request 2.14.alpha vs 2.13.2

Post by mariolino »

hi Daniel,

now with 2.14 built 29/9/2024
working correctly

Thnaks
Mariolino
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Coordinate request 2.14.alpha vs 2.13.2

Post by daniel »

Thanks for the heads up!
Daniel, CloudCompare admin
Post Reply