CloudCompare-PythonRuntime icon indicating copy to clipboard operation
CloudCompare-PythonRuntime copied to clipboard

Coordinate request 2.14.alpha vs 2.13.2

Open mariolino007 opened this issue 1 year ago • 3 comments

hello Thomas,

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

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")

mariolino007 avatar Sep 10 '24 08:09 mariolino007

That's strange I will investigate

tmontaigu avatar Sep 13 '24 10:09 tmontaigu

Hum, its strange, I tried with a local version and the one on CloudCompare website and it works as expected

tmontaigu avatar Sep 29 '24 16:09 tmontaigu

verified with 2.14 built 29/9/2024 error corrected, code works !!

mariolino007 avatar Sep 30 '24 10:09 mariolino007