pysdic.PointCloud.copy#

PointCloud.copy(copy_properties=True)[source]#

Create a copy of the current PointCloud instance.

Parameters:

copy_properties (bool, optional) – If True, the properties of the point cloud will also be copied to the new instance. Default is True.

Returns:

A new PointCloud object containing the same points as the current instance.

Return type:

PointCloud

Examples

Creating a PointCloud from 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()