Auxiliary View Indicators#
from pathlib import Path
from dessia_drawing.core import Drawing
from drawing_tools.config.default_language_configs import DEFAULT_ENGLISH_CONFIG, DEFAULT_FRENCH_CONFIG
from drawing_tools.featured_drawing import FeaturedDrawing
_DATA_DIR = Path("data/json")
drawing = Drawing.from_json(str(_DATA_DIR / "condor/condor_BEAM_ASSY.json"))
featured_drawing = FeaturedDrawing(drawing, language_configs=[DEFAULT_FRENCH_CONFIG, DEFAULT_ENGLISH_CONFIG])
featured_sheet = featured_drawing.sheets[1]
featured_view = featured_sheet.views[0]
featured_view.plot_data_auxiliary_view_indicators().plot()
featured_sheet.plot_data_auxiliary_view_indicators().plot()
featured_view.plot_data_all_identifiers().plot()
featured_sheet.plot_data_all_identifiers().plot()
Auxiliary view indicators are TypeNote annotations with letter F and a
nearby FillArrow that are not part of a detected view title or section line
indicator. They represent auxiliary view references (renvois de vues
auxiliaires) — labels pointing toward where an auxiliary view (“VUE SUIVANT F…”)
is taken.
See also
For the related section line indicator detection, see
Section Line Indicators. For a working example combining both features,
see scripts/section_lines_and_auxiliary_view_indicators.py.
What is an Auxiliary View Indicator?#
On a technical drawing, when an auxiliary view is defined elsewhere, a label with a FillArrow is placed on the parent view to indicate the viewing direction. For example:
"F3"— reference to auxiliary view F3 (same sheet, no cross-reference)"F1 2/3"— reference to view F1, defined on sheet 2 of 3"F2 2/3"— reference to view F2, defined on sheet 2 of 3
Detection requires two conditions beyond the identifier pattern match:
Letter F — the identifier letter must be
"F"Nearby FillArrow — a FillArrow leader must be attached to or near the annotation
Accessing Auxiliary View Indicators#
Auxiliary view indicators are detected automatically on each FeaturedView:
for sheet in featured_drawing.sheets:
for view in sheet.views:
for identifier_info, entity in view.auxiliary_view_indicators:
text = entity.get_text_content().strip()
print(f"{text!r} -> {identifier_info.to_label()}")
Each entry is a tuple of (IdentifierInfo, Entity) where:
``identifier_info`` has the same fields as for section line indicators (
identifier,letter,number,cross_reference, etc.)``entity`` is the source
TypeNoteannotation
View-Level Visualization#
The following visualization shows auxiliary view indicators on the “VUE DE FACE”
view of the BEAM ASSY drawing (Sheet 1). Three indicators are detected:
F3, F1 2/3, and F2 2/3.
Source: condor_BEAM_ASSY.json, Sheet 1, VUE DE FACE
featured_view.plot_data_auxiliary_view_indicators().plot()
Sheet-Level Visualization#
Auxiliary view indicators can also be visualized at the sheet level:
Source: condor_BEAM_ASSY.json, Sheet 1
featured_sheet.plot_data_auxiliary_view_indicators().plot()
All Identifiers Combined#
The plot_data_all_identifiers method combines overlays from all three
identifier sources: view titles, section line indicators, and auxiliary view
indicators.
Source: condor_BEAM_ASSY.json, Sheet 1, VUE DE FACE
featured_view.plot_data_all_identifiers().plot()
Source: condor_BEAM_ASSY.json, Sheet 1
featured_sheet.plot_data_all_identifiers().plot()