compas_fab.rhino
¤
Rhino scene objects for compas_fab.
Scene objects expose compas_fab data structures to Rhino while keeping
the data layer separated from CAD-specific code and leveraging native
Rhino performance.
Classes¤
ReachabilityMapObject
¤
Scene object for drawing a reachability map.
Parameters:
-
reachability_map(:class:`compas_robots.ReachabilityMap`) –Robot model.
-
scale–Scale factor that controls the length of the axes.
-
layer(str, default:None) –The layer that should contain the drawing.
-
**kwargs(dict, default:{}) –Additional keyword arguments.
Methods:¤
draw_cloud
¤
Returns the points and colors to create a point cloud.
The colors are calculated on the score at the respective frame. If the frames are a 2D list, the point of the first frame of the list is used.
Parameters:
-
colormap(str, default:'viridis') –The colormap for the point cloud.
-
points(list of :class:`compas.geometry.Points`, default:None) –Points to override the points from the reachability map.
Returns:
-
list[Guid]–The GUIDs of the created Rhino objects.
draw_frames
¤
RigidBodyObject
¤
Scene object for drawing a :class:~compas_fab.robots.RigidBody in Rhino.
Pass-through composition mirroring :class:RobotModelObject: caching and
delta-transform logic come from :class:BaseRigidBodyObject; the Rhino
bake / transform hooks come from :class:RhinoSceneObject.
RobotCellObject
¤
RobotCellObject(
draw_visual: bool = True,
draw_collision: bool = False,
native_scale: float = 1.0,
layer: str | None = None,
*args,
**kwargs,
)
Scene object for drawing a :class:~compas_fab.robots.RobotCell in Rhino.
RobotModelObject
¤
RobotModelObject(
draw_visual: bool = True,
draw_collision: bool = False,
native_scale: float = 1.0,
*args,
**kwargs,
)
Scene object for drawing a :class:~compas_robots.RobotModel in Rhino.
Pass-through composition: :class:BaseRobotModelObject owns the per-link
native-geometry cache and the FK delta-transform logic; :class:RhinoSceneObject
supplies the Rhino-doc :meth:_create_geometry and :meth:_transform hooks.