P&ID: Connectivity Graph
pid_graphExtracts P&ID connectivity from AutoCAD drawings, resolving symbols, ports, lines, junctions and dangling endpoints with confidence scores so you can verify graph structure before trusting it.
Instructions
Connectivity of the drawing as it is, not as it was drawn.
Nodes: symbol INSERTs classified by catalogue name (confidence 1.0),
ACADMCP_PID payload (0.95), tag attributes / block-name keywords (0.6) or
a line touching an unknown INSERT (0.3); every node reports its source.
Ports come from the INSERT's real rotation, scale and mirror, measured
(a stretched bubble drops the node to 0.6 with a note). Edges: lines and
polylines; each end resolves to a port, a junction on another line, or
dangling with the nearest port as a hint — always within its own
space, so scope="all" never joins two sheets. stats.confidence_min
is the number to read before trusting a foreign drawing.
Returns nodes, edges, junctions, dangling, unclassified, offpage_links, stats, tolerance, scope and backend:
node: id, kind, block_name, family, symbol, tag, tag_parsed, tag_source, x, y, rotation_deg, scale, y_scale, mirrored, layer, space, description (its DESC attribute), source, confidence, notes, and ports {name, x, y, direction_deg, kind, radius, inferred, edges};
edge: id, line_class, class_source, line_number, number_source, size, service, spec, insulation, from, to, length (plus length_approximate when the engine measured none), layer, space, source; vertices and bulges with include_geometry;
junction: id, x, y, edges, space; dangling: edge, end, x, y, nearest.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | current_space | all (every layout, current restored afterwards) | current_space |
| tolerance | No | Endpoint-to-port snap distance (mm) | |
| label_search | No | How far to look for tag/line-number text (mm) | |
| include_foreign | No | Classify INSERTs not placed by this server (confidence < 1) | |
| include_geometry | No | Include edge vertices |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||