extract_utility_network_and_levels
Extract manhole, gully, pipe segment, and level data from DXF drawings to compute DIN 4124/EN 1610 trench and bedding earthworks for utility quantity takeoffs.
Instructions
[STEP 3B of HITL Workflow] Extract utility manholes/gullies, levels, pipe segments, and DIN 4124 / EN 1610 trench earthworks.
Priority order for manhole data extraction:
1. `INSERT` block attributes (`insert.attribs` / `ATTRIB` tags for ID, Cover/Rim level, Invert level, DN)
2. Leader-aware spatial matching (`LEADER` / pointer line arrow tips pointing to manholes)
3. `STRtree` spatial proximity matching within `search_radius_m` (supporting HU, DE, and EN callout syntax)
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": "extract_utility_network_and_levels"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the .dxf drawing file. | |
| node_layers | No | Layers containing manholes, gullies, or chambers (INSERT blocks, CIRCLEs, small closed box polylines). | |
| pipe_layers | No | Layers containing utility pipe/conduit centerlines. | |
| text_layers | No | Layers containing callout texts (TEXT, MTEXT) and leader lines (LEADER, LINE). If None, scans all layers. | |
| search_radius_m | No | Maximum spatial proximity radius (m) to associate callout texts with manholes or pipes. | |
| default_pipe_dn_mm | No | Default nominal pipe diameter DN (mm) when no text callout specifies DN. | |
| bedding_thickness_m | No | Bedding layer thickness below pipe barrel in meters (default 0.10m per EN 1610). | |
| unit_scale_to_meter | No | Confirmed multiplier converting 1.0 CAD unit to meters (1.0 for m, 0.01 for cm, 0.001 for mm). | |
| trench_wall_angle_deg | No | Trench wall angle in degrees per DIN 4124 (90.0 = vertical shored trench, 60.0 or 45.0 = sloped trench). | |
| fallback_trench_depth_m | No | Optional fallback invert depth (m) to use for trench earthworks when pipe endpoint manholes lack level annotations. | |
| side_cover_above_crown_m | No | Pipe-zone protective cover above pipe crown in meters (default 0.30m per EN 1610). | |
| calculate_trench_earthworks | No | Whether to calculate DIN 4124 / MSZ EN 1610 trench earthwork and bedding volumes. | |
| cover_thickness_deduction_m | No | Cast-iron cover/frame thickness (m) deducted from total depth h1 to get net shaft height h2 (default 0.17m for D400). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodes | No | ||
| anomalies | No | ||
| file_path | Yes | ||
| node_count | Yes | ||
| pipe_segments | No | ||
| earthwork_summary | No | ||
| unit_scale_to_meter | Yes | ||
| diameter_distribution | No | ||
| total_network_length_m | Yes | ||
| length_by_dn_and_material | No | ||
| nodes_with_complete_levels | Yes |