Pointcloud

class compas.geometry.Pointcloud[source]

Bases: Geometry

Class for working with pointclouds.

Parameters:
pointssequence[point]

A sequence of points to add to the cloud.

namestr, optional

The name of the pointcloud.

Examples

>>>
Attributes:
pointslist[compas.geometry.Point]

The points of the cloud.

Methods

add

Add another pointcloud to this pointcloud.

closest_point

Compute the closest point on the pointcloud to a given point.

closest_points

Compute the closest point on the pointcloud to a given point.

difference

Compute the difference with another pointcloud.

from_bounds

Construct a point cloud within a given box.

from_box

Construct a point cloud within a given box.

from_pcd

Construct a pointcloud from a PCD file.

from_ply

Construct a pointcloud from a PLY file.

subtract

Subtract another pointcloud from this pointcloud.

transform

Apply a transformation to the pointcloud.

union

Compute the union with another pointcloud.

Inherited Methods

ToString

Converts the instance to a string.

compute_aabb

Compute the axis-aligned bounding box of the geometry.

compute_obb

Compute the oriented bounding box of the geometry.

copy

Make an independent copy of the data object.

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

rotate

Rotate the geometry.

rotated

Returns a rotated copy of this geometry.

scale

Scale the geometry.

scaled

Returns a scaled copy of this geometry.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_json

Convert an object to its native data representation and save it to a JSON file.

to_jsonstring

Convert an object to its native data representation and save it to a JSON string.

transformed

Returns a transformed copy of this geometry.

translate

Translate the geometry.

translated

Returns a translated copy of this geometry.

validate_data

Validate the data against the object's data schema.