geometry package
Submodules
geometry.OrientedBoundingBox module
- class geometry.OrientedBoundingBox.OrientedBoundingBox
Bases:
object- Author:
Miguel Yermo
Class that computes the oriented bounding box of a point cloud.
- __init__()
- classmethod create_from_points(points)
Create an oriented bounding box from a structure space matrix.
- Parameters:
points (
np.ndarray) – The structure space matrix representing the point cloud whose oriented bounding box must be found.- Returns:
The oriented bounding box of the point cloud as a list of 8 points with 3 coordinates each the volume of the box.
- get_box_points()
Returns the oriented bounding box as a list of 8 points with 3 coordinates each.
- Returns:
The oriented bounding box as a list of 8 points with 3 coordinates each.
- Return type:
list
- get_volume()
Returns the volume of the bounding box.
- Returns:
The volume of the bounding box.
- Return type:
float
- geometry.OrientedBoundingBox.world_to_local_coordinates(frame, xyz)
Convert global coordinates to local coordinates.
- geometry.OrientedBoundingBox.local_to_world_coordinates(frame, rst)
Convert local coordinates to global (world) coordinates.
- geometry.OrientedBoundingBox.normalize_vector(v)
- geometry.OrientedBoundingBox.local_axes(a, b, c)
geometry.PCA module
- geometry.PCA.compute_PCA(X)
Compute the principal components of the structure matrix of a set of points.
# TODO: Add more information about the PCA algorithm.
Module contents
- author:
Miguel Yermo
The geometry package contains the logic to compute different geometric properties.