measure_linear_and_area_features
Measures linear lengths (m) and net surface areas (m2) from DXF layers, enforcing 2D projection, deduplicating overlaps, and subtracting islands for reliable quantity takeoffs.
Instructions
[STEP 3A of HITL Workflow] Deterministically measure linear lengths (m) and net surface areas (m2).
Engineering guarantees:
- Enforces 2D horizontal projection (Z=0) so 3D 'Flying Z' vertices never distort lengths
- Analytical circular arc (`bulge`) length calculation + sagitta-bounded spline/ellipse discretization
- 1D topological deduplication of exact and partially overlapping lines
- 2D Shapely boolean `.difference()` for island subtraction (guaranteed immunity against
double-deduction even when HATCH entities already contain internal hole loops)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>"
},
"name": "measure_linear_and_area_features"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the .dxf drawing file. | |
| linear_layers | No | Layer names to measure for linear features (curbs, edges, utility lines, fences) in meters (m). | |
| boundary_layers | No | Layer names containing outer closed boundaries or HATCHes for surface/pavement area measurement in square meters (m2). | |
| explode_inserts | No | If True, virtually explodes INSERT block references on target layers. | |
| include_hatches | No | Whether to extract area polygons from HATCH entities on boundary/island layers. | |
| snap_tolerance_m | No | Snap tolerance in meters for colinear overlap deduplication and exploded line polygonization. | |
| island_hole_layers | No | Layer names containing internal islands/cutouts (e.g., green islands, tree pits) to subtract from `boundary_layers`. | |
| unit_scale_to_meter | No | Confirmed multiplier converting 1.0 CAD unit to meters (e.g., 1.0 for m, 0.01 for cm, 0.001 for mm). | |
| min_island_deduction_m2 | No | VOB/C (DIN 18318) threshold: islands smaller than this area (m2) are NOT deducted from pavement area (0.0 = deduct all). | |
| auto_close_gap_tolerance_m | No | Maximum start-to-end gap (in meters) to automatically close 'almost closed' polylines on area layers. | |
| deduplicate_linear_overlaps | No | If True (default), uses 1D Shapely topological union to deduct exact and partial overlapping segments. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| warnings | No | ||
| file_path | Yes | ||
| area_summary | No | ||
| linear_summary | No | ||
| elevation_anomalies | No | ||
| unit_scale_to_meter | Yes |