BaseRobotArtist
-
class
compas_fab.artists.
BaseRobotArtist
(robot)[source] Bases:
object
Provides common functionality to most robot artist implementations.
In COMPAS, the artists are classes that assist with the visualization of datastructures and models, in a way that maintains the data separated from the specific CAD interfaces, while providing a way to leverage native performance of the CAD environment.
There are two methods that implementors of this base class should provide, one is concerned with the actual creation of geometry in the native format of the CAD environment (
draw_geometry()
) and the other is one to apply a transformation to geometry (transform()
).-
robot
Instance of a robot model.
Methods
__init__
(robot)Initialize self.
attach_tool
(tool)Attach a tool to the robot artist.
create
([link])Recursive function that triggers the drawing of the robot geometry.
Detach the tool.
Draws all collision geometry of the robot.
draw_geometry
(geometry[, name, color])Draw a COMPAS geometry in the respective CAD environment.
Draws all visual geometry of the robot.
scale
(factor)Scales the robot geometry by factor (absolute).
scale_link
(link, transformation)Recursive function to apply the scale transformation on each link.
transform
(geometry, transformation)Transforms a CAD-specific geometry using a COMPAS transformation.
update
(configuration, names[, visual, collision])Triggers the update of the robot geometry.
-
__init__
(robot)[source] Initialize self. See help(type(self)) for accurate signature.
-