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:

  1. Letter F — the identifier letter must be "F"

  2. Nearby FillArrow — a FillArrow leader must be attached to or near the annotation

To see the code behind these conditions, see Going Further at the end of this page.

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 TypeNote annotation

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()

Going Further: Inside the Detection#

For readers who want to see how the detector works

This feature has no class of its own: an indicator is a pair (IdentifierInfo, Entity) — the parsed identifier (view/identifier_info.py) and the TypeNote carrying it — and the recipe is the FeaturedView property itself (view/featured_view.py). FeaturedSheet.auxiliary_view_indicators concatenates the views’ results.

@cached_property
def auxiliary_view_indicators(self) -> list[tuple[IdentifierInfo, Entity]]:
    """Detect auxiliary view indicator annotations (renvois de vues auxiliaires).

    Returns TypeNotes matching the identifier pattern with letter ``"F"`` and
    a nearby FillArrow, that are **not** part of any title or section line
    indicator. These represent auxiliary view references (e.g., ``"F2 2/3"``,
    ``"F3"``), typically labeled "VUE SUIVANT F..." on the target view.

    :return: List of (IdentifierInfo, Entity) tuples for each auxiliary view indicator.
    """
    results: list[tuple[IdentifierInfo, Entity]] = []
    for note in self.notes:
        identifier_info = self._match_auxiliary_identifier(note)
        if identifier_info is None:
            continue
        if not self._has_nearby_arrow(note):
            continue
        results.append((identifier_info, note))
    return results

The two guards are the two conditions of What is an Auxiliary View Indicator?:

  • _match_auxiliary_identifier skips the notes already claimed by the view title or a section line indicator (_excluded_entity_ids), parses the text with match_text_against_pattern and DEFAULT_INDICATOR_PATTERN, and keeps the letter AUXILIARY_VIEW_LETTER only;

  • _has_nearby_arrow (has_nearby_arrow in view/annotations/composite_arrows.py) asks for a FillArrow leader on the note or a CompositeEntity arrow drawn next to it — the same arrow collection the section line detector uses.