Coordinate request 2.14.alpha vs 2.13.2
Posted: Fri Sep 06, 2024 10:26 am
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
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")