pysdic.PointCloud.copy#
- PointCloud.copy(copy_properties=True)[source]#
Create a copy of the current
PointCloudinstance.- Parameters:
copy_properties (
bool, optional) – IfTrue, the properties of the point cloud will also be copied to the new instance. Default isTrue.- Returns:
A new
PointCloudobject containing the same points as the current instance.- Return type:
Examples
Creating a
PointCloudfrom a random NumPy array and making a copy.1import numpy as np 2from pysdic import PointCloud 3 4# Create a random point cloud with 100 points 5random_points = np.random.rand(100, 3) # shape (100, 3) 6point_cloud1 = PointCloud.from_array(random_points) 7 8# Create a copy of the existing PointCloud object 9point_cloud2 = point_cloud1.copy()