PositionConstraint
- class compas_fab.robots.PositionConstraint[source]
Bases:
Constraint
Constrains a link to be within a certain bounding volume.
- Parameters:
- link_name
str
The name of the link this contraint refers to.
- bounding_volume
BoundingVolume
The volume this constraint refers to.
- weight
float
, optional A weighting factor for this constraint. Denotes relative importance to other constraints. Closer to zero means less important. Defaults to
1
.
- link_name
Examples
>>> from compas.geometry import Sphere >>> from compas_fab.robots import PositionConstraint >>> from compas_fab.robots import BoundingVolume >>> bv = BoundingVolume.from_sphere(Sphere(0.5, point=[3,4,5])) >>> pc = PositionConstraint('link_0', bv, weight=1.)
- Attributes:
- link_name
str
The name of the link this contraint refers to.
- bounding_volume
BoundingVolume
The volume this constraint refers to.
- weight
float
A weighting factor for this constraint. Denotes relative importance to other constraints. Closer to zero means less important.
- link_name
Methods
Create a copy of this
PositionConstraint
.Create a
PositionConstraint
from acompas.geometry.Box
.Create a class:PositionConstraint from a
compas.datastructures.Mesh
.Create a
PositionConstraint
from acompas.geometry.Sphere
.Scale the
bounding_volume
uniformely.Transform the
bounding_volume
using acompas.geometry.Transformation
.Inherited Methods
Get a scaled copy of this
Constraint
.