CollisionMesh

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

Bases: Data

Represents a collision mesh.

Parameters
Attributes

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

from_data

Construct a collision mesh from its data representation.

scale

Scales the collision mesh uniformly.

scaled

Copies the collision mesh, and scales the copy uniformly.

to_data

Get the data dictionary that represents the collision mesh.

Inherited Methods

ToString

Converts the instance to a string.

copy

Make an independent copy of the data object.

from_json

Construct an object from serialized data contained in a JSON file.

from_jsonstring

Construct an object from serialized data contained in a JSON string.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_json

Serialize the data representation of an object to a JSON file.

to_jsonstring

Serialize the data representation of an object to a JSON string.

validate_data

Validate the object's data against its data schema.

validate_json

Validate the object's data against its json schema.