BoundingVolume

class compas_fab.robots.BoundingVolume(volume_type, volume)[source]

Bases: object

A container for describing a bounding volume.

Parameters
  • volume_type – The type of bounding volume, one of BoundingVolume.VOLUME_TYPES.

  • volume (compas.datastructures.Mesh or compas.geometry.Primitive) – The volume can be either a compas.geometry.Box, a compas.geometry.Sphere, or a compas.datastructures.Mesh.

Attributes
  • volume_type – The type of bounding volume, one of BoundingVolume.VOLUME_TYPES.

  • volume (compas.datastructures.Mesh or compas.geometry.Primitive) – The volume can be either a compas.geometry.Box, a compas.geometry.Sphere, or a compas.datastructures.Mesh.

Class Attributes
  • BOX – Box bounding volume type.

  • SPHERE – Sphere bounding volume type.

  • MESH – Mesh bounding volume type.

  • VOLUME_TYPES – List of supported bounding volume types.

Methods

__init__(volume_type, volume)

Initialize self.

copy()

Make a copy of this BoundingVolume.

from_box(box)

Create a BoundingVolume from a compas.geometry.Box.

from_mesh(mesh)

Create a BoundingVolume from a compas.datastructures.Mesh.

from_sphere(sphere)

Create a BoundingVolume from a compas.geometry.Sphere.

scale(scale_factor)

Scale the volume uniformly.

transform(transformation)

Transform the volume using a compas.geometry.Transformation.

Attributes

BOX

Box bounding volume type

MESH

Mesh bounding volume type

SPHERE

Sphere bounding volume type

VOLUME_TYPES

List of supported volume types