graph_build
Builds a connectivity graph from 2D geometry, grouping curves by endpoint proximity to report networks, junctions, open ends, and flag real breaks versus T-junctions.
Instructions
Read the 2D geometry as a CONNECTIVITY GRAPH and cache it: curves whose ends meet (within tol) become one node, so the drawing can be asked questions instead of read. Reports separate networks, junctions, total length, and the open ends - and for every open end checks whether it actually lands on another curve (a T-junction, fine) or on nothing (a real break, which on a schematic is the defect you were looking for). tol=None (the default) makes the joining tolerance EMERGE from this drawing's own endpoint distances by the max-jump rule, and the report states the value used - pass a number only to override what the drawing says. window=[x1,y1,x2,y2] limits it to one drawing area, layer to one layer. Lengths are exact (arcs and bulges included), in drawing units.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "graph_build"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tol | No | ||
| layer | No | ||
| window | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |