engineering/arch/draw.py is the only module of the track that touches a backend. It draws through draw_prims(role_layer=ARCH_ROLE_LAYER) and the generic contract members, so it runs on both engines as written, and it writes the plan onto the drawing: each element's ACADMCP_ARCH record on one of its own entities (a wall's first face line, a door's leaf, a window's frame, a stair's first riser) and, beside it under ACADMCP_ARCH_H, the handles that element owns. read_plan reads the records back and never modifies the drawing. arch_wall computes the whole network before and after the new walls and redraws only the drawn walls whose outline changes - erasing exactly the entities they own - and says which under redrawn. arch_opening hosts a door or a window in a drawn wall found by id and redraws that wall cut; its tag defaults to the next D1/W1 (K1/P1 in Turkish). A new wall that would leave a drawn opening uncuttable, and an opening that runs into a junction, are refused before anything is erased. arch_stair reports the Blondel value; it does not enforce it. exterior_chains gives each side up to three rows, nearest first: every jamb in that facade, both faces of every wall meeting it, and the overall - from the wall engine's own faces. A row that would only restate a farther one is not emitted (ISO 129-1: each measurement once). The 10 mm / 8 mm row spacing is a declared drafting default times the plot scale, not a standard value. The arch tag is ranked after mech so the four tools file under a new architecture group; alias records carry WALLADD/MLINE, DOORADD/WINDOWADD and STAIRADD with English and Turkish shop words. Inventory regenerated; README snapshot 233 tools (228 advertised) in 26 groups; registry snapshot architecture: 4. No new ActiveX member is called. Measured on AutoCAD 2026 in a scratch document through ComBackend: shell + teed partition, D1 + W1, a straight 17-riser stair and the bottom chains gave the same 20 wall LINEs (identical endpoints), 9 poche HATCHes, 1+1 door, 4 window lines, 11 dimensions and a read_plan round trip as the headless engine. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
113 lines
2.2 KiB
Python
113 lines
2.2 KiB
Python
"""Architectural 2D: the plan model and the engine that draws it (track F).
|
|
|
|
Merge rule for the three track-F branches: the re-exports below are additive
|
|
and alphabetical - keep every side's names.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from .dimension import (
|
|
FIRST_OFFSET_PAPER_MM,
|
|
ROWS,
|
|
SIDES,
|
|
STEP_PAPER_MM,
|
|
exterior_chains,
|
|
)
|
|
from .lang import LANGS, fmt_area_m2, fmt_number, tag_prefix, vocab
|
|
from .layers import ARCH_LAYER_DEFS, ARCH_LAYER_ROLES, ARCH_LAYERS, ARCH_ROLE_LAYER
|
|
from .materials import WALL_HATCH_TABLE, WALL_MATERIALS, wall_hatch
|
|
from .model import (
|
|
APP_ID,
|
|
KINDS,
|
|
Opening,
|
|
Room,
|
|
Stair,
|
|
Wall,
|
|
axis_segments,
|
|
decode,
|
|
encode,
|
|
from_payload,
|
|
opening_from_dict,
|
|
room_from_dict,
|
|
segment_of,
|
|
stair_from_dict,
|
|
to_payload,
|
|
to_values,
|
|
validate_openings,
|
|
wall_from_dict,
|
|
wall_length,
|
|
)
|
|
from .openings import opening_prims
|
|
from .stairs import (
|
|
ARROW_PAPER_MM,
|
|
BLONDEL_RANGE,
|
|
STAIR_KINDS,
|
|
TEXT_PAPER_MM,
|
|
TURNS,
|
|
blondel,
|
|
stair_prims,
|
|
)
|
|
from .walls import (
|
|
MIN_JOIN_ANGLE_DEG,
|
|
WallGeometry,
|
|
face_offsets,
|
|
room_segments,
|
|
wall_geometry,
|
|
wall_geometry_by_wall,
|
|
wall_segments,
|
|
)
|
|
|
|
__all__ = [
|
|
"APP_ID",
|
|
"ARCH_LAYERS",
|
|
"ARCH_LAYER_DEFS",
|
|
"ARCH_LAYER_ROLES",
|
|
"ARCH_ROLE_LAYER",
|
|
"ARROW_PAPER_MM",
|
|
"BLONDEL_RANGE",
|
|
"FIRST_OFFSET_PAPER_MM",
|
|
"KINDS",
|
|
"LANGS",
|
|
"MIN_JOIN_ANGLE_DEG",
|
|
"Opening",
|
|
"ROWS",
|
|
"Room",
|
|
"SIDES",
|
|
"STAIR_KINDS",
|
|
"STEP_PAPER_MM",
|
|
"Stair",
|
|
"TEXT_PAPER_MM",
|
|
"TURNS",
|
|
"WALL_HATCH_TABLE",
|
|
"WALL_MATERIALS",
|
|
"Wall",
|
|
"WallGeometry",
|
|
"axis_segments",
|
|
"blondel",
|
|
"decode",
|
|
"encode",
|
|
"exterior_chains",
|
|
"face_offsets",
|
|
"fmt_area_m2",
|
|
"fmt_number",
|
|
"from_payload",
|
|
"opening_from_dict",
|
|
"opening_prims",
|
|
"room_from_dict",
|
|
"room_segments",
|
|
"segment_of",
|
|
"stair_from_dict",
|
|
"stair_prims",
|
|
"tag_prefix",
|
|
"to_payload",
|
|
"to_values",
|
|
"validate_openings",
|
|
"vocab",
|
|
"wall_from_dict",
|
|
"wall_geometry",
|
|
"wall_geometry_by_wall",
|
|
"wall_hatch",
|
|
"wall_length",
|
|
"wall_segments",
|
|
]
|