Files
autocad-mcp-pro/engineering/arch/__init__.py
T
Umut CANandClaude Opus 5.5 afd42356b5 feat(task-7): SECTION 25 catalogue - arch_catalogue_list, arch_catalogue_insert
engineering/arch/catalogue.py is the standard-parts pattern of track B for an
architectural plan: twenty authored plan symbols in two families - thirteen
furniture items (single and double bed, wardrobe, three-seat sofa, armchair,
chair, dining table with four chairs, desk, kitchen counter run, fridge,
bookshelf, nightstand, coffee table) and seven sanitary items (WC, bidet, wall
basin, shower tray, bathtub, kitchen sink, washing machine). Every size is a
nominal catalogue dimension and says so in SIZE_BASIS, in each row and in both
tool docstrings; no standard is cited because none fixes these sizes.

Each item is typed block_define primitives on layer 0 inside [0, w] x [0, d],
origin at the back-left corner with the wall side along +X - a test holds all
twenty to their footprint. catalogue() searches name, family and the English
and Turkish labels, ignoring case and Turkish diacritics (buzdolabi finds
buzdolabı). insert_item() defines ARCH_<NAME> once, creates the furniture or
sanitary layer from its ARCH_LAYERS row when missing (live ActiveX refuses a
missing layer), inserts with an invisible ITEM attribute, and refuses an
unknown name with the nearest catalogue names before any write.

SECTION 25 opens on this branch with the two tools, alias records (INSERT,
ADCENTER, TOOLPALETTES and English/Turkish synonyms), a regenerated inventory,
the README snapshot at 231 tools, and the branch-local group snapshot
(entity_query 10, entity_creation 19) that the track F merge recomputes.

No new ActiveX call: insert_item composes the existing layer_list,
layer_create, block_list, block_define and block_insert members. Run once live
through ComBackend on AutoCAD 2026 (scratch document, closed after): all
twenty items defined and inserted, a second double_bed insert reported
defined=false, ITEM read back as double_bed, 20 ARCH_* blocks, 21 INSERTs on
A-FURN-E-N / A-SANR-E-N, both layers created at ACI 5 / 0.18 mm.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
2026-09-23 22:35:44 +03:00

85 lines
1.6 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 .catalogue import (
CATALOGUE_NAMES,
FAMILIES,
ITEMS,
SIZE_BASIS,
CatalogueItem,
block_spec,
catalogue,
insert_item,
)
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,
)
__all__ = [
"APP_ID",
"ARCH_LAYERS",
"ARCH_LAYER_DEFS",
"ARCH_LAYER_ROLES",
"ARCH_ROLE_LAYER",
"CATALOGUE_NAMES",
"CatalogueItem",
"FAMILIES",
"ITEMS",
"KINDS",
"LANGS",
"Opening",
"Room",
"SIZE_BASIS",
"Stair",
"WALL_HATCH_TABLE",
"WALL_MATERIALS",
"Wall",
"axis_segments",
"block_spec",
"catalogue",
"decode",
"encode",
"fmt_area_m2",
"fmt_number",
"from_payload",
"insert_item",
"opening_from_dict",
"room_from_dict",
"segment_of",
"stair_from_dict",
"tag_prefix",
"to_payload",
"to_values",
"validate_openings",
"vocab",
"wall_from_dict",
"wall_hatch",
"wall_length",
]