Viewer

class compas_tno.viewers.Viewer(thrust=None, shape=None, force=None, show_grid=False, **kwargs)[source]

Bases: object

A Class for view 3D thrust networks and shapes.

Parameters
  • thrust (FormDiagram, optional) – The FormDiagram you want to plot, by default None

  • shape (Shape, optional) – The Shape of masonry to plot, by default None

Attributes

None

Methods

add

Add an item to the viewer.

clear

Clear the viewer elements

draw_assembly

Draw the reaction labels (force magnitude) on the supports according to the settings

draw_b_constraint

draw_cracks

Draw cracks according to the settings

draw_force

Add the ForceDiagram to the viewer, if no force is given the force diagram is recomputed in place.

draw_form

Alias to draw thrust network according to the settings

draw_loads

Draw the externally applied loadss as vectors on the applied nodes

draw_mesh

Draw a mesh to the viewer, if no mesh is given the self.thrust is taken

draw_middle_shape

Draw the middle of the shape according to the settings

draw_points

Draw points in space

draw_reaction_label

Draw the reaction labels (force magnitude) on the supports according to the settings

draw_reactions

Draw the reaction vectors on the supports according to the settings

draw_shape

Draw the shape (intrados + extrados) according to the settings

draw_shape_normals

Draw the shape normals at intrados and extrados surfaces

draw_thrust

Draw thrust network according to the settings

draw_thrustsurface

Draw a mesh to the viewer, if no mesh is given the self.thrust is taken

draw_vector

Helper to add vectors to the plotter.

initiate_app

Initiate the App with the default camera options

save

Save to a path

scale_edge_thickness

set_camera

Set the camera options (can also be set directly modifying the settings dictionary)

show

Display the viewer in the screen

show_solution

Show the thrust network, with the shape according to the settings

to_json

to_objects

Generate General objects (dicts) from the added elements in the viewer (WIP).