engineering/arch/faces.py finds the closed faces a set of straight segments bounds: endpoints within tol merge, every segment splits where another crosses or touches it (the T-junction a partition makes), dangling edges are pruned, and the half-edge walk turns to the next edge clockwise so every bounded face comes out counter-clockwise. A piece nested inside a face of another piece is a hole in it, so a ring of walls measures its body and a room with a column measures its floor. Areas come from engineering.measure.polygon_area_perimeter, the arithmetic analysis_measure_entity reports. engineering/arch/rooms.py labels a room with the area of the face its point lies in - a 4000 x 5000 room between 200 mm walls reads 20.00 m2, never the axis area - and writes the room record onto the name text. Opening records close door and window gaps along the wall faces, so two rooms either side of a door stay two rooms. rooms_detect reads any plan's lines, drops faces under min_area and thin wall bodies (mean width under 600 mm, a declared heuristic), reports confidence 1.0 for faces enclosed only by our wall layer and 0.6 otherwise, lists arcs as skipped rather than flattening them, and never modifies the drawing. Two hardenings beyond the plan text, each with a test: read_records pages the current space once and filters to the arch layers locally (the plan paged it once per arch layer - twelve full scans, each a cross-process call per entity on a live seat), keeping the same layer-then-drawing order; and an opening record whose offset falls outside its wall (a stale record) is listed in omitted instead of raising out of the read-only detector. No new ActiveX member is called: both tools compose entity_list, entity_get/set_xdata, layer_list and draw_prims, whose COM paths are already live-verified. SECTION 25 opens on this branch with arch_room and arch_rooms_detect under the rooms marker; until Task 9 gives arch its group they file under entity_creation and entity_query. Alias records, a regenerated inventory, the README snapshot at 231 tools in 25 groups and the frozen group-size snapshot follow. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
87 lines
1.8 KiB
Python
87 lines
1.8 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,
|
|
)
|
|
|
|
__all__ = [
|
|
"APP_ID",
|
|
"ARCH_LAYERS",
|
|
"ARCH_LAYER_DEFS",
|
|
"ARCH_LAYER_ROLES",
|
|
"ARCH_ROLE_LAYER",
|
|
"DEFAULT_TOL",
|
|
"Face",
|
|
"KINDS",
|
|
"LANGS",
|
|
"Opening",
|
|
"Room",
|
|
"Stair",
|
|
"WALL_HATCH_TABLE",
|
|
"WALL_MATERIALS",
|
|
"Wall",
|
|
"axis_segments",
|
|
"decode",
|
|
"detect_rooms",
|
|
"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",
|
|
"segment_of",
|
|
"stair_from_dict",
|
|
"tag_prefix",
|
|
"tagged_faces",
|
|
"to_payload",
|
|
"to_values",
|
|
"validate_openings",
|
|
"vocab",
|
|
"wall_from_dict",
|
|
"wall_hatch",
|
|
"wall_length",
|
|
]
|