ForceArtist

class compas_tna.rhino.ForceArtist(item, **kwargs)[source]

Bases: MeshArtist

Artist for force diagrams.

Parameters:
  • force (compas_tna.diagrams.ForceDiagram) – A force diagram.

  • layer (str, optional) – The layer in which the artist should draw.

  • settings (dict, optional) – Visualisation settings.

Attributes:

settings (dict) – Visualisation settings.

Examples

from compas_tna.rhino import ForceArtist

artist = ForceArtist(force, layer='TNA::ForceDiagram')
artist.draw()

Attributes

force

Inherited Attributes

AVAILABLE_CONTEXTS

CONTEXT

ITEM_ARTIST

color

Class for working with colors.

default_edgecolor

Class for working with colors.

default_edgewidth

default_facecolor

Class for working with colors.

default_vertexcolor

Class for working with colors.

default_vertexsize

edge_text

edge_width

edges

face_text

faces

mesh

vertex_size

vertex_text

vertex_xyz

vertices

Methods

clear()

Delete all objects drawn by this artist.

draw()

Draw the force diagram.

Inherited Methods

build(item, **kwargs)

Build an artist corresponding to the item type.

build_as(item, artist_type, **kwargs)

Build an artist with the given type.

clear_edgelabels()

Delete all edge labels drawn by this artist.

clear_edges()

Delete all edges drawn by this artist.

clear_facelabels()

Delete all face labels drawn by this artist.

clear_facenormals()

Delete all face normals drawn by this artist.

clear_faces()

Delete all faces drawn by this artist.

clear_layer()

Clear the layer of the artist.

clear_vertexlabels()

Delete all vertex labels drawn by this artist.

clear_vertexnormals()

Delete all vertex normals drawn by this artist.

clear_vertices()

Delete all vertices drawn by this artist.

draw_collection(collection)

Drawing method for drawing an entire collection of objects.

draw_edgelabels([text])

Draw labels for a selection of edges.

draw_edges([edges, color])

Draw a selection of edges.

draw_facelabels([text])

Draw labels for a selection of faces.

draw_facenormals([faces, color, scale])

Draw the normals of the faces.

draw_faces([faces, color, join_faces])

Draw a selection of faces.

draw_mesh(*args, **kwargs)

Draw the mesh of the mesh.

draw_vertexlabels([text])

Draw labels for a selection vertices.

draw_vertexnormals([vertices, color, scale])

Draw the normals at the vertices of the mesh.

draw_vertices([vertices, color])

Draw a selection of vertices.

redraw()

Redraw the view.

register(item_type, artist_type[, context])

Register an artist type to a data type.