Skip to content

BarsDimLinePlacement

implementation of the BarsDimLinePlacement class

BarsDimLinePlacement

Canonical path: Utils.Reinforcement.BarsDimLinePlacement.BarsDimLinePlacement

implementation of the BarsDimLinePlacement class

__init__

__init__(bars_rep_elements: list[BarsRepresentation])

initialize

Parameters:

get_dim_line_position

get_dim_line_position(
    bars_representation: BarsRepresentation,
    bars_rep_util: BarsRepresentationUtil,
    offset_from_placement: float,
    dim_line_distance: float,
    dim_line_angle_from: float,
    dim_line_angle_to: float,
    text_dist: float,
) -> tuple[bool, bool, float, TextAlignment, Line2D]

get the dimension line position

Parameters:

  • bars_representation (BarsRepresentation) –

    representation element

  • bars_rep_util (BarsRepresentationUtil) –

    bars representation utility

  • offset_from_placement (float) –

    offset from the placement

  • dim_line_distance (float) –

    dimension line distance

  • dim_line_angle_from (float) –

    dimension line angle from

  • dim_line_angle_to (float) –

    dimension line angle to

  • text_dist (float) –

    text distance from the dimension line

Returns:

  • tuple[bool, bool, float, TextAlignment, Line2D]

    location at start, distance from the placement, text alignment, handle point

get_label_offset

get_label_offset(
    bars_rep: BarsRepresentation,
    dim_line: Line2D,
    bars_ref_line_util: BarsRepresentationLineUtil,
    text_dist: float,
) -> Vector2D

get the label offset in case of intersection with the center bar

Parameters:

Returns:

reset

reset()

reset the data

select_dim_line_bars_rep

select_dim_line_bars_rep(
    input_pnt: Point3D, min_dist: float, text_dist: float
) -> GUID | None

select the dimension line bars representation

Parameters:

  • input_pnt (Point3D) –

    input point

  • min_dist (float) –

    minimum distance

  • text_dist (float) –

    text distance from the dimension line

Returns:

  • GUID | None

    selected bars representation element

set_dim_line_position

set_dim_line_position(
    bars_rep_ele_guid: GUID, dim_line_offset: float, dim_line: Line2D
)

set the dimension line position

Parameters:

  • bars_rep_ele_guid (GUID) –

    guid of the representation element

  • dim_line_offset (float) –

    dimension line offset

  • dim_line (Line2D) –

    dimension line

swap_dim_line_position

swap_dim_line_position(bars_rep_ele_guid: GUID)

swap the dimension line position

Parameters:

  • bars_rep_ele_guid (GUID) –

    guid of the representation element

Placeholder