compas_cem.ghpython
¤
Grasshopper components and scene objects that draw diagrams inside Rhino.
Classes¤
DiagramObject
¤
A scene object that draws a diagram in Grasshopper.
Notes
Every draw method takes an explicit selection, because the Grasshopper components expose the selection as a component input. Drawing returns bare Rhino geometry and carries no color, so the coloring is left to whatever consumes the geometry downstream.
Node positions are read from the scene object rather than from the diagram, so a transformation set on the object applies to everything it draws.
Attributes¤
Methods:¤
draw_edges
¤
Draw a selection of edges.
Parameters:
-
edges–The edges to draw. If
None, every edge is drawn.
Returns:
-
lines–One Rhino line per drawn edge.
Source code in src/compas_cem/ghpython/scene_objects.py
draw_loads
¤
Draw the loads applied to a selection of nodes.
Parameters:
-
nodes–The nodes to draw the loads of. If
None, every node is taken. -
scale–The factor to scale the load vectors by.
-
gap–The offset between a node and the load drawn at it.
-
min_load–The smallest load magnitude worth drawing.
Returns:
-
lines–One Rhino line per drawn load.
Source code in src/compas_cem/ghpython/scene_objects.py
draw_nodes
¤
Draw a selection of nodes.
Parameters:
-
nodes–The nodes to draw. If
None, every node is drawn.
Returns:
-
points–One Rhino point per drawn node.
Source code in src/compas_cem/ghpython/scene_objects.py
draw_nodes_support
¤
Draw a selection of the support nodes of the diagram.
Parameters:
-
nodes–The nodes to draw, of which only the supports are kept. If
None, every support node is drawn.
Returns:
-
points–One Rhino point per drawn support node.
Source code in src/compas_cem/ghpython/scene_objects.py
FormDiagramObject
¤
A scene object that draws a form diagram in Grasshopper.
Attributes¤
Methods:¤
draw_reactions
¤
Draw the reaction forces at a selection of support nodes.
Parameters:
-
nodes–The nodes to draw the reaction forces of. If
None, every node is taken. -
scale–The factor to scale the reaction forces by.
-
gap–The offset between a node and the reaction force drawn at it.
-
min_force–The smallest reaction force magnitude worth drawing.
Returns:
-
lines–One Rhino line per drawn reaction force.
Source code in src/compas_cem/ghpython/scene_objects.py
TopologyDiagramObject
¤
A scene object that draws a topology diagram in Grasshopper.
Attributes¤
Methods:¤
draw_edges_deviation
¤
Draw a selection of the deviation edges of the topology diagram.
Parameters:
-
edges–The edges to draw, of which only the deviations are kept. If
None, every deviation edge is drawn.
Returns:
-
lines–One Rhino line per drawn deviation edge.
Source code in src/compas_cem/ghpython/scene_objects.py
draw_edges_trail
¤
Draw a selection of the trail edges of the topology diagram.
Parameters:
-
edges–The edges to draw, of which only the trails are kept. If
None, every trail edge is drawn.
Returns:
-
lines–One Rhino line per drawn trail edge.
Source code in src/compas_cem/ghpython/scene_objects.py
draw_nodes_origin
¤
Draw a selection of the origin nodes of the topology diagram.
Parameters:
-
nodes–The nodes to draw, of which only the origins are kept. If
None, every origin node is drawn.
Returns:
-
points–One Rhino point per drawn origin node.
Source code in src/compas_cem/ghpython/scene_objects.py
draw_trails
¤
Draw the trails of the topology diagram.
Returns:
-
curves–One Rhino polyline curve per trail.
Notes
A polyline curve is drawn rather than a polyline, because Grasshopper unpacks a bare polyline output into its points.