View

Accessed via app.view.

ViewFacade

class pyrobotstructural.view.facade.ViewFacade(raw_app)[source]

Bases: object

Facade for controlling the Robot viewport and capturing screenshots.

Accessed via app.view. Aggregates the view control and screenshot managers.

Parameters:

raw_app (Any)

ViewManager

class pyrobotstructural.view.view.ViewManager(raw_app)[source]

Bases: _BaseEditor

Parameters:

raw_app (Any)

get_current_view()[source]

Returns current IRobotView object

Return type:

Any

manipulate(zoom_factor=None, rotation_x=None, rotation_y=None, rotation_z=None, pan_up=0.0, pan_right=0.0, window_width=None, window_height=None)[source]

Manipulates view zoom, rotation and size. This function is not perfect, requires a lot of iterations to achieve desired results.

Parameters:
  • zoom_factor (float | Any) – Zoom factor, while more than 1 means zoom is closer to structure, and less, zoom is farther from structure.

  • rotation_x (float | Any) – Rotation in degrees around x axis.

  • rotation_y (float | Any) – Rotation in degrees around y axis.

  • rotation_z (float | Any) – Rotation in degrees around z axis.

  • pan_up (float) – Pans up the view

  • pan_right (float) – Pans right the view

  • window_width (float | Any) – Width of the window in mm

  • window_height (float | Any) – Height of the window in mm

Return type:

None

display(node_numbers=None, bar_numbers=None, section_shapes=None, panel_interiors=None, dimension_lines=None, offsets=None, supports=None, releases=None, with_codes=False, panel_colors=None, section_colors=None, member_lcs=None, panel_lcs=None)[source]

Function controls what is displayed in the view. There are many parameters in the API documentation I.2.12. not all are added here.

Parameters:
  • nodes_numbers (bool) – Trigger node numbers display

  • bar_numbers (bool | None) – Trigger bar numbers display

  • section_shapes (bool | None) – Section shapes display

  • panel_interiors (bool | None) – Panel interiors display

  • dimension_lines (bool | None) – Dimension lines display

  • offsets (bool | None) – Offsets display

  • supports (bool | None) – Supports display

  • releases (bool | None) – Supports display

  • with_codes (bool) – Codes display for supports or releases

  • panel_colors (bool | None) – Panel colors display

  • section_colors (bool | None) – Section colors display

  • member_lcs (bool | None) – Member local coordinate system display

  • panel_lcs (bool | None) – Panel local coordinate system display

  • node_numbers (bool | None)

Return type:

None

loads_display(display=True, symbols=False, values=False, symbol_size=None, cases='Simple Cases')[source]

Function controls if loads are to be displayed in the view.

Parameters:
  • display (bool) – If False, all load symbols and values are hidden regardless of other parameters.

  • symbols (bool) – Load symbols display

  • values (bool) – Load values display

  • size (symbol) – Symbol size in range 1 to 10.

  • cases (str) – Cases to display. Accepts ‘Simple Cases’, ‘Combinations’, ‘all’, or space-separated case numbers e.g. ‘1 2 3’.

  • symbol_size (int | Any)

Return type:

None

display_displacements(display=False, labels=True, scale=1, exact=False, cases='Simple Cases')[source]

Displays deflection.

Parameters:
  • display (bool) – Trigger to display deflection.

  • labels (bool) – Trigger to display labels.

  • scale (int) – Rescale the labels.

  • exact (bool) – Trigger exact deformation for rebars.

  • cases (str) – Cases to display. Accepts ‘Simple Cases’, ‘Combinations’, ‘all’, or space-separated case numbers e.g. ‘1 2 3’.

Return type:

None

display_member_forces(display=True, Fx=False, Fy=False, Fz=False, Mx=False, My=False, Mz=False, labels=True, scale=None, filling=False, pos_neg=False, values_type='all', cases='Simple Cases')[source]

Displays member forces as diagram or map.

Parameters:
  • display (bool) – If False, all member force diagrams are hidden regardless of other parameters.

  • Fx (bool) – Trigger Fx forces display.

  • Fy (bool) – Trigger Fy forces display.

  • Fz (bool) – Trigger Fz forces display.

  • Mx (bool) – Trigger Mx forces display.

  • My (bool) – Trigger My forces display.

  • Mz (bool) – Trigger Mz forces display.

  • labels (bool) – Trigger to display labels.

  • scale (int | Any) – Rescale the labels.

  • filling (bool) – Filling of the diagram.

  • pos_neg (bool) – Positive-negative differentiated.

  • values_type (str) – Change display type of the values, possible: “global extremes”, “all”, “local extremes”

  • cases (str) – Cases to display. Accepts ‘Simple Cases’, ‘Combinations’, ‘all’, or space-separated case numbers e.g. ‘1 2 3’.

Return type:

None

display_utilisations(display=True, labels=True, text=False, thickness_coeff=5, cases='Simple Cases')[source]

Display utilisations of members in for of map on members. Make sure results from verification are available, otherwise this will fail.

Parameters:
  • display (bool) – Trigger to display deflection.

  • labels (bool) – Trigger to display labels.

  • text (bool) – Trigger to display text instead of labels. If True, then overwrites labels.

  • thickness_coeff (int) – Thickness map coefficient.

  • cases (str) – Cases to display. Accepts ‘Simple Cases’, ‘Combinations’, ‘all’, or space-separated case numbers e.g. ‘1 2 3’.

Return type:

None

display_stresses(display=True, s_max=False, s_min=False, mises=False, labels=False, text=False, thickness_coeff=5, cases='Simple Cases')[source]

Displays stressess on bar.

Parameters:
  • display (bool) – Trigger to display stresses.

  • s_max (bool) – Display maximal stress

  • s_min (bool) – Display minimal stress

  • mises (bool) – Display von misses stress

  • labels (bool) – Trigger to display labels.

  • text (bool) – Trigger to display text instead of labels. If True, then overwrites labels.

  • thickness_coeff (int) – Thickness map coefficient.

  • cases (str) – Cases to display. Accepts ‘Simple Cases’, ‘Combinations’, ‘all’, or space-separated case numbers e.g. ‘1 2 3’.

Return type:

None

display_member_stresses(display=True, s_max=False, s_min=False, labels=True, text=False, cases='Simple Cases')[source]

Displays member stresses as diagrams along members via ParamsDiagram.

Parameters:
  • display (bool) – If False, all member stress diagrams are hidden regardless of other parameters.

  • s_max (bool) – Display maximum normal stress diagram.

  • s_min (bool) – Display minimum normal stress diagram.

  • labels (bool) – Trigger to display labels.

  • text (bool) – Trigger to display text instead of labels. If True, overwrites labels.

  • cases (str) – Cases to display. Accepts ‘Simple Cases’, ‘Combinations’, ‘all’, or space-separated case numbers e.g. ‘1 2 3’.

Return type:

None

display_reactions(display=True, Rx=False, Ry=False, Rz=False, Mx=False, My=False, Mz=False, local_system=False, cases='Simple Cases')[source]

Display reactions

Parameters:
  • display (bool) – If False, all reaction diagrams are hidden regardless of other parameters.

  • Rx (bool) – Trigger Rx reaction display.

  • Ry (bool) – Trigger Ry reaction display.

  • Rz (bool) – Trigger Rz reaction display.

  • Mx (bool) – Trigger Mx reaction display.

  • My (bool) – Trigger My reaction display.

  • Mz (bool) – Trigger Mz reaction display.

  • local_system (bool) – Trigger local system reactions display.

  • cases (str) – Cases to display. Accepts ‘Simple Cases’, ‘Combinations’, ‘all’, or space-separated case numbers e.g. ‘1 2 3’.

Return type:

None

restore_default()[source]

Apply a clean default view state.

Resets every display attribute to a neutral starting point: structure visible, all result diagrams off, no load symbols, no annotations except support symbols.

Return type:

None

clear_results()[source]

Hide all results currently displayed in the view.

Turns off member force diagrams, deformation diagrams, reaction diagrams, member map results (utilisations, stresses), and shell/FE map results. Structure display settings (node numbers, supports, etc.) are not affected.

Return type:

None

display_shell_forces(Mxx, Myy, Mxy, Qxx, Qyy, results_lcs=0)[source]
Return type:

None

display_reinforcement_results(display=True, Ax_neg=False, Ax_pos=False, Ay_neg=False, Ay_pos=False, deflection=False, crack_x_neg=False, crack_x_pos=False, crack_y_neg=False, crack_y_pos=False, cases='Simple Cases')[source]

Display reinforcement results for shell/FE panels as a map.

Only one result type can be active at a time. When multiple flags are True, the first matching one in the order listed below is applied. Reinforcement area results use IRobotViewFeMapResultType; cracking and deflection results use IRobotViewReinforcementResultType.

Priority order: Ax_neg → Ax_pos → Ay_neg → Ay_pos → deflection → crack_x_neg → crack_x_pos → crack_y_neg → crack_y_pos.

Parameters:
  • display (bool) – If False, hides all FE map results regardless of other parameters.

  • Ax_neg (bool) – Display bottom (negative face) reinforcement area in the X direction (I_VFMRT_COMPLEX_REINFORCE_BOTTOM_MXX).

  • Ax_pos (bool) – Display top (positive face) reinforcement area in the X direction (I_VFMRT_COMPLEX_REINFORCE_TOP_MXX).

  • Ay_neg (bool) – Display bottom (negative face) reinforcement area in the Y direction (I_VFMRT_COMPLEX_REINFORCE_BOTTOM_MYY).

  • Ay_pos (bool) – Display top (positive face) reinforcement area in the Y direction (I_VFMRT_COMPLEX_REINFORCE_TOP_MYY).

  • deflection (bool) – Display deflection values (I_VRRT_F).

  • crack_x_neg (bool) – Display crack width on the bottom (negative) face in the X direction (I_VRRT_AX).

  • crack_x_pos (bool) – Display crack width on the top (positive) face in the X direction (I_VRRT_AX).

  • crack_y_neg (bool) – Display crack width on the bottom (negative) face in the Y direction (I_VRRT_AY).

  • crack_y_pos (bool) – Display crack width on the top (positive) face in the Y direction (I_VRRT_AY).

  • cases (str) – Cases to display. Accepts ‘Simple Cases’, ‘Combinations’, ‘all’, or space-separated case numbers e.g. ‘1 2 3’.

Return type:

None

ScreenshotManager

class pyrobotstructural.view.screenshot.ScreenshotManager(raw_app)[source]

Bases: _BaseEditor

Parameters:

raw_app (Any)

save_screenshot(name, dir_path, view=None)[source]

Takes a screenshot, stores it in clipboard and saves as .png under given path and name.

Parameters:
  • name (str) – Name of the image.

  • dir_path (str) – Path of the directory, where screenshot is to be saved.

  • view (Any) – View of which screenshot to be taken.

Return type:

None