Architecture: Detect Rooms
arch_rooms_detectDetect and measure rooms in AutoCAD plans by splitting wall lines, finding enclosed faces, filtering tiny or thin areas, and reporting area, confidence, labels, and skipped entities.
Instructions
Read the rooms of a plan - ours or a foreign one made of plain lines.
Every LINE and lightweight polyline on the layers is split where lines
cross or touch, and the closed faces they bound are measured (mm², net of
nested pieces).
Faces under min_area, and thin faces (mean width under 600 mm - wall
bodies and reveals, this reader's heuristic) are left out. Each room
reports confidence: 1.0 when every edge lies on the arch wall layer, 0.6
when any edge is a plain line from elsewhere - read confidence_min before
trusting a foreign plan. Room labels already on the drawing are reported
in labels with the face they sit in; a face with more than one is listed
in label_conflicts.
Never modifies the drawing. Arcs and bulged polyline edges, old-style
POLYLINEs and block references are listed in skipped with their handle
and reason - never flattened into chords, never dropped silently. Read
skipped before trusting count. A foreign plan's open doorways are
not closed - two rooms joined by one read as one face. Refused: a named
layer the drawing does not have (with the list of the ones it has), and no
layer matching WALL or DUVAR when layers is omitted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tol | No | Endpoints closer than this (mm) are one corner. | |
| layers | No | Layers holding the walls; default: every layer whose name contains WALL or DUVAR. | |
| min_area | No | Smallest room reported, mm² (1e6 = 1 m²). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||