Files
autocad-mcp-pro/engineering/arch/__init__.py
T
Umut CANandClaude Opus 5.5 f5f11178a9 feat(task-8): SECTION 25 grid and symbols - arch_grid, arch_symbol
engineering/arch/symbols.py is pure: grid_prims() draws each structural axis on
the grid role - its CENTER linetype comes from the A-GRID-E-N row, no primitive
sets one - with a 5 mm (paper) bubble and its label touching both ends, on the
symbol role so the circle does not print dashed. Numbers run along x and
letters along y (A..Z, AA, ... none skipped) unless labels names them;
positions are sorted, duplicates and label-count mismatches refused by path.

symbol_prims() draws the four plan symbols: the north arrow (a circle, an
arrow turned CCW from +Y, the vocab(lang) north letter upright beyond the tip),
the section mark (the cut line, a labelled bubble past each end and a viewing
arrow at each end, p1/p2 relative to the origin), the level mark (the triangle,
its line and the value formatted +3.00 / ±0.00, with a decimal comma in
Turkish) and the elevation mark (a circle whose pointers are the tangents from
r*sqrt(2) touching it at +/-45 degrees). An unknown kind is refused with the
list, a parameter the kind does not take with the ones it does. Every size is
a declared paper-mm drafting choice times the plot scale, not a standards value.

arch_grid and arch_symbol draw through draw_prims with ARCH_ROLE_LAYER; alias
records (COLUMNGRIDADD, English and Turkish synonyms), a regenerated inventory,
the README snapshot at 233 tools and the branch-local group snapshot
(entity_creation 21) complete the registration.

Beyond the plan: grid_axes refuses a labels value that is not a dict and a
labels.x / labels.y that is not a list (a string was split into one label per
character, a number raised a bare TypeError). No new ActiveX member: a live run
on AutoCAD 2026 (scratch document, closed after) drew the grid and all four
symbols through draw_prims - A-GRID-E-N created with CENTER, bubbles, texts and
symbols on A-SYMB-T-N, the Turkish north letter K and the level "+3,00".

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

101 lines
1.9 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,
)
from .symbols import (
SYMBOL_KINDS,
draw_grid,
draw_symbol,
fmt_level,
grid_axes,
grid_prims,
symbol_prims,
)
__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",
"SYMBOL_KINDS",
"Stair",
"WALL_HATCH_TABLE",
"WALL_MATERIALS",
"Wall",
"axis_segments",
"block_spec",
"catalogue",
"decode",
"draw_grid",
"draw_symbol",
"encode",
"fmt_area_m2",
"fmt_level",
"fmt_number",
"from_payload",
"grid_axes",
"grid_prims",
"insert_item",
"opening_from_dict",
"room_from_dict",
"segment_of",
"stair_from_dict",
"symbol_prims",
"tag_prefix",
"to_payload",
"to_values",
"validate_openings",
"vocab",
"wall_from_dict",
"wall_hatch",
"wall_length",
]