synthpic2.recipe.synth_chain.feature_generation_steps.agglomeration.bounding_box

Module for the BoundingBox class.

Module Contents

Classes

BoundingBox

Class to represent bounding boxes.

class synthpic2.recipe.synth_chain.feature_generation_steps.agglomeration.bounding_box.BoundingBox

Class to represent bounding boxes.

property mesh: trimesh.Trimesh

Mesh of the bounding box.

Returns:

trimesh.Trimesh: mesh of the bounding box

property centroid: numpy.ndarray

Centroid of the bounding box.

Returns:

np.ndarray: centroid

extents: numpy.ndarray
location: numpy.ndarray
enlarge(other_bounding_box: BoundingBox) None
Enlarge the bounding box, so that it has a margin as big as another bounding

box.

Args:

other_bounding_box (BoundingBox): enlarged bounding box

get_random_boundingbox_face() numpy.ndarray

Get a random bounding box face (area weighted), specified by its face normal.

Returns:

np.ndarray: Normal vector of the randomly selected bounding box face.

get_random_point_boundingbox_face(desired_face_normal: numpy.ndarray) numpy.ndarray

Get a random point on the face (specified by a face normal) of a boundingbox.

Args:

desired_face_normal (np.ndarray): Normal vector of the desired face.

Returns:

np.ndarray: Coordinates of the random point.