engineering/arch/schedule.py turns the plan records into schedule rows: doors by tag with width, height, swing, hand and wall; windows by tag with width, height, sill and wall; rooms by number with name and the measured area the label carries, plus a total. Tags compare as numbers (D2 before D10). An opening without a tag gets the next free D1 / W1 - K1 / P1 in Turkish - in wall order; an explicit tag is never renumbered and a generated one never repeats it. A value the model does not carry is an empty cell, never a default, and Turkish output writes decimal commas. draw_schedule reads the ACADMCP_ARCH records off the drawing through the one reader rooms.py already has and draws a real TABLE the way the ISO 7573 parts list does - top-left insertion, the table growing down, the parts list's 7 mm rows and 2.5 mm text at the plot scale, the engine's representation reported. Nothing to schedule, an unknown kind or language and more rows than one TABLE takes are refused before anything is drawn. arch_schedule joins arch_room and arch_rooms_detect under SECTION 25's rooms marker (banner 3 tools), shares the TABLE command with entity_create_table and bom_table, and the counts follow: 232 tools in 25 groups. Live fix in com_backend.entity_create_table. MEASURED on AutoCAD 2026: IAcadTable has no TextHeight property. pywin32 raised AttributeError on `table.TextHeight = h`, the old code swallowed it, and every live table kept the Standard style's heights (title 6.0, header and data 4.5), which is 0.1 mm on paper at 1:50. The member that works is SetCellTextHeight(row, col, h), probed on a scratch document: every cell read back 125.0 via GetCellTextHeight. The row heights stayed 350.0 and GetBoundingBox matched the reported bbox (10000,3250)-(15750,5000). Then draw_schedule ran end to end through ComBackend on a scratch document: a native TABLE on A-SYMB-T-N for doors (5 rows) and rooms/tr (6 rows, total 45,00 m²), and the document was closed afterwards. The new fake in tests/test_table_leader.py has only the measured members. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
91 lines
1.9 KiB
Python
91 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 .faces import DEFAULT_TOL, Face, face_containing, planar_faces, tagged_faces
|
|
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 .rooms import (
|
|
detect_rooms,
|
|
label_room,
|
|
opening_closures,
|
|
read_records,
|
|
room_label_prims,
|
|
rooms_detect,
|
|
)
|
|
from .schedule import SCHEDULE_KINDS, draw_schedule, schedule_rows
|
|
|
|
__all__ = [
|
|
"APP_ID",
|
|
"ARCH_LAYERS",
|
|
"ARCH_LAYER_DEFS",
|
|
"ARCH_LAYER_ROLES",
|
|
"ARCH_ROLE_LAYER",
|
|
"DEFAULT_TOL",
|
|
"Face",
|
|
"KINDS",
|
|
"LANGS",
|
|
"Opening",
|
|
"Room",
|
|
"SCHEDULE_KINDS",
|
|
"Stair",
|
|
"WALL_HATCH_TABLE",
|
|
"WALL_MATERIALS",
|
|
"Wall",
|
|
"axis_segments",
|
|
"decode",
|
|
"detect_rooms",
|
|
"draw_schedule",
|
|
"encode",
|
|
"face_containing",
|
|
"fmt_area_m2",
|
|
"fmt_number",
|
|
"from_payload",
|
|
"label_room",
|
|
"opening_closures",
|
|
"opening_from_dict",
|
|
"planar_faces",
|
|
"read_records",
|
|
"room_from_dict",
|
|
"room_label_prims",
|
|
"rooms_detect",
|
|
"schedule_rows",
|
|
"segment_of",
|
|
"stair_from_dict",
|
|
"tag_prefix",
|
|
"tagged_faces",
|
|
"to_payload",
|
|
"to_values",
|
|
"validate_openings",
|
|
"vocab",
|
|
"wall_from_dict",
|
|
"wall_hatch",
|
|
"wall_length",
|
|
]
|