CollisionMesh

class compas_fab.robots.CollisionMesh(mesh, id, frame=None, root_name=None)[source]

Bases: object

Represents a collision mesh.

mesh

The collision mesh. Ideally it is as coarse as possible.

Type

compas.datastructures.Mesh

id

The id of the mesh, used to identify it for later operations (remove, append, etc.)

Type

str

frame

The frame of the mesh. Defaults to the world XY frame.

Type

compas.geometry.Frame, optional

root_name

The name of the root link the collision mesh with be placed in. Defaults to ‘world’.

Type

str

Examples

>>> mesh = Mesh.from_stl(compas_fab.get('planning_scene/floor.stl'))
>>> cm = CollisionMesh(mesh, 'floor')
>>> cm.frame
Frame(Point(0.000, 0.000, 0.000), Vector(1.000, 0.000, 0.000), Vector(0.000, 1.000, 0.000))

Methods

__init__(mesh, id[, frame, root_name])

Initialize self.

scale(transformation)

Scales the collision mesh.

__init__(mesh, id, frame=None, root_name=None)[source]

Initialize self. See help(type(self)) for accurate signature.