Skip to content

LabelingUtil

implementation of the labeling utility functions

LabelingUtil

Canonical path: Utils.Reinforcement.LabelingUtil.LabelingUtil

implementation of the labeling utility functions

get_dim_line_placement_data staticmethod

get_dim_line_placement_data(
    exclude_area_min_max: MinMax2D,
    bars_rep_util: BarsRepresentationUtil,
    placement_line: Line2D,
    bars_rep_line: Line2D,
    dist_from_exclude_area: float,
    swap_placement: bool,
) -> tuple[float, bool, float]

get the placement data of the dimension line

Parameters:

  • exclude_area_min_max (MinMax2D) –

    min/max box of the exclude area

  • bars_rep_util (BarsRepresentationUtil) –

    bars representation utility

  • placement_line (Line2D) –

    placement line

  • bars_rep_line (Line2D) –

    representation line

  • dist_from_exclude_area (float) –

    distance from the exclude area

  • swap_placement (bool) –

    swap the placement state

Returns:

  • tuple[float, bool, float]

    dim line offset, at start or end, start offset

is_swap_text_angle staticmethod

is_swap_text_angle(dim_line_angle: Angle) -> bool

check if the text angle should be swapped

Parameters:

  • dim_line_angle (Angle) –

    dimension line angle

Returns:

  • bool

    swap state

Placeholder