drawing_tools.helpers package#
Subpackages#
- drawing_tools.helpers.dimension package
- Submodules
- drawing_tools.helpers.dimension.constraint_points module
DimensionConstraintPointDimensionConstraintPoint.pointDimensionConstraintPoint.source_typeDimensionConstraintPoint.source_objectDimensionConstraintPoint.source_indexDimensionConstraintPoint.direction_vectorDimensionConstraintPoint.__post_init__()DimensionConstraintPoint.matches_direction()DimensionConstraintPoint.__init__()
DimensionConstraintPointsProcessor
- drawing_tools.helpers.dimension.geometry module
- Module contents
DimensionConstraintPointDimensionConstraintPoint.pointDimensionConstraintPoint.source_typeDimensionConstraintPoint.source_objectDimensionConstraintPoint.source_indexDimensionConstraintPoint.direction_vectorDimensionConstraintPoint.__post_init__()DimensionConstraintPoint.matches_direction()DimensionConstraintPoint.__init__()
DimensionConstraintPointsProcessorfind_edges_near_points()
- drawing_tools.helpers.visualization package
- Production overlays (
overlays/) - drawing_tools.helpers.visualization.overlays.featured module
build_detection_view_frame_primitive()collect_view_index_overlay_primitives()collect_balloon_overlay_primitives()collect_balloon_flags_overlay_primitives()collect_bonding_symbol_overlay_primitives()collect_aircraft_orientation_overlay_primitives()collect_section_line_overlay_primitives()collect_aircraft_reference_line_overlay_primitives()collect_title_overlay_primitives()collect_auxiliary_view_indicator_overlay_primitives()collect_all_identifier_overlay_primitives()collect_sheet_title_overlay_primitives()collect_sheet_section_line_overlay_primitives()collect_sheet_aircraft_reference_line_overlay_primitives()collect_sheet_table_overlay_primitives()collect_sheet_balloon_overlay_primitives()collect_sheet_bonding_symbol_overlay_primitives()collect_sheet_aircraft_orientation_overlay_primitives()collect_sheet_balloon_flags_overlay_primitives()collect_sheet_sets_overlay_primitives()collect_sheet_auxiliary_view_indicator_overlay_primitives()collect_sheet_all_identifier_overlay_primitives()collect_composite_arrow_leaders()collect_view_arrow_head_overlay_primitives()collect_view_leader_overlay_primitives()collect_sheet_composite_arrow_leaders()collect_sheet_arrow_head_overlay_primitives()collect_sheet_leader_overlay_primitives()
- drawing_tools.helpers.visualization.overlays.verdict module
- drawing_tools.helpers.visualization.overlays.sheet_sets module
- drawing_tools.helpers.visualization.overlays.detected_table module
- Other modules
- drawing_tools.helpers.visualization.palette module
- drawing_tools.helpers.visualization.edge_constraint_graph module
LabelParametersRelationshipVisualizationConfigRelationshipVisualizationConfig.RELATIONSHIP_COLORSRelationshipVisualizationConfig.RELATIONSHIP_LINE_STYLESRelationshipVisualizationConfig.CONNECTION_POINT_SIZERelationshipVisualizationConfig.EDGE_LINE_WIDTHRelationshipVisualizationConfig.RELATIONSHIP_LINE_WIDTHRelationshipVisualizationConfig.SYMBOL_SIZERelationshipVisualizationConfig.TEXT_SIZERelationshipVisualizationConfig.HIGHLIGHT_WIDTHRelationshipVisualizationConfig.ANNOTATION_OFFSETRelationshipVisualizationConfig.LEGEND_START_XRelationshipVisualizationConfig.LEGEND_START_YRelationshipVisualizationConfig.LEGEND_ROW_HEIGHTRelationshipVisualizationConfig.LEGEND_LINE_LENGTHRelationshipVisualizationConfig.LEGEND_TEXT_OFFSETRelationshipVisualizationConfig.TITLE_FONT_SIZERelationshipVisualizationConfig.TITLE_OFFSET_YRelationshipVisualizationConfig.DEFAULT_TITLE_XRelationshipVisualizationConfig.DEFAULT_TITLE_YRelationshipVisualizationConfig.SYMMETRY_AXIS_EXTENTRelationshipVisualizationConfig.SYMMETRY_AXIS_PATTERNRelationshipVisualizationConfig.ARROW_SIZE_FACTORRelationshipVisualizationConfig.ARROW_HEAD_SIZE_FACTORRelationshipVisualizationConfig.ARROW_PERPENDICULAR_FACTORRelationshipVisualizationConfig.INTERSECTION_TOLERANCE
BaseRelationshipVisualizerCoincidentRelationshipVisualizerTangentRelationshipVisualizerConcentricRelationshipVisualizerParallelRelationshipVisualizerPerpendicularRelationshipVisualizerSymmetricRelationshipVisualizerEdgeConstraintGraphVisualizervisualize_view_constraint_graph()analyze_constraint_graph_patterns()
- Developer diagnostics (
debug/) - drawing_tools.helpers.visualization.debug.sheet_table_detector module
VisualizationColorsVisualizationLayoutVisualizationLayout.PANEL_MARGIN_XVisualizationLayout.PANEL_MARGIN_YVisualizationLayout.PANEL_SPACING_YVisualizationLayout.LINE_HEIGHTVisualizationLayout.LABEL_OFFSET_YVisualizationLayout.HEADER_FONT_SIZEVisualizationLayout.NORMAL_FONT_SIZEVisualizationLayout.INFO_FONT_SIZEVisualizationLayout.ELLIPSE_SEGMENTSVisualizationLayout.KEPT_LINE_WIDTHVisualizationLayout.REJECTED_LINE_WIDTHVisualizationLayout.NEIGHBORHOOD_LINE_WIDTHVisualizationLayout.CONNECTION_LINE_WIDTHVisualizationLayout.CENTER_MARKER_WIDTHVisualizationLayout.NEIGHBORHOOD_DASHVisualizationLayout.CONNECTION_DASHVisualizationLayout.STATS_HEADERVisualizationLayout.STATS_SEPARATOR
ConnectivityFilterVisualizerConnectivityFilterVisualizer.__init__()ConnectivityFilterVisualizer.generate_plot()ConnectivityFilterVisualizer.draw_lines()ConnectivityFilterVisualizer.draw_neighborhoods()ConnectivityFilterVisualizer.draw_connections()ConnectivityFilterVisualizer.add_statistics_panel()ConnectivityFilterVisualizer.add_color_legend()ConnectivityFilterVisualizer.add_rejected_lines_info()
- drawing_tools.helpers.visualization.debug.table_detection_pipeline module
- Module contents
- Production overlays (
Submodules#
drawing_tools.helpers.geometry module#
Generic geometry helper functions.
HORIZONTAL and VERTICAL are the orientation vocabulary
orientation_from_direction() returns, and the one every caller compares against;
a direction aligned with neither is reported as None rather than by a third value.
Orientation types that vocabulary, so a stray string is caught by the type checker
rather than at the dictionary lookup it would fail in.
AXIS_ALIGNMENT_TOLERANCE is the aperture that decides it, as the sine of the largest
angle still read as aligned. It is deliberately not called an angle tolerance: the balloon
helpers already export a HORIZONTAL_ANGLE_TOLERANCE measured in radians, and the two
must not be confused.
- drawing_tools.helpers.geometry.points_coincide(p1: Any, p2: Any, tolerance: float = 1e-06) bool#
Check if two points are at the same position within tolerance.
- Parameters:
p1 – First point with
xandyattributes.p2 – Second point with
xandyattributes.tolerance – Maximum distance per axis for coincidence.
- Returns:
True if both coordinates match within tolerance.
- drawing_tools.helpers.geometry.segments_coincide(seg_a: Any, seg_b: Any, tolerance: float = 1e-06) bool#
Check if two segments are coincident (same endpoints, possibly reversed).
- Parameters:
seg_a – First segment with
startandendattributes.seg_b – Second segment with
startandendattributes.tolerance – Point coincidence tolerance.
- Returns:
True if the segments share the same endpoints.
- drawing_tools.helpers.geometry.is_full_circle(edge: Edge) bool#
Check whether an edge is an arc sweeping a full turn.
- Parameters:
edge – The edge to test.
- Returns:
True for a closed circle (a
FullArc2D, or anArc2Dof angle 2 pi).
- drawing_tools.helpers.geometry.get_arc_radius(edge: Edge) float#
Get the radius of an arc edge.
Works around
Edge.get_arc_radius, which returnsself.radiusinstead of the geometry’s and therefore raisesAttributeErrorfor EVERY arc — an upstream dessia_drawing typo. Its siblingEdge.get_arc_centeris fine and is used directly.- Parameters:
edge – An arc edge (
Arc2DorFullArc2D); anything else raisesAttributeError.- Returns:
The radius.
- drawing_tools.helpers.geometry.is_segment_inside_circle(segment: Edge, center: Point2D, radius: float) bool#
Check whether both endpoints of a straight segment lie inside a circle.
Containment of the whole segment follows only because a disk is convex, so this holds for a LINE SEGMENT: on a curved edge, both endpoints inside says nothing about the middle.
- Parameters:
segment – The line segment to test.
center – The circle center.
radius – The circle radius.
- Returns:
True when both endpoints lie inside the circle.
- drawing_tools.helpers.geometry.orientation_from_direction(direction_x: float, direction_y: float, tolerance: float = 0.09) Literal['horizontal', 'vertical'] | None#
Tell whether a direction runs horizontally, vertically, or neither.
Works for anything that has a direction: a segment through its direction vector, a text through
(cos(angle), sin(angle)). The off-axis component is compared to the tolerance scaled by the vector’s own norm, so the tolerance reads as the sine of the largest angle still accepted as aligned whatever the length of the vector passed in. A direction of zero length points nowhere and is reported as such.- Parameters:
direction_x – Horizontal component of the direction.
direction_y – Vertical component of the direction.
tolerance – Sine of the maximum angle to an axis for the direction to count as aligned with it.
- Returns:
HORIZONTAL,VERTICAL, orNonefor an oblique or null direction.
Module contents#
Package initialization.