OpeningPointsUtil
implementation of the opening points utilities
OpeningPointsUtil
Canonical path: Utils.Architecture.OpeningPointsUtil.OpeningPointsUtil
implementation of the opening points utilities
calc_point_at_placement_arc
staticmethod
calc_point_at_placement_arc(
local_dist: float, placement_arc: Arc2D, placement_polyline: Polyline2D
) -> tuple[bool, Point2D]
calculate the point at the placement arc
Parameters:
-
local_dist
(float
) –local point distance at the placement arc
-
placement_arc
(Arc2D
) –placement arc
-
placement_polyline
(Polyline2D
) –placement polyline
Returns:
create_opening_end_point_for_axis_element
staticmethod
create_opening_end_point_for_axis_element(
opening_start_pnt: Point2D,
opening_width: float,
element_axis: Line2D | Arc2D,
element_polygon: Polygon2D | Polyline2D,
placement_line: Line2D,
) -> Point2D
create the opening points for an axis element
Parameters:
-
opening_start_pnt
(Point2D
) –opening start point
-
opening_width
(float
) –opening width
-
element_axis
(Line2D | Arc2D
) –element axis
-
element_polygon
(Polygon2D | Polyline2D
) –element polygon / polyline
-
placement_line
(Line2D
) –placement line
Returns:
-
Point2D
–end point of the opening
create_opening_end_point_for_shaped_element
staticmethod
create_opening_points_for_axis_element
staticmethod
get_distance_from_offset_end_point
staticmethod
get_distance_from_offset_end_point(
input_pnt: Point3D,
element_axis: Line2D | Arc2D | None,
offset_end_pnt: Point2D,
placement_line: Line2D,
placement_arc: Arc2D | None,
element_polygon: Polygon2D | Polyline2D,
) -> float
get the local distance between input and offset end point
Parameters:
-
input_pnt
(Point3D
) –input point
-
element_axis
(Line2D | Arc2D | None
) –element axis
-
offset_end_pnt
(Point2D
) –offset end point
-
placement_line
(Line2D
) –placement line
-
placement_arc
(Arc2D | None
) –placement arc
-
element_polygon
(Polygon2D | Polyline2D
) –element polygon / polyline
Returns:
-
float
–distance between input and start point
get_distance_from_offset_start_point
staticmethod
get_distance_from_offset_start_point(
input_pnt: Point3D,
element_axis: Line2D | Arc2D | None,
offset_start_pnt: Point2D,
placement_line: Line2D,
placement_arc: Arc2D | None,
element_polygon: Polygon2D | Polyline2D,
) -> float
get the local distance between input and offset start point
Parameters:
-
input_pnt
(Point3D
) –input point
-
element_axis
(Line2D | Arc2D | None
) –element axis
-
offset_start_pnt
(Point2D
) –offset start point
-
placement_line
(Line2D
) –placement line
-
placement_arc
(Arc2D | None
) –placement arc
-
element_polygon
(Polygon2D | Polyline2D
) –element polygon / polyline
Returns:
-
float
–distance between input and start point
get_opening_offset_points
staticmethod
get_opening_offset_points(
element: BaseElementAdapter,
opening_start_pnt: Point2D,
placement_line: Line2D,
) -> tuple[bool, Point2D, Point2D]
get the left and right point for the opening offset
Parameters:
-
element
(BaseElementAdapter
) –element for the opening
-
opening_start_pnt
(Point2D
) –opening start point
-
placement_line
(Line2D
) –placement line from the opening start point
Returns:
get_start_point_from_end_offset
staticmethod
get_start_point_from_end_offset(
element_axis: Line2D | Arc2D | None,
offset_end_pnt: Point2D,
placement_line: Line2D,
placement_arc: Arc2D | None,
opening_width: float,
element_polygon: Polygon2D | Polyline2D,
offset: float,
) -> tuple[bool, Point2D]
get the start point by an offset from an offset start point
Parameters:
-
element_axis
(Line2D | Arc2D | None
) –element axis
-
offset_end_pnt
(Point2D
) –offset end point
-
placement_line
(Line2D
) –placement line
-
placement_arc
(Arc2D | None
) –placement arc
-
opening_width
(float
) –opening width
-
element_polygon
(Polygon2D | Polyline2D
) –element polygon / polyline
-
offset
(float
) –offset from the offset start point
Returns:
get_start_point_from_start_offset
staticmethod
get_start_point_from_start_offset(
element_axis: Line2D | Arc2D | None,
offset_start_pnt: Point2D,
placement_line: Line2D,
placement_arc: Arc2D | None,
element_polygon: Polygon2D | Polyline2D,
offset: float,
) -> tuple[bool, Point2D]
get the start point by an offset from an offset start point
Parameters:
-
element_axis
(Line2D | Arc2D | None
) –element axis
-
offset_start_pnt
(Point2D
) –offset start point
-
placement_line
(Line2D
) –placement line
-
placement_arc
(Arc2D | None
) –placement arc
-
element_polygon
(Polygon2D | Polyline2D
) –element polygon / polyline
-
offset
(float
) –offset from the offset start point
Returns: