Dimension Analysis#
The dimension analysis module provides advanced tools for analyzing dimensions in technical drawings and extracting their relationships with geometric entities.
Purpose#
Dimensions in technical drawings do more than display measurements - they define relationships between geometric elements. This module provides:
Constraint Point Detection: Identifies the geometric points that a dimension constrains
Geometry-Dimension Mapping: Links dimensions to their referenced geometries
Metadata Extraction: Extracts additional information from dimension annotations
Dimension Classification: Categorizes dimensions by type (linear, angular, radial, etc.)
These capabilities are useful for:
Understanding which geometries are constrained by dimensions
Validating dimension coverage
Extracting structured measurement data
Automated design verification
Note
Because development is ongoing, detailed documentation for dimension analysis is not yet available.
Please refer to the API Reference for available classes and methods
in the drawing_tools.view.annotations.dimensioning module.
A working example is however available in scripts/view_graph.py.
Visualization#
Dimension, tolerance, and roughness annotations can be visualized using dedicated
@plot_data_view methods available on FeaturedView, FeaturedSheet, and
FeaturedDrawing:
# Dimension overlays (colored labels per dimension)
featured_view.plot_data_dimensions().plot()
featured_sheet.plot_data_dimensions().plot()
featured_drawing.plot_data_dimensions().plot()
# Geometrical tolerance overlays (green outlines)
featured_view.plot_data_geometrical_tolerances().plot()
featured_sheet.plot_data_geometrical_tolerances().plot()
featured_drawing.plot_data_geometrical_tolerances().plot()
# Surface roughness overlays (blue outlines)
featured_view.plot_data_roughness().plot()
featured_sheet.plot_data_roughness().plot()
featured_drawing.plot_data_roughness().plot()
See Display & Report Methods for interactive examples on the GICLEUR and LH SUPPORT ACCUMULATOR drawings.
The structured parsing of dimension texts (main value, prefix, tolerance kind) is
provided by DimensionParser from
dessia_drawing. GeometryDimensionGraph (see Graph-Based Analysis) attaches the
parsed attributes to each dimension node and uses
build_compact_dimension_label() to build
the on-canvas label.