Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coordinate request 2.14.alpha vs 2.13.2 #124

Open
mariolino007 opened this issue Sep 10, 2024 · 3 comments
Open

Coordinate request 2.14.alpha vs 2.13.2 #124

mariolino007 opened this issue Sep 10, 2024 · 3 comments

Comments

@mariolino007
Copy link

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

@tmontaigu
Copy link
Owner

That's strange I will investigate

@tmontaigu
Copy link
Owner

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

@mariolino007
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants