feat(arch): the plan model and its foundation - layers, materials, EN/TR, two generalisations
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
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
b012fdf1be
commit
d5c5e90406
+14
-1
@@ -120,7 +120,7 @@ async def apply_layer_set(
|
||||
backend: AutoCADBackend,
|
||||
standard: str = "mech",
|
||||
) -> dict[str, str]:
|
||||
"""Idempotently apply a named layer set ('mech', 'pid', 'iso13567')."""
|
||||
"""Idempotently apply a named layer set ('mech', 'pid', 'iso13567', 'arch')."""
|
||||
layer_set = LAYER_SET_REGISTRY.get(standard)
|
||||
if layer_set is None:
|
||||
raise RuntimeError(
|
||||
@@ -150,3 +150,16 @@ async def apply_layer_set(
|
||||
except Exception as exc:
|
||||
results[name] = f"failed: {exc}"
|
||||
return results
|
||||
|
||||
|
||||
# ── the architectural set (track F) ─────────────────────────────────────────
|
||||
# The rows live with the plan model (engineering/arch/layers.py), where
|
||||
# ARCH_ROLE_LAYER maps each role onto them. Registered last, after every name
|
||||
# above exists: importing engineering.arch runs its package __init__, which
|
||||
# pulls in the mechanical codec - and, once track F is merged, the wall engine
|
||||
# - and those import from this module. A partially initialised
|
||||
# engineering.layers must already hold every name they ask for.
|
||||
from engineering.arch.layers import ARCH_LAYER_ROLES, ARCH_LAYERS # noqa: E402
|
||||
|
||||
LAYER_SET_REGISTRY["arch"] = ARCH_LAYERS
|
||||
LAYER_ROLES["arch"] = dict(ARCH_LAYER_ROLES)
|
||||
|
||||
Reference in New Issue
Block a user