@kruschdev/pascal-plugin-plumbing 0.0.0-stage → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +123 -2
- package/docs/AGENT-TOOLS.md +12 -0
- package/docs/ARCHITECTURE.md +15 -0
- package/docs/CAD-CATALOG.md +10 -0
- package/docs/IPC-REFERENCE.md +17 -0
- package/package.json +89 -4
- package/src/agent-operations.ts +842 -0
- package/src/agent-tools.ts +257 -0
- package/src/cad/catalog.ts +151 -0
- package/src/cad/equipment.ts +172 -0
- package/src/cad/fittings.ts +304 -0
- package/src/cad/fixtures.ts +255 -0
- package/src/cad/index.ts +6 -0
- package/src/cad/manifold-interior.ts +249 -0
- package/src/cad/materials.ts +122 -0
- package/src/index.ts +153 -0
- package/src/ipc/audit.ts +829 -0
- package/src/ipc/autopopulate.ts +4555 -0
- package/src/ipc/framing-interop.ts +842 -0
- package/src/ipc/index.ts +9 -0
- package/src/ipc/pricing.ts +473 -0
- package/src/ipc/routing.ts +2280 -0
- package/src/ipc/rules.ts +271 -0
- package/src/ipc/schedule.ts +630 -0
- package/src/ipc/sizing.ts +523 -0
- package/src/ipc/tables.ts +777 -0
- package/src/nodes/equipment.ts +330 -0
- package/src/nodes/fixture.ts +245 -0
- package/src/nodes/manifold.ts +194 -0
- package/src/nodes/parametrics.ts +94 -0
- package/src/nodes/pipe-run.ts +342 -0
- package/src/render.ts +64 -0
- package/src/ui/chat-card.tsx +157 -0
- package/src/ui/inspector-card.tsx +211 -0
- package/src/ui/manifold-cutaway-view.tsx +270 -0
- package/src/ui/plumbing-panel.tsx +810 -0
- package/src/ui/schedule-view.tsx +523 -0
- package/src/ui/store.ts +115 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kevin Ruschman (@kruschdev)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,124 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Pascal Plugin Plumbing (`@kruschdev/pascal-plugin-plumbing`)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](./LICENSE)
|
|
4
|
+
[](https://github.com/pascalorg/editor)
|
|
5
|
+
[](https://github.com/kruschdev/pascal-mep-kernel)
|
|
6
|
+
[](./docs/CAD-CATALOG.md)
|
|
7
|
+
[](./src/__tests__)
|
|
8
|
+
|
|
9
|
+
An open-source, MIT-licensed **Residential and Light-Commercial IPC / UPC / IFGC / IRC Plumbing** plugin for [Pascal Editor](https://github.com/pascalorg/editor).
|
|
10
|
+
|
|
11
|
+
I built this as a standalone external plugin implementing Pascal's full Plugin API v1 contract (`E-014`, `E-016`, `E-017`) on top of [`@kruschdev/pascal-mep-kernel`](https://github.com/kruschdev/pascal-mep-kernel) so it coordinates cleanly alongside [`@kruschdev/pascal-plugin-structural`](https://github.com/kruschdev/pascal-plugin-structural), [`@kruschdev/pascal-plugin-hvac`](https://github.com/kruschdev/pascal-plugin-hvac), [`@kruschdev/pascal-plugin-electrical`](https://github.com/kruschdev/pascal-plugin-electrical), [`@kruschdev/pascal-plugin-furnishings`](https://github.com/kruschdev/pascal-plugin-furnishings), and [`@kruschdev/pascal-plugin-catalog`](https://github.com/kruschdev/pascal-plugin-catalog) without requiring upstream core merges.
|
|
12
|
+
|
|
13
|
+
> [!NOTE]
|
|
14
|
+
> **Verification Status:** Verified with `102 / 102` deterministic unit tests (`3,479` assertions across `20` test suites), `5 / 5` entry boundary gates, and audited across `246` real public Pascal buildings (`245 / 246` zero-error, `0` crashes, `0/0/0/0` errors on two-story Aymeric House alongside Structural, HVAC, and Electrical).
|
|
15
|
+
|
|
16
|
+
## 4-Trade Coordinated Cutaway (Shared `@kruschdev/pascal-mep-kernel`)
|
|
17
|
+
|
|
18
|
+

|
|
19
|
+
|
|
20
|
+
Watch the full two-story Aymeric House finished-to-cutaway walkthrough (Structural -> Plumbing -> Dual-Wing HVAC -> Electrical, `1,412` coordinated nodes, `0/0/0/0` errors) in [`@kruschdev/pascal-mep-kernel`](https://github.com/kruschdev/pascal-mep-kernel).
|
|
21
|
+
|
|
22
|
+
## Walkthrough Video (Recorded Live in Pascal Editor)
|
|
23
|
+
|
|
24
|
+

|
|
25
|
+
|
|
26
|
+
**[Watch Full 720p HD Narrated Walkthrough Video Recorded in Pascal Editor (`assets/demo-walkthrough.mp4`)](https://github.com/kruschdev/pascal-plugin-plumbing/releases/download/v0.2.1/demo-walkthrough.mp4)**
|
|
27
|
+
|
|
28
|
+
1. **One-Click IPC/UPC Auto-Populate, Real-World Furnishings/Catalog SKU Interop, and Live Auto-Connect**: Scans Pascal room zones, placed real-world `catalog:sku-item` / `furnishings:*` fixtures and appliances (toilets, single and double-basin vanities, kitchen sinks and sink-base cabinets with co-location dedup, tubs, showers, washers, electric/gas dryers, gas ranges, French-door refrigerators, water heaters, and PEX manifolds), and optional `@pascal-app/plugin-bones` anchors. Routes cold-only lines to toilets and refrigerator ice makers, hot and cold rotation-aligned PEX to sinks/vanities/tubs/showers/washers, hot-only lines to dishwashers, IFGC fuel gas to gas ranges/dryers/water heaters, and 4" rigid dryer exhaust to dryers, rendering compact `roughInOnly` angle-stop and flange assemblies behind real SKUs so zero duplicate porcelain Z-fights. Includes one-click **Sync Furnishings & Route Pipes** and **Auto-connect pipes on place** so dropping a new toilet or sink routes all of its water, DWV, and vent lines in one undo step.
|
|
29
|
+
2. **Priority #2 MEP Right-of-Way, Wall-Cavity Concealment & Sub-Slab X-Ray Ground**: Plumbing holds first MEP right-of-way (`1. Structural -> 2. Plumbing -> 3. HVAC -> 4. Electrical`) via [`@kruschdev/pascal-mep-kernel`](https://github.com/kruschdev/pascal-mep-kernel) with strict top-plate wall-cavity concealment for vertical risers and overhead supplies/vents under `Full Walls`, an independent **Sub-Slab Drains (X-Ray Ground)** toggle (auto-enabled in `X-Ray Plumbing`) to inspect below-grade sloped DWV runs right through Pascal's opaque ground plane, true monotonic downward gravity pitch (`1/4"/ft` for `<= 2-1/2"`, `1/8"/ft` minimum for `>= 3"`), non-descending vent routing (`IPC 905.5`), automatic detours around rotated structural beams/columns (`structural:beam`, `structural:column`, `beam`, `column`) and 3D door/window opening prisms, concave footprint containment, and enforcement of **NEC 110.26(E) Dedicated Electrical Space** above electrical panels and transformers.
|
|
30
|
+
3. **Bones Framing Penetration Solver and 3D Bore Visualization**: Computes the exact 3D `(x, y, z)` crossing of every `16"` or `24"` OC wall stud, sole plate, and double top plate (honoring Priority #1 `structural:assembly` `2x6` overrides; `IRC R502.8` floor-joist boring is not modeled), renders 3D bore-hole collars and galvanized steel nail plates (`IRC R602.6` / `IPC 305.6`) right on pipe runs, and generates a live **Framing Drill List** with exact hole-saw diameters and `% of stud depth`.
|
|
31
|
+
4. **Automatic Cross-Trade Electrical Power Coordination**: Every powered plumbing unit (electric/HPWH water heater, tankless gas ignition/blower, sump pump, sewage ejector, recirc pump, water softener, dishwasher, garbage disposal, clothes washer, bidet) publishes a standardized `electricalDemand` payload (`voltage`, `poles`, `breakerAmps`, `loadVa`, `dedicatedCircuit`, `gfciRequired`). When `@kruschdev/pascal-plugin-electrical` runs in the same scene, Electrical automatically allocates the dedicated breakers on the panelboard and routes 3D power runs straight to each plumbing unit.
|
|
32
|
+
5. **Interactive 3D PEX Manifold & 2x6 Wet-Wall Cutaway and 47 Clean-Room MIT 3D CAD Models**: Place any of 33 live equipment, manifold, and fixture kinds (`12` equipment units, `3` manifolds, `18` residential and commercial fixtures) from the Plumbing rail or `plumbing_*` agent tools, and inspect the interactive **3D PEX Manifold & 2x6 Wet-Wall Cutaway** (`2x6 Wet-Wall & 3" Stack Cutaway`, `Manifold Cover Off`, `Steel Enclosure Closed`) inside the 6-tab split-pane `Plumbing Schedule` view.
|
|
33
|
+
6. **Live Fixture Schedule, DFU/WSFU/Gas Load Calc, IPC/IFGC Audit, and Priced BOM Takeoff**: Calculates `IPC Table 709.1` / `710.1` DFU drain sizing, Modified Hunter's Curve peak GPM, Hazen-Williams head loss and velocity limits (`<= 5 ft/s` hot copper, `<= 8 ft/s` cold/PEX), `IFGC Table 402.4` longest-length fuel-gas sizing, `IRC M1502.4` dryer vent effective length, and live labor/markup/tax BOM exports (CSV) with separate SKU-linked rough-in pricing so fixture porcelain is never double-billed.
|
|
34
|
+
|
|
35
|
+
## Showcase Gallery
|
|
36
|
+
|
|
37
|
+

|
|
38
|
+
|
|
39
|
+

|
|
40
|
+
|
|
41
|
+

|
|
42
|
+
|
|
43
|
+

|
|
44
|
+
|
|
45
|
+
### 47-Model Clean-Room MIT CAD Library (6 Categories)
|
|
46
|
+
|
|
47
|
+
| Category | Count | Included Highlights |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| **Water Heaters and Mechanical Equipment** | 12 | 50 gal Electric/Gas Tank Water Heaters, Condensing Tankless Gas WH, Hybrid Heat Pump WH (HPWH), 2 gal Thermal Expansion Tank, Main Shutoff + PRV + Gauge, Whole-House Water Softener, Sump Pump Basin, Sealed Sewage Ejector Basin, Hot Water Recirc Pump, Natural Gas Utility Meter, Mainline Backwater Valve |
|
|
50
|
+
| **PEX and Fuel-Gas Manifolds** | 4 | 12-Port PEX Home-Run Manifold (Open), 24-Port PEX Manifold w/ Steel Enclosure, Type L Copper Trunk Distribution Header, 8-Port CSST Fuel-Gas Distribution Manifold |
|
|
51
|
+
| **Residential and Commercial Fixtures** | 18 | Elongated Water Closet, Vanity Lavatory w/ P-Trap, Undermount Kitchen Sink, Alcove Bathtub, Walk-In Shower, Tub/Shower Combo, Dishwasher Rough-In, Recessed Washer Box & 2" Standpipe, Laundry Sink, Wet-Bar Sink, 2" Floor Drain, Frost-Proof Hose Bibb w/ Vacuum Breaker, Heated Bidet Seat, 3/4 HP Garbage Disposal, Commercial Urinal, Mop Basin, Drinking Fountain, 50 GPM Grease Interceptor |
|
|
52
|
+
| **DWV Fittings and Cleanouts** | 7 | Solvent-Weld PVC P-Trap, 3" Vertical Sanitary Tee, 3" 45-Degree Wye/Combo, 3" Long-Sweep 90-Degree Elbow, 3" Two-Way Cleanout Tee w/ Brass Plug, 3" Roof Vent Flashing Boot, Air Admittance Valve (AAV / Studor) |
|
|
53
|
+
| **Supply and Fuel-Gas Valves** | 4 | 3/4" Full-Port Brass Ball Valve, Quarter-Turn Chrome Angle Stop, Thermostatic Anti-Scald Mixing Valve, Fuel-Gas Sediment Trap (Drip Leg) & Shutoff |
|
|
54
|
+
| **Pipe Runs, Hangers and Cutaway Assemblies** | 2 | Galvanized Clevis Pipe Hanger w/ Threaded Rod, 2x6 Wet-Wall PEX Manifold & 3" PVC Stack Cutaway (plus swept `buildPipeRunCad` with 3D stud bore collars and wall-normal steel nail plates) |
|
|
55
|
+
|
|
56
|
+
> **Drafting and engineering aid, not stamped engineering.** Always verify calculations, pipe sizing, and local AHJ amendments with a licensed plumbing engineer or master plumber before construction.
|
|
57
|
+
|
|
58
|
+
## Documentation
|
|
59
|
+
|
|
60
|
+
| Guide | What It Covers |
|
|
61
|
+
|---|---|
|
|
62
|
+
| **[Architecture Guide](./docs/ARCHITECTURE.md)** | Layered subpath boundaries, 4 `plumbing:*` node kinds, Bones framing interop, and cross-trade electrical power handoff |
|
|
63
|
+
| **[IPC / UPC / IFGC / IRC Engineering Reference](./docs/IPC-REFERENCE.md)** | Every implemented IPC/UPC/IFGC/IRC table and rule (`709.1`, `710.1`, `704.1`, `706.3`, `708.1`, `903.1`, `906.1`, `909.1`, `E103.3`, `504.6`, `607.3`, `608.15.4.2`, `IRC R602.6`, `IFGC 402.4`, `IRC M1502.4`, `NEC 110.26(E)`) |
|
|
64
|
+
| **[47-Model MIT 3D CAD Catalog](./docs/CAD-CATALOG.md)** | Full inventory of all 47 procedural `.glb` models across 6 categories and programmatic `./cad` usage |
|
|
65
|
+
| **[Agent Tools Reference (`E-016`)](./docs/AGENT-TOOLS.md)** | All 8 pure Zod agent tools and headless scene operations for MCP servers, chat workflows, and detached runtimes |
|
|
66
|
+
| **[Media Kit and Launch Copy](./docs/MEDIA-KIT.md)** | Ready-to-share social preview (`1280 x 640`), HD narrated walkthrough video, high-res screenshots, CAD contact sheet, and X / LinkedIn / Show HN / Discord / OSArch launch copy |
|
|
67
|
+
| **[Walkthrough Voiceover Script](./docs/WALKTHROUGH-SCRIPT.md)** | Timed ~60-second narration beat sheet and one-command Gemini TTS (`gemini-3.8-flash-tts`) + `ffmpeg` muxing script (`scripts/add-voiceover.sh`) |
|
|
68
|
+
|
|
69
|
+
## Package Entrypoints
|
|
70
|
+
|
|
71
|
+
| Entrypoint | Export | Boundary Guarantee |
|
|
72
|
+
|---|---|---|
|
|
73
|
+
| `.` | `plumbingPlugin`, `plumbingHostPanel`, `plumbingScheduleView`, `plumbingChatExtension` | Full editor integration (`EditorHostPanel`, 6-tab `EditorHostView`, `InspectorExtension`, chat cards) |
|
|
74
|
+
| `./render` | `plumbingRenderPlugin` | Editor-free read-only viewer manifest (verified by `bun run check:render`) |
|
|
75
|
+
| `./cad` | `PLUMBING_CAD_CATALOG`, `buildPlumbingCadPart`, `buildWiredManifoldCutawayCad`, `buildEquipmentCad`, `buildFixtureCad`, `buildFittingCad`, `buildPipeRunCad` | Editor-free, React-free Three.js CAD part builders for all 47 plumbing models |
|
|
76
|
+
| `./ipc` | Pure IPC/UPC/IFGC/IRC sizing, gravity DWV & supply routing, Bones penetration solver, audit, schedule, and BOM functions | Framework-free TypeScript (zero React, Three.js, or `@pascal-app/*`) |
|
|
77
|
+
| `./agent-tools` | `plumbingAgentTools` (`PluginAgentTools`, `E-016`) | Pure Zod-only contracts (8 tools + skill) |
|
|
78
|
+
| `./agent-operations` | `plumbingAgentOperations` (`AgentOperations`, `E-016`) | Pure scene operations runnable on MCP, detached runtime, or live chat |
|
|
79
|
+
|
|
80
|
+
## Quick Start in a Pascal Host
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npm install @kruschdev/pascal-plugin-plumbing
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
import { extendPluginDiscovery } from '@pascal-app/core'
|
|
88
|
+
import { registerEditorHostPanel, registerEditorHostView } from '@pascal-app/editor'
|
|
89
|
+
import {
|
|
90
|
+
plumbingHostPanel,
|
|
91
|
+
plumbingPlugin,
|
|
92
|
+
plumbingScheduleView,
|
|
93
|
+
} from '@kruschdev/pascal-plugin-plumbing'
|
|
94
|
+
|
|
95
|
+
extendPluginDiscovery(async () => [plumbingPlugin])
|
|
96
|
+
registerEditorHostPanel(plumbingHostPanel)
|
|
97
|
+
registerEditorHostView(plumbingScheduleView)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
For read-only viewers (zero `@pascal-app/editor` bundle overhead):
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
import { setPluginDiscovery } from '@pascal-app/core'
|
|
104
|
+
import { plumbingRenderPlugin } from '@kruschdev/pascal-plugin-plumbing/render'
|
|
105
|
+
|
|
106
|
+
setPluginDiscovery(async () => [plumbingRenderPlugin])
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Development and Verification
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
bun install
|
|
113
|
+
bun run check # tsc --noEmit + bun test src (102/102 tests) + 5/5 boundary gates + dist/ build
|
|
114
|
+
bun run export:cad # Regenerate all 47 binary .glb models + catalog.json in assets/cad/
|
|
115
|
+
bun scripts/render-cad-thumbnails.ts # Re-render all 47 thumbnails + 5x10 studio contact sheet
|
|
116
|
+
bun scripts/render-manifold-cutaway-closeup.ts # Re-render 4-panel 3D PEX manifold & 2x6 wet-wall cutaway showcase
|
|
117
|
+
PASCAL_EDITOR_URL=http://localhost:3210/project/<id> bun run render:walkthrough # Re-render demo-walkthrough.mp4 & .gif
|
|
118
|
+
bun scripts/render-social-preview.ts # Re-render 1280x640 OpenGraph / GitHub Social Preview banner
|
|
119
|
+
bash scripts/add-voiceover.sh --voice Charon # Synthesize & mux Gemini TTS voiceover
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## License
|
|
123
|
+
|
|
124
|
+
MIT. Created by Kevin Ruschman ([@kruschdev](https://github.com/kruschdev)).
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Agent Tools Reference (`E-016`)
|
|
2
|
+
|
|
3
|
+
`plumbingAgentTools` (`@kruschdev/pascal-plugin-plumbing/agent-tools`) exports 8 pure Zod tool contracts paired with headless scene operations in `plumbingAgentOperations` (`@kruschdev/pascal-plugin-plumbing/agent-operations`):
|
|
4
|
+
|
|
5
|
+
1. `plumbing_place_equipment`: Place water heaters, expansion tanks, PRVs, softeners, sump/sewage pumps, recirc pumps, gas meters, or backwater valves with automatic `electricalDemand` metadata.
|
|
6
|
+
2. `plumbing_place_manifold`: Place PEX home-run, copper trunk, or CSST fuel-gas manifolds.
|
|
7
|
+
3. `plumbing_place_fixture`: Place any of 18 residential or commercial fixtures with DFU/WSFU rough-in data. Pass `autoConnect: true` to immediately route cold/hot water lines, sloped DWV drains, and re-vents to the active manifold and stack in a single undo step.
|
|
8
|
+
4. `plumbing_route_pipe`: Route 3D gravity DWV, vent, supply, fuel-gas, or dryer-vent pipe runs with automatic obstacle detours and framing penetration drill reporting.
|
|
9
|
+
5. `plumbing_autopopulate`: One-click full building plumbing layout honoring placed real-world `catalog:sku-item` / `furnishings:*` fixtures and appliances (toilets, single and double vanities, kitchen sinks, tubs, showers, washers, dryers, gas ranges, French-door refrigerators, and water heaters) plus `@pascal-app/plugin-bones` anchors. Pass `syncOnly: true` to incrementally connect newly placed fixtures without clearing existing plumbing.
|
|
10
|
+
6. `plumbing_calculate_loads`: Calculate DFU, WSFU/GPM, water heater sizing, fuel gas loads, and electrical power coordination.
|
|
11
|
+
7. `plumbing_generate_schedule`: Export fixture schedule CSV, pipe summaries, framing drill list, and priced BOM CSV.
|
|
12
|
+
8. `plumbing_audit_ipc`: Audit the scene against IPC/UPC/IFGC/IRC, Bones framing bore limits, NEC 110.26(E), and unwired electrical loads.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Architecture Guide (`@kruschdev/pascal-plugin-plumbing`)
|
|
2
|
+
|
|
3
|
+
## Layered Subpath Architecture
|
|
4
|
+
|
|
5
|
+
- **`src/ipc/*` (`./ipc`)**: Pure framework-free TypeScript implementing IPC 2021, UPC 2021, IFGC 2021, and IRC 2021 plumbing tables, DFU/WSFU/Hunter's Curve/Hazen-Williams/IFGC sizing, gravity-sloped 3D DWV & obstacle-aware supply routing, `@pascal-app/plugin-bones` framing penetration & wet-wall analysis, `WeakMap`-memoized compliance auditing, schedules, and priced BOMs.
|
|
6
|
+
- **`src/cad/*` (`./cad`)**: Editor-free, React-free Three.js procedural builders for 47 clean-room MIT plumbing CAD models plus the swept sloped pipe-run builder (`buildPipeRunCad` with 3D framing bore collars and galvanized nail plates) and interactive 3D PEX Manifold & 2x6 Wet-Wall Cutaway (`buildWiredManifoldCutawayCad`).
|
|
7
|
+
- **`src/nodes/*` (`./render`)**: Four Pascal Plugin API v1 node definitions (`plumbing:equipment`, `plumbing:manifold`, `plumbing:fixture`, `plumbing:pipe-run`) with Zod v4 schemas, 3D builders, 2D floorplan symbols, snapping ports, and parametric inspector schemas.
|
|
8
|
+
- **`src/agent-tools.ts` & `src/agent-operations.ts` (`./agent-tools`, `./agent-operations`)**: Eight pure Zod `E-016` agent tools and headless scene operations executable from MCP servers, detached runtimes, or live chat in a single undo step.
|
|
9
|
+
- **`src/ui/*` (`.`)**: Isolated Zustand UI store (`store.ts`), left-rail `EditorHostPanel` (`plumbing-panel.tsx`), selected-node `InspectorExtension` (`inspector-card.tsx`), 6-tab split-pane `EditorHostView` (`schedule-view.tsx` + `manifold-cutaway-view.tsx`), and chat cards (`chat-card.tsx`).
|
|
10
|
+
|
|
11
|
+
## Cross-Trade MEP Coordination
|
|
12
|
+
|
|
13
|
+
1. **Trade-Priority Order**: `1. Structural -> 2. Plumbing -> 3. HVAC -> 4. Electrical`.
|
|
14
|
+
2. **Bones Framing**: Reads `bones:framing` (`16"`/`24"` OC, wall thickness) and `bones:service` (`water-heater`, `water-entry`, `sewer-exit`) with zero hard dependency on `@pascal-app/plugin-bones`.
|
|
15
|
+
3. **Electrical Power Handoff**: Every powered plumbing node emits a pure JSON `electricalDemand` payload (`voltage`, `poles`, `breakerAmps`, `loadVa`, `dedicatedCircuit`, `gfciRequired`, `loadCategory`, `label`). `@kruschdev/pascal-plugin-electrical` reads this payload automatically during auto-populate to assign breakers and route 3D power runs back to each unit.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# 47-Model Clean-Room MIT 3D Plumbing CAD Catalog
|
|
2
|
+
|
|
3
|
+
All 47 procedural Three.js CAD parts in `src/cad/catalog.ts` export cleanly to binary `.glb` via `bun run export:cad`:
|
|
4
|
+
|
|
5
|
+
- **Water Heaters & Mechanical Equipment (12)**: 50 gal Electric Tank WH, 50 gal Gas Tank WH w/ Flue, Tankless Condensing Gas WH, Hybrid Heat Pump WH, 2 gal Thermal Expansion Tank, Main Shutoff + PRV + Gauge, Whole-House Water Softener, Sump Pump Basin, Sealed Sewage Ejector Basin, Hot Water Recirc Pump, Natural Gas Utility Meter, Mainline Backwater Valve.
|
|
6
|
+
- **PEX & Fuel-Gas Manifolds (4)**: 12-Port PEX Home-Run Manifold (Open), 24-Port PEX Manifold w/ Enclosure, Type L Copper Header, 8-Port CSST Gas Manifold.
|
|
7
|
+
- **Residential & Commercial Fixtures (18)**: Elongated Water Closet, Vanity Lavatory, Kitchen Sink, Alcove Bathtub, Walk-In Shower, Tub/Shower Combo, Dishwasher Rough-In, Washer Outlet Box & Standpipe, Laundry Sink, Bar Sink, Floor Drain, Frost-Proof Hose Bibb, Heated Bidet Seat, Garbage Disposal, Commercial Urinal, Commercial Mop Basin, Commercial Drinking Fountain, Commercial 50 GPM Grease Interceptor.
|
|
8
|
+
- **DWV Fittings & Cleanouts (7)**: Solvent-Weld P-Trap, Sanitary Tee, 45° Wye/Combo, Long-Sweep 90°, Two-Way Cleanout Tee, Roof Vent Flashing Boot, Air Admittance Valve (AAV).
|
|
9
|
+
- **Supply & Fuel-Gas Valves (4)**: Full-Port Brass Ball Valve, Quarter-Turn Angle Stop, Thermostatic Mixing Valve, Gas Drip Leg & Shutoff.
|
|
10
|
+
- **Pipe Runs, Hangers & Cutaway Assemblies (2)**: Galvanized Clevis Pipe Hanger w/ Threaded Rod, 2x6 Wet-Wall PEX Manifold & 3" PVC Stack Cutaway (plus swept `buildPipeRunCad` with 3D stud bore collars and wall-normal steel nail plates).
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# IPC / UPC / IFGC / IRC Engineering Reference
|
|
2
|
+
|
|
3
|
+
Implemented deterministic tables and rules in `src/ipc/*`:
|
|
4
|
+
|
|
5
|
+
- **IPC Table 709.1 / UPC Table 702.1**: Drainage Fixture Units (DFU) across 18 residential and commercial fixture kinds.
|
|
6
|
+
- **IPC Table 710.1(1) & 710.1(2)**: Building drain, sewer, horizontal branch, and vertical stack sizing (`>= 3"` enforced once a water closet is upstream; `4"` for `3+` WCs on a horizontal branch).
|
|
7
|
+
- **IPC Table 704.1**: Gravity drainage pitch (`>= 1/4"/ft` for `<= 2-1/2"`, `>= 1/8"/ft` for `>= 3"`, zero uphill segments).
|
|
8
|
+
- **IPC Table 706.3**: Prohibits sanitary tees on horizontal drainage turns (requires 45° wye/combo or long-sweep 90°).
|
|
9
|
+
- **IPC 708.1**: Stack-base and building-drain cleanouts and `<= 100 ft` cleanout spacing.
|
|
10
|
+
- **IPC 903.1 / Table 906.1 / Table 909.1 / 905.5**: `3"` minimum main vent stack through roof, vent sizing, max trap-arm distances (`1-1/4": 5 ft`, `1-1/2": 6 ft`, `2": 8 ft`, `3": 12 ft`, `4": 16 ft`), and horizontal dry vent tie-in `>= 6"` above fixture flood-level rim.
|
|
11
|
+
- **IPC Table E103.3(2) & E103.3(3)**: WSFU to Modified Hunter's Curve Peak GPM (flush-tank and flushometer) plus Hazen-Williams head loss and velocity limits (`<= 5 ft/s` hot copper, `<= 8 ft/s` cold copper / PEX / CPVC).
|
|
12
|
+
- **IPC 504.6 / 504.7 / 607.3**: Water heater T&P relief discharge pipe, safety drain pan, and closed-system thermal expansion tank sizing.
|
|
13
|
+
- **IPC 608.15.4.2**: Anti-siphon vacuum breaker protection on exterior hose bibbs.
|
|
14
|
+
- **IRC R602.6 / IPC 305.6**: `2x6` wet-wall cavity checks for `3"`/`4"` DWV pipes, `40%`/`60%` wall stud boring limits, sole-plate and double top-plate penetration checks, hole-saw sizing, and galvanized nail-plate requirements. (Scope note: `computePipeFramingPenetrations` models wall studs, sole plates, and double top plates; `IRC R502.8` floor-joist boring and `stair`/`window`/`door` 3D obstacle extraction are not modeled.)
|
|
15
|
+
- **IFGC Table 402.4(2) / 402.4(15) / 408.4 / 409.5**: Longest-length natural gas sizing for Schedule 40 Black Iron and CSST, sediment trap (drip leg), and appliance shutoff within `6 ft`.
|
|
16
|
+
- **IRC M1502.4**: Smooth rigid `4"` metal dryer exhaust duct capped at `35 ft` effective length (`-5 ft` per 90° elbow, `-2.5 ft` per 45° elbow).
|
|
17
|
+
- **NEC 110.26(E)**: Dedicated Electrical Space keep-out above `electrical:panel` and `electrical:transformer` nodes.
|
package/package.json
CHANGED
|
@@ -1,6 +1,91 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kruschdev/pascal-plugin-plumbing",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "Residential & Light-Commercial IPC/UPC/IFGC plumbing authoring, DFU/WSFU/gas load calculations, gravity-sloped DWV & PEX manifold routing, and code audit plugin for Pascal Editor.",
|
|
5
|
+
"author": "Kevin Ruschman <kruschdev@users.noreply.github.com>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/kruschdev/pascal-plugin-plumbing.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/kruschdev/pascal-plugin-plumbing",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/kruschdev/pascal-plugin-plumbing/issues"
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"main": "./src/index.ts",
|
|
17
|
+
"types": "./src/index.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": "./src/index.ts",
|
|
20
|
+
"./render": "./src/render.ts",
|
|
21
|
+
"./ipc": "./src/ipc/index.ts",
|
|
22
|
+
"./cad": "./src/cad/index.ts",
|
|
23
|
+
"./agent-tools": "./src/agent-tools.ts",
|
|
24
|
+
"./agent-operations": "./src/agent-operations.ts",
|
|
25
|
+
"./package.json": "./package.json"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"src",
|
|
29
|
+
"!src/__tests__",
|
|
30
|
+
"docs/ARCHITECTURE.md",
|
|
31
|
+
"docs/IPC-REFERENCE.md",
|
|
32
|
+
"docs/AGENT-TOOLS.md",
|
|
33
|
+
"docs/CAD-CATALOG.md",
|
|
34
|
+
"README.md",
|
|
35
|
+
"LICENSE"
|
|
36
|
+
],
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "NODE_ENV=production bun scripts/build-dist.ts",
|
|
39
|
+
"check-types": "tsc --noEmit",
|
|
40
|
+
"test": "bun test src",
|
|
41
|
+
"check:render": "bun scripts/check-render-entry.ts",
|
|
42
|
+
"export:cad": "bun scripts/export-cad-catalog.ts",
|
|
43
|
+
"render:walkthrough": "bun scripts/render-walkthrough-video.ts",
|
|
44
|
+
"check": "bun run check-types && bun test && bun run check:render && bun run build"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@kruschdev/pascal-mep-kernel": "^0.1.0"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"@pascal-app/core": ">=1.0.0 <2",
|
|
51
|
+
"@pascal-app/editor": ">=1.0.0 <2",
|
|
52
|
+
"@pascal-app/viewer": ">=1.0.0 <2",
|
|
53
|
+
"react": "^18 || ^19",
|
|
54
|
+
"three": ">=0.185 <1",
|
|
55
|
+
"zod": "^4",
|
|
56
|
+
"zustand": "^5"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@pascal-app/core": "1.1.6",
|
|
60
|
+
"@pascal-app/editor": "1.1.6",
|
|
61
|
+
"@pascal-app/viewer": "1.1.6",
|
|
62
|
+
"@types/blob-stream": "^0.1.33",
|
|
63
|
+
"@types/bun": "^1.3.5",
|
|
64
|
+
"@types/node": "^22.19.12",
|
|
65
|
+
"@types/pdfkit": "^0.17.7",
|
|
66
|
+
"@types/react": "^19.2.2",
|
|
67
|
+
"@types/react-dom": "^19.2.2",
|
|
68
|
+
"@types/three": "^0.187.0",
|
|
69
|
+
"react": "^19.3.1",
|
|
70
|
+
"react-dom": "^19.3.1",
|
|
71
|
+
"three": "^0.187.0",
|
|
72
|
+
"typescript": "^5.9.3",
|
|
73
|
+
"zod": "^4.6.7",
|
|
74
|
+
"zustand": "^5.1.0"
|
|
75
|
+
},
|
|
76
|
+
"keywords": [
|
|
77
|
+
"pascal",
|
|
78
|
+
"pascal-plugin",
|
|
79
|
+
"plumbing",
|
|
80
|
+
"ipc",
|
|
81
|
+
"upc",
|
|
82
|
+
"dwv",
|
|
83
|
+
"pex",
|
|
84
|
+
"ifgc",
|
|
85
|
+
"mep",
|
|
86
|
+
"bim",
|
|
87
|
+
"aeco",
|
|
88
|
+
"3d",
|
|
89
|
+
"cad"
|
|
90
|
+
]
|
|
91
|
+
}
|