BoundingVolume

class compas_fab.robots.BoundingVolume[source]

Bases: Data

A container for describing a bounding volume.

Parameters:
volume_type

The type of bounding volume, one of BoundingVolume.VOLUME_TYPES.

volumecompas.datastructures.Mesh or compas.geometry.Primitive

The volume can be either a compas.geometry.Box, a compas.geometry.Sphere, or a compas.datastructures.Mesh.

Notes

BoundingVolume.BOX

Box bounding volume type.

BoundingVolume.SPHERE

Sphere bounding volume type.

BoundingVolume.MESH

Mesh bounding volume type.

BoundingVolume.VOLUME_TYPES

List of supported bounding volume types.

Attributes:
volume_type

The type of bounding volume, one of BoundingVolume.VOLUME_TYPES.

volumecompas.datastructures.Mesh or compas.geometry.Primitive

The volume can be either a compas.geometry.Box, a compas.geometry.Sphere, or a compas.datastructures.Mesh.

Methods

copy

Make a copy of this BoundingVolume.

from_box

Create a BoundingVolume from a compas.geometry.Box.

from_mesh

Create a BoundingVolume from a compas.datastructures.Mesh.

from_sphere

Create a BoundingVolume from a compas.geometry.Sphere.

scale

Scale the volume uniformly.

transform

Transform the volume using a compas.geometry.Transformation.

Inherited Methods

ToString

Converts the instance to a string.

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

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.

validate_data

Validate the data against the object's data schema.