Spr import network
spr_import_networkImports and validates sprinkler pipe networks from drawings or JSON payloads, creating nodes, pipes, nozzles, drains, and water sources in one undo step.
Instructions
Create the recognised (or a hand-written) pipe network in the sprinkler module in ONE undo step: nodes, pipes (nominal size, pipe standard, C, line number, valves), nozzles (kind closed|open|drain, K, required pressure, zone, line), drains and the water source. From a drawing: candidateId (+ components, excludeSegments/Nodes/Lines/Runs, source, defaults, drains, nozzleOverrides, zoneByLine/Run/Component, valves, placement). Hand-written: network = {version:1, units:"m", nodes:[{ref,x,y,z}], pipes:[{from,to,diameter,lineNo}], heads:[{node,kind,kFactor,requiredPressure,zone}], sources:[{node,sourceType,…}]}. Water-spray ISO nozzles default to open K80 (project default: general K80, zone deluge — confirm with the user). Validates first (nothing changes on error); dryRun only reports. scriptPath saves the payload JSON (re-import later). mode append (default) | replace. Then spr_run_calc. [bulc-mcp] mode='replace' replaces the current pipe network; call with dryRun=true first (DRW-009).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | append (default) adds to the current network; replace swaps it (design settings stay) | |
| drains | No | Candidate nodes (open ends) that are drain holes — K or orifice diameter (default = nozzle K: drain hole = sprinkler orifice) | |
| dryRun | No | Only validate and report counts, change nothing | |
| source | No | Water source at candidate node (default = recognised inlet): sourceType pump|city_water|gravity_tank|pressure_tank, staticPressure, residualPressure, residualFlow, pumpRatedFlow, pumpRatedHead, pumpShutoffHead (MPa / L/min), tankElevation | |
| valves | No | Valves on candidate segments: type, tag (WS-11U), zone (zone valve), open=false (closed) | |
| network | No | Hand-written import payload (SprImportPayload) instead of candidateId | |
| defaults | No | kFactor (default 80), nozzleKind (default open for water spray), requiredPressure MPa, material (pipe standard id, e.g. JIS_G3454_STPG_SCH40), cFactor, stemDiameter (25), fallbackDiameter (50) | |
| placement | No | Place the drawing network: x,y,z offset of the inlet (m), rotateDeg about Z, mirrorY, floorIndex (story id; default by z) | |
| zoneByRun | No | { "<run name>": "<zone>" } | |
| components | No | Connected components to import (default [0] = main network with the inlet) | |
| scriptPath | No | Also save the import payload JSON to this path ("script" — can be re-imported with network=…) | |
| zoneByLine | No | { "<lineNo>": "<zone>" } — nozzles on that line get the zone (zone deluge scenarios) | |
| candidateId | No | From spr_analyze_drawing / chat attachment | |
| excludeRuns | No | Run names to drop (R05_Y_z1.7m …) | |
| excludeLines | No | Line numbers to drop | |
| excludeNodes | No | ||
| excludeSegments | No | Candidate segment ids to drop (drain / air-blow / reference lines …) | |
| nozzleOverrides | No | ||
| zoneByComponent | No | { "<component id>": "<zone>" } |