Track F starts here; the three group branches are cut from this commit. - engineering/arch/model.py: Wall, Opening, Stair and Room as frozen dataclasses, and every refusal of spec 4 before anything is drawn, by path (walls[2].thickness): finite positive numbers, an axis of at least two distinct points with no zero-length segment, an arc segment refused by name rather than approximated, an opening on an unknown wall, past its wall, across an axis vertex or overlapping another (both ids named), an unknown material, and a typed room area - areas are measured, never typed. The plan travels as ACADMCP_ARCH XDATA; an opening's door/window kind and a stair's straight/l/u kind ride beside the payload kind as opening_kind / stair_kind, because one key cannot hold both. - engineering/arch/layers.py: the arch set - thirteen ISO 13567-style layers with ISO 128 lineweights only (0.05 mm on the construction scratch layer, as every set in this repository) - and ARCH_ROLE_LAYER, the one place a role becomes a layer. Registered in engineering/layers.py last, which is what keeps the engineering.layers <-> engineering.arch import cycle closed. - engineering/arch/materials.py: eight wall materials, one pattern each, every row citing its source: ANSI31 for brick (ISO 128-50 general hatching, acadiso.pat's own "Iron, Brick, Stone masonry"), AAC as ANSI31 at twice the spacing (a repository convention, and it says so), AR-CONC / AR-SAND as AutoCAD patterns, and the JIS A 0150 RC / stone / wood symbols. Reinforced concrete cannot be ANSI31 and AR-CONC in one HATCH, so it takes the one symbol that names it. Periods on a 1:50 sheet are recomputed from ezdxf's own pattern definitions by the tests. normalise_material is the one reading of a material name, shared by the model and wall_hatch, so the model never refuses "Reinforced Concrete" that the hatch table resolves. - engineering/arch/lang.py: EN / TR vocabulary, D/W and K/P tag prefixes, and the decimal comma for lang="tr" (24,50 m2). - draw_prims(role_layer=) and the XDATA codec's app_id= / kinds=: both generalised with the mechanical defaults, and the mechanical suite passes unchanged against them - that is the regression gate. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
67 lines
3.3 KiB
Python
67 lines
3.3 KiB
Python
"""The ``arch`` layer set and the role -> layer map every architectural module uses.
|
|
|
|
Names follow the ISO 13567 field order the repository's ``iso13567`` set
|
|
already uses — agent (``A`` = architect), element, presentation (``E`` element
|
|
graphics, ``H`` hatching, ``T`` text/annotation), status (``N`` new) — with the
|
|
element field in its common short spelling (``WALL``, ``DOOR``, ``WIND``); the
|
|
fields are not padded to ISO 13567-2's fixed widths, exactly as the existing
|
|
``M-GEOMET-E-N`` rows are not.
|
|
|
|
Lineweights are ISO 128 values only (0.13 / 0.18 / 0.25 / 0.50). The one
|
|
exception is ``A-CONST-E-N`` at 0.05 mm, the scratch weight every construction
|
|
layer in this repository carries: the ``iso128`` critique skips a layer whose
|
|
name contains ``CONST``, and ``construction_left`` requires it to be empty
|
|
before finalize. Colours are a repository convention — ISO 13567 fixes names,
|
|
not colours.
|
|
|
|
``ARCH_ROLE_LAYER`` is the one place a role becomes a layer name, so no tool
|
|
hardcodes one.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
#: (name, ACI colour, linetype, lineweight mm, description) — the row shape of
|
|
#: every set in ``engineering/layers.py``.
|
|
ARCH_LAYERS: list[tuple[str, int, str, float, str]] = [
|
|
("0", 7, "Continuous", 0.25, "default"),
|
|
("A-WALL-E-N", 7, "Continuous", 0.50, "Architecture / walls, cut outline / new"),
|
|
("A-WALL-H-N", 8, "Continuous", 0.13, "Architecture / walls, poche hatch / new"),
|
|
("A-DOOR-E-N", 3, "Continuous", 0.25, "Architecture / doors, leaf and swing / new"),
|
|
("A-WIND-E-N", 4, "Continuous", 0.25, "Architecture / windows, frame and glazing / new"),
|
|
("A-STAIR-E-N", 6, "Continuous", 0.25, "Architecture / stairs / new"),
|
|
("A-FURN-E-N", 5, "Continuous", 0.18, "Architecture / furniture / new"),
|
|
("A-SANR-E-N", 5, "Continuous", 0.18, "Architecture / sanitary fixtures / new"),
|
|
("A-GRID-E-N", 1, "CENTER", 0.18, "Architecture / structural grid / new"),
|
|
("A-ROOM-T-N", 7, "Continuous", 0.25, "Architecture / room labels / new"),
|
|
("A-DIMEN-T-N", 2, "Continuous", 0.18, "Architecture / dimensions / new"),
|
|
("A-SYMB-T-N", 7, "Continuous", 0.25, "Architecture / symbols and marks / new"),
|
|
("A-OVHD-E-N", 3, "HIDDEN", 0.18, "Architecture / overhead, above the cut plane / new"),
|
|
("A-CONST-E-N", 250, "Continuous", 0.05, "Architecture / construction (scratch)"),
|
|
]
|
|
|
|
#: Architectural role -> layer. ``wall_hatch`` is where a ``HatchArea`` lands
|
|
#: when ``draw_prims`` is given this map (a HatchArea carries no role of its own).
|
|
ARCH_ROLE_LAYER: dict[str, str] = {
|
|
"wall": "A-WALL-E-N",
|
|
"wall_hatch": "A-WALL-H-N",
|
|
"door": "A-DOOR-E-N",
|
|
"window": "A-WIND-E-N",
|
|
"stair": "A-STAIR-E-N",
|
|
"furniture": "A-FURN-E-N",
|
|
"sanitary": "A-SANR-E-N",
|
|
"grid": "A-GRID-E-N",
|
|
"room": "A-ROOM-T-N",
|
|
"dim": "A-DIMEN-T-N",
|
|
"symbol": "A-SYMB-T-N",
|
|
"overhead": "A-OVHD-E-N",
|
|
}
|
|
|
|
#: The two roles ``engineering/layers.py::resolve_role_layer`` answers for.
|
|
ARCH_LAYER_ROLES: dict[str, str] = {"dim": "A-DIMEN-T-N", "construction": "A-CONST-E-N"}
|
|
|
|
#: name -> (colour, linetype, lineweight): what ``draw_prims`` creates a missing
|
|
#: architectural layer with.
|
|
ARCH_LAYER_DEFS: dict[str, tuple[int, str, float]] = {
|
|
name: (color, linetype, lineweight) for name, color, linetype, lineweight, _d in ARCH_LAYERS
|
|
}
|