@kruschdev/pascal-plugin-plumbing 0.0.0-stage → 0.3.0
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 +854 -0
- package/src/agent-tools.ts +258 -0
- package/src/cad/catalog.ts +151 -0
- package/src/cad/equipment.ts +172 -0
- package/src/cad/fittings.ts +322 -0
- package/src/cad/fixtures.ts +255 -0
- package/src/cad/index.ts +6 -0
- package/src/cad/manifold-interior.ts +248 -0
- package/src/cad/materials.ts +122 -0
- package/src/index.ts +156 -0
- package/src/ipc/audit.ts +927 -0
- package/src/ipc/autopopulate.ts +5071 -0
- package/src/ipc/framing-interop.ts +843 -0
- package/src/ipc/index.ts +9 -0
- package/src/ipc/pricing.ts +571 -0
- package/src/ipc/routing.ts +2410 -0
- package/src/ipc/rules.ts +271 -0
- package/src/ipc/schedule.ts +653 -0
- package/src/ipc/sizing.ts +663 -0
- package/src/ipc/tables.ts +780 -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 +170 -0
- package/src/nodes/pipe-run.ts +393 -0
- package/src/render.ts +64 -0
- package/src/ui/chat-card.tsx +209 -0
- package/src/ui/inspector-card.tsx +243 -0
- package/src/ui/manifold-cutaway-view.tsx +297 -0
- package/src/ui/plumbing-panel.tsx +812 -0
- package/src/ui/schedule-view.tsx +523 -0
- package/src/ui/store.ts +98 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure Zod-only Agent Tool Contracts (`@kruschdev/pascal-plugin-plumbing/agent-tools`).
|
|
3
|
+
* Conforms to Pascal DECISIONS.md E-016: zero Three.js, React, viewer, or editor imports.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { PluginAgentTools } from '@pascal-app/core/agent-tools'
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
const Vec3 = z.tuple([z.number(), z.number(), z.number()])
|
|
10
|
+
|
|
11
|
+
const EquipmentKind = z.enum([
|
|
12
|
+
'water-heater-tank-gas',
|
|
13
|
+
'water-heater-tank-electric',
|
|
14
|
+
'water-heater-tankless-gas',
|
|
15
|
+
'water-heater-hpwh',
|
|
16
|
+
'expansion-tank',
|
|
17
|
+
'main-shutoff-prv',
|
|
18
|
+
'water-softener',
|
|
19
|
+
'sump-pump',
|
|
20
|
+
'sewage-ejector',
|
|
21
|
+
'recirc-pump',
|
|
22
|
+
'gas-meter',
|
|
23
|
+
'backwater-valve',
|
|
24
|
+
])
|
|
25
|
+
|
|
26
|
+
const FixtureKind = z.enum([
|
|
27
|
+
'water-closet',
|
|
28
|
+
'lavatory',
|
|
29
|
+
'kitchen-sink',
|
|
30
|
+
'bathtub',
|
|
31
|
+
'shower',
|
|
32
|
+
'tub-shower-combo',
|
|
33
|
+
'dishwasher',
|
|
34
|
+
'clothes-washer',
|
|
35
|
+
'laundry-sink',
|
|
36
|
+
'bar-sink',
|
|
37
|
+
'floor-drain',
|
|
38
|
+
'hose-bibb',
|
|
39
|
+
'bidet',
|
|
40
|
+
'garbage-disposal',
|
|
41
|
+
'urinal',
|
|
42
|
+
'mop-sink',
|
|
43
|
+
'drinking-fountain',
|
|
44
|
+
'grease-interceptor',
|
|
45
|
+
])
|
|
46
|
+
|
|
47
|
+
const PlumbingSystem = z.enum([
|
|
48
|
+
'cold-water',
|
|
49
|
+
'hot-water',
|
|
50
|
+
'hot-recirc',
|
|
51
|
+
'dwv-drain',
|
|
52
|
+
'dwv-vent',
|
|
53
|
+
'fuel-gas',
|
|
54
|
+
'condensate',
|
|
55
|
+
'dryer-vent',
|
|
56
|
+
])
|
|
57
|
+
|
|
58
|
+
const PipeMaterial = z.enum([
|
|
59
|
+
'pex-a',
|
|
60
|
+
'pex-b',
|
|
61
|
+
'copper-l',
|
|
62
|
+
'copper-m',
|
|
63
|
+
'cpvc',
|
|
64
|
+
'pvc-dwv',
|
|
65
|
+
'abs-dwv',
|
|
66
|
+
'cast-iron',
|
|
67
|
+
'csst',
|
|
68
|
+
'black-iron',
|
|
69
|
+
'rigid-aluminum',
|
|
70
|
+
])
|
|
71
|
+
|
|
72
|
+
const PipeNominalSize = z.enum([
|
|
73
|
+
'3/8"',
|
|
74
|
+
'1/2"',
|
|
75
|
+
'3/4"',
|
|
76
|
+
'1"',
|
|
77
|
+
'1-1/4"',
|
|
78
|
+
'1-1/2"',
|
|
79
|
+
'2"',
|
|
80
|
+
'2-1/2"',
|
|
81
|
+
'3"',
|
|
82
|
+
'4"',
|
|
83
|
+
'6"',
|
|
84
|
+
])
|
|
85
|
+
|
|
86
|
+
export const plumbingAgentTools: PluginAgentTools = {
|
|
87
|
+
pluginId: 'krusch:plumbing',
|
|
88
|
+
apiVersion: 1,
|
|
89
|
+
version: '0.2.1',
|
|
90
|
+
instructions:
|
|
91
|
+
'Plumbing holds Priority #2 MEP right-of-way (1. Structural -> 2. Plumbing -> 3. HVAC -> 4. Electrical) due to gravity DWV slope requirements. Plumbing yields ONLY to Structural members and NEC 110.26(E) Dedicated Electrical Space above electrical panels. Every powered plumbing unit (electric/HPWH water heater, sump pump, sewage ejector, dishwasher, disposal, washer) publishes an `electricalDemand` spec so Electrical automatically adds its breaker and 3D power run.',
|
|
92
|
+
skills: [
|
|
93
|
+
{
|
|
94
|
+
name: 'ipc-gravity-first-plumbing',
|
|
95
|
+
summary: 'Residential & Light-Commercial IPC/UPC/IFGC plumbing workflow with Bones framing penetration & Electrical power coordination',
|
|
96
|
+
body: [
|
|
97
|
+
'1. Run `plumbing_autopopulate` to scan rooms, placed Pascal fixtures, and `@pascal-app/plugin-bones` (`bones:service` water-heater / water-entry / sewer-exit) anchors to generate a complete DWV, vent, hot/cold supply, and optional fuel-gas / dryer-vent network.',
|
|
98
|
+
'2. Add individual mechanical equipment (`plumbing_place_equipment`), PEX/copper/gas manifolds (`plumbing_place_manifold`), or fixtures (`plumbing_place_fixture`).',
|
|
99
|
+
'3. Route custom gravity-sloped drains, vents, supply, or gas lines via `plumbing_route_pipe` (automatically respecting structural obstacles and NEC 110.26(E) panel keep-outs).',
|
|
100
|
+
'4. Run `plumbing_calculate_loads`, `plumbing_generate_schedule`, and `plumbing_audit_ipc` to confirm zero IPC/UPC/IFGC/IRC errors, review stud bore drill schedules, and verify cross-trade Electrical power wiring.',
|
|
101
|
+
].join('\n'),
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
tools: [
|
|
105
|
+
{
|
|
106
|
+
name: 'plumbing_place_equipment',
|
|
107
|
+
title: 'Place plumbing mechanical equipment',
|
|
108
|
+
description:
|
|
109
|
+
'Place a water heater (electric/gas tank, tankless, HPWH), expansion tank, PRV/shutoff, water softener, sump/sewage pump, recirc pump, gas meter, or backwater valve with automatic electricalDemand metadata.',
|
|
110
|
+
runsIn: 'operation',
|
|
111
|
+
input: {
|
|
112
|
+
levelId: z.string().optional(),
|
|
113
|
+
name: z.string().optional(),
|
|
114
|
+
equipmentKind: EquipmentKind.default('water-heater-tank-electric'),
|
|
115
|
+
position: Vec3,
|
|
116
|
+
rotation: z.number().default(0),
|
|
117
|
+
roomName: z.string().default('Utility'),
|
|
118
|
+
capacityGal: z.number().min(0).max(500).optional(),
|
|
119
|
+
gasBtuh: z.number().min(0).max(500000).optional(),
|
|
120
|
+
watts: z.number().min(0).max(50000).optional(),
|
|
121
|
+
roomVolumeCuFt: z.number().min(0).max(50000).optional(),
|
|
122
|
+
},
|
|
123
|
+
annotations: { destructiveHint: false, idempotentHint: false },
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'plumbing_place_manifold',
|
|
127
|
+
title: 'Place PEX, copper, or fuel-gas manifold',
|
|
128
|
+
description:
|
|
129
|
+
'Place a PEX home-run manifold with quarter-turn ball valves, copper trunk header, or CSST gas manifold on a level.',
|
|
130
|
+
runsIn: 'operation',
|
|
131
|
+
input: {
|
|
132
|
+
levelId: z.string().optional(),
|
|
133
|
+
name: z.string().optional(),
|
|
134
|
+
manifoldKind: z.enum(['pex-homerun', 'copper-header', 'gas-csst']).default('pex-homerun'),
|
|
135
|
+
position: Vec3,
|
|
136
|
+
rotation: z.number().default(0),
|
|
137
|
+
portCount: z.number().int().min(4).max(36).default(12),
|
|
138
|
+
coverRemoved: z.boolean().default(false),
|
|
139
|
+
},
|
|
140
|
+
annotations: { destructiveHint: false, idempotentHint: false },
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: 'plumbing_place_fixture',
|
|
144
|
+
title: 'Place plumbing fixture rough-in',
|
|
145
|
+
description:
|
|
146
|
+
'Place any of 18 residential or light-commercial plumbing fixtures with IPC Table 709.1 DFU, WSFU, rough-in height, and electricalDemand coordination metadata. Pass autoConnect: true to immediately route its cold/hot water lines, gravity DWV drain, and re-vent to the active manifold and stack.',
|
|
147
|
+
runsIn: 'operation',
|
|
148
|
+
input: {
|
|
149
|
+
levelId: z.string().optional(),
|
|
150
|
+
name: z.string().optional(),
|
|
151
|
+
fixtureKind: FixtureKind.default('lavatory'),
|
|
152
|
+
position: Vec3,
|
|
153
|
+
rotation: z.number().default(0),
|
|
154
|
+
roomName: z.string().optional(),
|
|
155
|
+
codeEdition: z.enum(['IPC-2021', 'UPC-2021']).default('IPC-2021'),
|
|
156
|
+
autoConnect: z.boolean().default(false),
|
|
157
|
+
occupancy: z.enum(['residential', 'commercial']).optional(),
|
|
158
|
+
supplyMaterial: z.enum(['pex-a', 'pex-b', 'copper-l', 'cpvc']).optional(),
|
|
159
|
+
dwvMaterial: z.enum(['pvc-dwv', 'abs-dwv', 'cast-iron']).optional(),
|
|
160
|
+
foundationType: z.enum(['slab', 'crawlspace', 'basement']).optional(),
|
|
161
|
+
},
|
|
162
|
+
annotations: { destructiveHint: false, idempotentHint: false },
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: 'plumbing_route_pipe',
|
|
166
|
+
title: 'Route 3D gravity DWV, vent, supply, or gas pipe run',
|
|
167
|
+
description:
|
|
168
|
+
'Route a 3D pipe run between two points with automatic gravity DWV pitch (1/4" or 1/8"/ft), vent flood-rim clearance (IPC 905.5), structural/NEC 110.26(E) obstacle avoidance, and Bones framing penetration drill reporting.',
|
|
169
|
+
runsIn: 'operation',
|
|
170
|
+
input: {
|
|
171
|
+
levelId: z.string().optional(),
|
|
172
|
+
name: z.string().optional(),
|
|
173
|
+
from: Vec3,
|
|
174
|
+
to: Vec3,
|
|
175
|
+
system: PlumbingSystem.default('cold-water'),
|
|
176
|
+
material: PipeMaterial.optional(),
|
|
177
|
+
nominalSize: PipeNominalSize.optional(),
|
|
178
|
+
foundationType: z.enum(['slab', 'crawlspace', 'basement']).default('crawlspace'),
|
|
179
|
+
dfuLoad: z.number().min(0).max(1000).default(0),
|
|
180
|
+
wsfuLoad: z.number().min(0).max(1000).default(0),
|
|
181
|
+
gasBtuh: z.number().min(0).max(2000000).default(0),
|
|
182
|
+
hasCleanout: z.boolean().default(false),
|
|
183
|
+
},
|
|
184
|
+
annotations: { destructiveHint: false, idempotentHint: false },
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: 'plumbing_autopopulate',
|
|
188
|
+
title: 'One-click IPC/UPC auto-populate plumbing',
|
|
189
|
+
description:
|
|
190
|
+
'Scan rooms, placed real-world catalog/furnishing fixtures & appliances (toilets, vanities, kitchen sinks, tubs, showers, washers, dryers, gas ranges, refrigerators, water heaters), and plugin-bones anchors to auto-populate water heater, PEX manifold, rough-in stub-outs, frost-proof hose bibbs, sloped DWV drains, 3" roof vent stack, hot/cold supply, and optional gas/dryer-vent runs. Set syncOnly: true to incrementally connect newly placed fixtures without clearing existing plumbing.',
|
|
191
|
+
runsIn: 'operation',
|
|
192
|
+
input: {
|
|
193
|
+
levelId: z.string().optional(),
|
|
194
|
+
occupancy: z.enum(['residential', 'commercial']).default('residential'),
|
|
195
|
+
codeEdition: z.enum(['IPC-2021', 'UPC-2021']).default('IPC-2021'),
|
|
196
|
+
supplyTopology: z.enum(['manifold', 'trunk-and-branch']).default('manifold'),
|
|
197
|
+
supplyMaterial: z.enum(['pex-a', 'pex-b', 'copper-l', 'cpvc']).default('pex-a'),
|
|
198
|
+
dwvMaterial: z.enum(['pvc-dwv', 'abs-dwv', 'cast-iron']).default('pvc-dwv'),
|
|
199
|
+
foundationType: z.enum(['slab', 'crawlspace', 'basement']).default('crawlspace'),
|
|
200
|
+
waterHeaterKind: z
|
|
201
|
+
.enum([
|
|
202
|
+
'water-heater-tank-electric',
|
|
203
|
+
'water-heater-tank-gas',
|
|
204
|
+
'water-heater-tankless-gas',
|
|
205
|
+
'water-heater-hpwh',
|
|
206
|
+
])
|
|
207
|
+
.default('water-heater-tank-electric'),
|
|
208
|
+
includeFuelGas: z.boolean().optional(),
|
|
209
|
+
includeDryerVent: z.boolean().default(true),
|
|
210
|
+
includeHotRecirc: z.boolean().default(false),
|
|
211
|
+
bonesMode: z.enum(['auto', 'import-only', 'ignore']).default('auto'),
|
|
212
|
+
clearExisting: z.boolean().default(true),
|
|
213
|
+
syncOnly: z.boolean().default(false),
|
|
214
|
+
},
|
|
215
|
+
annotations: { destructiveHint: true, idempotentHint: false },
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
name: 'plumbing_calculate_loads',
|
|
219
|
+
title: 'Calculate IPC/UPC DFU, WSFU/GPM, water heater & gas loads',
|
|
220
|
+
description:
|
|
221
|
+
'Compute building drain sizing (IPC Table 710.1), Hunter-curve peak GPM & velocity, water heater & expansion tank recommendation, IFGC fuel-gas sizing, and cross-trade electrical power demands.',
|
|
222
|
+
runsIn: 'operation',
|
|
223
|
+
input: {
|
|
224
|
+
codeEdition: z.enum(['IPC-2021', 'UPC-2021']).default('IPC-2021'),
|
|
225
|
+
occupancy: z.enum(['residential', 'commercial']).default('residential'),
|
|
226
|
+
supplyMaterial: z.enum(['pex-a', 'pex-b', 'copper-l', 'copper-m', 'cpvc']).optional(),
|
|
227
|
+
},
|
|
228
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
name: 'plumbing_generate_schedule',
|
|
232
|
+
title: 'Generate fixture schedule, framing drill list & priced BOM',
|
|
233
|
+
description:
|
|
234
|
+
'Generate the fixture schedule, pipe linear-footage summary, Bones framing stud/plate drill schedule, cross-trade electrical coordination table, and priced BOM takeoff.',
|
|
235
|
+
runsIn: 'operation',
|
|
236
|
+
input: {
|
|
237
|
+
codeEdition: z.enum(['IPC-2021', 'UPC-2021']).default('IPC-2021'),
|
|
238
|
+
occupancy: z.enum(['residential', 'commercial']).optional(),
|
|
239
|
+
laborRateUsd: z.number().min(20).max(400).default(115),
|
|
240
|
+
materialMarkupPct: z.number().min(0).max(100).default(0),
|
|
241
|
+
salesTaxPct: z.number().min(0).max(25).default(0),
|
|
242
|
+
},
|
|
243
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
name: 'plumbing_audit_ipc',
|
|
247
|
+
title: 'Audit scene for IPC, UPC, IFGC, IRC & NEC 110.26(E) compliance',
|
|
248
|
+
description:
|
|
249
|
+
'Audit all plumbing equipment, fixtures, and pipe runs for DWV slope, 2x6 wet walls, trap-arm limits, vent flood-rim clearance, supply velocity, gas drip legs, dryer vents, structural clashes, NEC 110.26(E) panel keep-outs, and unwired electrical demands.',
|
|
250
|
+
runsIn: 'operation',
|
|
251
|
+
input: {
|
|
252
|
+
codeEdition: z.enum(['IPC-2021', 'UPC-2021']).default('IPC-2021'),
|
|
253
|
+
occupancy: z.enum(['residential', 'commercial']).optional(),
|
|
254
|
+
},
|
|
255
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
256
|
+
},
|
|
257
|
+
],
|
|
258
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 47-Model Clean-Room MIT 3D Plumbing CAD Catalog Registry (`src/cad/catalog.ts`).
|
|
3
|
+
* Editor-free and React-free: zero React or `@pascal-app/editor` imports.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Group } from 'three'
|
|
7
|
+
import type { EquipmentKind, FixtureKind, ManifoldKind } from '../ipc/tables'
|
|
8
|
+
import { buildEquipmentCad } from './equipment'
|
|
9
|
+
import { type FittingCadKind, buildFittingCad, buildPipeRunCad } from './fittings'
|
|
10
|
+
import { buildFixtureCad } from './fixtures'
|
|
11
|
+
import { buildManifoldCad, buildWiredManifoldCutawayCad } from './manifold-interior'
|
|
12
|
+
|
|
13
|
+
export type PlumbingCadCategory =
|
|
14
|
+
| 'Water Heaters & Mechanical Equipment'
|
|
15
|
+
| 'PEX & Fuel-Gas Manifolds'
|
|
16
|
+
| 'Residential & Commercial Fixtures'
|
|
17
|
+
| 'DWV Fittings & Cleanouts'
|
|
18
|
+
| 'Supply & Fuel-Gas Valves'
|
|
19
|
+
| 'Pipe Runs & Cutaway Assemblies'
|
|
20
|
+
|
|
21
|
+
export type PlumbingCadPartEntry = {
|
|
22
|
+
id: string
|
|
23
|
+
category: PlumbingCadCategory
|
|
24
|
+
title: string
|
|
25
|
+
codeRef: string
|
|
26
|
+
build: () => Group
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const eqEntry = (id: string, kind: EquipmentKind, title: string, codeRef: string): PlumbingCadPartEntry => ({
|
|
30
|
+
id,
|
|
31
|
+
category: 'Water Heaters & Mechanical Equipment',
|
|
32
|
+
title,
|
|
33
|
+
codeRef,
|
|
34
|
+
build: () => buildEquipmentCad({ equipmentKind: kind }),
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
const fixEntry = (id: string, kind: FixtureKind, title: string, codeRef: string): PlumbingCadPartEntry => ({
|
|
38
|
+
id,
|
|
39
|
+
category: 'Residential & Commercial Fixtures',
|
|
40
|
+
title,
|
|
41
|
+
codeRef,
|
|
42
|
+
build: () => buildFixtureCad({ fixtureKind: kind }),
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
const fitEntry = (
|
|
46
|
+
id: string,
|
|
47
|
+
kind: FittingCadKind,
|
|
48
|
+
category: PlumbingCadCategory,
|
|
49
|
+
title: string,
|
|
50
|
+
codeRef: string,
|
|
51
|
+
): PlumbingCadPartEntry => ({
|
|
52
|
+
id,
|
|
53
|
+
category,
|
|
54
|
+
title,
|
|
55
|
+
codeRef,
|
|
56
|
+
build: () => buildFittingCad(kind),
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
const manEntry = (
|
|
60
|
+
id: string,
|
|
61
|
+
kind: ManifoldKind,
|
|
62
|
+
portCount: number,
|
|
63
|
+
coverRemoved: boolean,
|
|
64
|
+
title: string,
|
|
65
|
+
codeRef: string,
|
|
66
|
+
): PlumbingCadPartEntry => ({
|
|
67
|
+
id,
|
|
68
|
+
category: 'PEX & Fuel-Gas Manifolds',
|
|
69
|
+
title,
|
|
70
|
+
codeRef,
|
|
71
|
+
build: () => buildManifoldCad({ manifoldKind: kind, portCount, coverRemoved }),
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
export const PLUMBING_CAD_CATALOG: readonly PlumbingCadPartEntry[] = [
|
|
75
|
+
// Category 1: Water Heaters & Mechanical Equipment (12)
|
|
76
|
+
eqEntry('wh-tank-electric-50', 'water-heater-tank-electric', '50 Gal Electric Tank Water Heater', 'IPC 501 / 504'),
|
|
77
|
+
eqEntry('wh-tank-gas-50', 'water-heater-tank-gas', '50 Gal Gas Tank Water Heater w/ Flue', 'IPC 501 / IFGC'),
|
|
78
|
+
eqEntry('wh-tankless-gas', 'water-heater-tankless-gas', 'Wall-Hung Condensing Tankless Gas WH', 'IPC 501 / IFGC'),
|
|
79
|
+
eqEntry('wh-hybrid-hpwh', 'water-heater-hpwh', 'Hybrid Heat Pump Water Heater (HPWH)', 'IPC 501 / IMC 304'),
|
|
80
|
+
eqEntry('thermal-expansion-tank', 'expansion-tank', '2 Gal Thermal Expansion Tank', 'IPC 607.3'),
|
|
81
|
+
eqEntry('main-shutoff-prv-assembly', 'main-shutoff-prv', 'Main Water Shutoff, PRV & Pressure Gauge', 'IPC 604.8 / 606'),
|
|
82
|
+
eqEntry('whole-house-water-softener', 'water-softener', 'Whole-House Water Softener & Brine Tank', 'IPC 611'),
|
|
83
|
+
eqEntry('sump-pump-basin', 'sump-pump', 'Cast-Iron Sump Pump, Basin & Check Valve', 'IPC 1113'),
|
|
84
|
+
eqEntry('sewage-ejector-basin', 'sewage-ejector', 'Sealed Sewage Ejector Basin w/ 2" Vent', 'IPC 712'),
|
|
85
|
+
eqEntry('hot-water-recirc-pump', 'recirc-pump', 'Hot Water Recirculation Pump', 'IPC 607.2'),
|
|
86
|
+
eqEntry('utility-gas-meter', 'gas-meter', 'Natural Gas Utility Meter & Regulator', 'IFGC 402'),
|
|
87
|
+
eqEntry('mainline-backwater-valve', 'backwater-valve', 'Mainline Sanitary Backwater Valve', 'IPC 714'),
|
|
88
|
+
|
|
89
|
+
// Category 2: PEX & Fuel-Gas Manifolds (4)
|
|
90
|
+
manEntry('pex-manifold-12-open', 'pex-homerun', 12, true, '12-Port PEX Home-Run Manifold (Open)', 'IPC 604 / 606'),
|
|
91
|
+
manEntry('pex-manifold-24-closed', 'pex-homerun', 24, false, '24-Port PEX Manifold w/ Steel Enclosure', 'IPC 604 / 606'),
|
|
92
|
+
manEntry('copper-distribution-header', 'copper-header', 12, true, 'Type L Copper Trunk Distribution Header', 'IPC 605.3'),
|
|
93
|
+
manEntry('csst-gas-manifold', 'gas-csst', 8, true, '8-Port CSST Fuel-Gas Distribution Manifold', 'IFGC 402.4(15)'),
|
|
94
|
+
|
|
95
|
+
// Category 3: Residential & Commercial Fixtures (18)
|
|
96
|
+
fixEntry('fixture-water-closet', 'water-closet', 'Elongated Water Closet (1.28 GPF)', 'IPC Table 709.1'),
|
|
97
|
+
fixEntry('fixture-lavatory', 'lavatory', 'Vanity Lavatory w/ P-Trap & Angle Stops', 'IPC Table 709.1'),
|
|
98
|
+
fixEntry('fixture-kitchen-sink', 'kitchen-sink', 'Undermount Kitchen Sink w/ Gooseneck Faucet', 'IPC Table 709.1'),
|
|
99
|
+
fixEntry('fixture-bathtub', 'bathtub', 'Alcove Bathtub w/ Mixing Valve & Spout', 'IPC Table 709.1'),
|
|
100
|
+
fixEntry('fixture-shower', 'shower', 'Walk-In Shower Pan & Pressure-Balance Valve', 'IPC 412.3'),
|
|
101
|
+
fixEntry('fixture-tub-shower-combo', 'tub-shower-combo', 'Tub / Shower Combo Rough-In Assembly', 'IPC 412.3'),
|
|
102
|
+
fixEntry('fixture-dishwasher', 'dishwasher', 'Dishwasher Rough-In & Indirect Drain', 'IPC 802.1.6'),
|
|
103
|
+
fixEntry('fixture-washer-box', 'clothes-washer', 'Recessed Washer Outlet Box & 2" Standpipe', 'IPC 802.4.3.1'),
|
|
104
|
+
fixEntry('fixture-laundry-sink', 'laundry-sink', 'Laundry / Utility Basin w/ Rough-In', 'IPC Table 709.1'),
|
|
105
|
+
fixEntry('fixture-bar-sink', 'bar-sink', 'Wet-Bar Sink Assembly', 'IPC Table 709.1'),
|
|
106
|
+
fixEntry('fixture-floor-drain', 'floor-drain', '2" Cast-Iron Floor Drain w/ Chrome Strainer', 'IPC 413'),
|
|
107
|
+
fixEntry('fixture-hose-bibb', 'hose-bibb', 'Frost-Proof Exterior Hose Bibb w/ Vacuum Breaker', 'IPC 608.15.4.2'),
|
|
108
|
+
fixEntry('fixture-bidet', 'bidet', 'Heated Bidet Seat & Supply Assembly', 'IPC 408 / NEC 210'),
|
|
109
|
+
fixEntry('fixture-garbage-disposal', 'garbage-disposal', '3/4 HP Under-Sink Garbage Disposal', 'IPC 416 / NEC 210'),
|
|
110
|
+
fixEntry('fixture-urinal', 'urinal', 'Commercial Wall-Hung Urinal w/ Flushometer', 'IPC Table 709.1'),
|
|
111
|
+
fixEntry('fixture-mop-sink', 'mop-sink', 'Commercial Mop / Service Basin (3" Drain)', 'IPC Table 709.1'),
|
|
112
|
+
fixEntry('fixture-drinking-fountain', 'drinking-fountain', 'Commercial Wall-Hung Drinking Fountain', 'IPC 410'),
|
|
113
|
+
fixEntry('fixture-grease-interceptor', 'grease-interceptor', 'Commercial 50 GPM Grease Interceptor', 'IPC 1003.3'),
|
|
114
|
+
|
|
115
|
+
// Category 4: DWV Fittings & Cleanouts (7)
|
|
116
|
+
fitEntry('fitting-p-trap', 'p-trap', 'DWV Fittings & Cleanouts', '1-1/2" / 2" Solvent-Weld PVC P-Trap', 'IPC 1002.1'),
|
|
117
|
+
fitEntry('fitting-sanitary-tee', 'sanitary-tee', 'DWV Fittings & Cleanouts', '3" Vertical Sanitary Tee', 'IPC Table 706.3'),
|
|
118
|
+
fitEntry('fitting-wye-combo', 'wye-combo', 'DWV Fittings & Cleanouts', '3" 45° Wye / Combo Drainage Fitting', 'IPC Table 706.3'),
|
|
119
|
+
fitEntry('fitting-long-sweep-90', 'long-sweep-90', 'DWV Fittings & Cleanouts', '3" Long-Sweep 90° DWV Elbow', 'IPC Table 706.3'),
|
|
120
|
+
fitEntry('fitting-cleanout-tee', 'cleanout-tee', 'DWV Fittings & Cleanouts', '3" Two-Way Cleanout Tee w/ Brass Plug', 'IPC 708.1'),
|
|
121
|
+
fitEntry('fitting-roof-vent-flashing', 'roof-vent-flashing', 'DWV Fittings & Cleanouts', '3" Roof Vent Stack Flashing Boot', 'IPC 903.2'),
|
|
122
|
+
fitEntry('fitting-aav-studor', 'aav-studor', 'DWV Fittings & Cleanouts', 'Air Admittance Valve (AAV / Studor)', 'IPC 918'),
|
|
123
|
+
|
|
124
|
+
// Category 5: Supply & Fuel-Gas Valves (4)
|
|
125
|
+
fitEntry('valve-full-port-ball', 'ball-valve', 'Supply & Fuel-Gas Valves', '3/4" Full-Port Brass Ball Valve', 'IPC 606'),
|
|
126
|
+
fitEntry('valve-quarter-turn-stop', 'angle-stop', 'Supply & Fuel-Gas Valves', 'Quarter-Turn Chrome Angle Stop', 'IPC 606.2'),
|
|
127
|
+
fitEntry('valve-thermostatic-mixing', 'mixing-valve', 'Supply & Fuel-Gas Valves', 'Thermostatic Anti-Scald Mixing Valve', 'IPC 607.1.2'),
|
|
128
|
+
fitEntry('valve-gas-drip-leg', 'gas-drip-leg', 'Supply & Fuel-Gas Valves', 'Fuel-Gas Sediment Trap (Drip Leg) & Shutoff', 'IFGC 408.4 / 409.5'),
|
|
129
|
+
|
|
130
|
+
// Category 6: Pipe Runs, Hangers & Cutaway Assemblies (2)
|
|
131
|
+
fitEntry('fitting-pipe-hanger-clevis', 'pipe-hanger-clevis', 'Pipe Runs & Cutaway Assemblies', 'Galvanized Clevis Pipe Hanger w/ Threaded Rod', 'IPC Table 308.5'),
|
|
132
|
+
{
|
|
133
|
+
id: 'assembly-wet-wall-manifold-cutaway',
|
|
134
|
+
category: 'Pipe Runs & Cutaway Assemblies',
|
|
135
|
+
title: '2x6 Wet-Wall PEX Manifold & 3" Stack Cutaway',
|
|
136
|
+
codeRef: 'IRC R602.6 / IPC 604',
|
|
137
|
+
build: () =>
|
|
138
|
+
buildWiredManifoldCutawayCad({
|
|
139
|
+
manifoldKind: 'pex-homerun',
|
|
140
|
+
portCount: 12,
|
|
141
|
+
viewMode: 'wet-wall-cutaway',
|
|
142
|
+
}),
|
|
143
|
+
},
|
|
144
|
+
] as const
|
|
145
|
+
|
|
146
|
+
export function buildPlumbingCadPart(partId: string): Group | null {
|
|
147
|
+
const entry = PLUMBING_CAD_CATALOG.find((p) => p.id === partId)
|
|
148
|
+
return entry ? entry.build() : null
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export { buildPipeRunCad }
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 12 Clean-Room MIT Procedural 3D CAD Builders for Plumbing Mechanical Equipment.
|
|
3
|
+
* Zero React or `@pascal-app/editor` imports.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { BoxGeometry, CylinderGeometry, Group, Mesh, SphereGeometry, TorusGeometry } from 'three'
|
|
7
|
+
import type { EquipmentKind } from '../ipc/tables'
|
|
8
|
+
import { createPlumbingMaterialPool } from './materials'
|
|
9
|
+
|
|
10
|
+
export function buildEquipmentCad(params: {
|
|
11
|
+
equipmentKind: EquipmentKind
|
|
12
|
+
capacityGal?: number
|
|
13
|
+
hasDrainPan?: boolean
|
|
14
|
+
roughInOnly?: boolean
|
|
15
|
+
}): Group {
|
|
16
|
+
const { equipmentKind, capacityGal = 50, hasDrainPan = true, roughInOnly = false } = params
|
|
17
|
+
const pool = createPlumbingMaterialPool()
|
|
18
|
+
const g = new Group()
|
|
19
|
+
g.name = roughInOnly ? `plumbing-equipment-roughin-${equipmentKind}` : `plumbing-equipment-${equipmentKind}`
|
|
20
|
+
|
|
21
|
+
const add = (mesh: Mesh, x: number, y: number, z: number) => {
|
|
22
|
+
mesh.position.set(x, y, z)
|
|
23
|
+
mesh.castShadow = true
|
|
24
|
+
mesh.receiveShadow = true
|
|
25
|
+
g.add(mesh)
|
|
26
|
+
return mesh
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
switch (equipmentKind) {
|
|
30
|
+
case 'water-heater-tank-electric':
|
|
31
|
+
case 'water-heater-tank-gas':
|
|
32
|
+
case 'water-heater-hpwh': {
|
|
33
|
+
const r = capacityGal >= 70 ? 0.30 : 0.26
|
|
34
|
+
const h = equipmentKind === 'water-heater-hpwh' ? 1.68 : capacityGal >= 70 ? 1.62 : 1.48
|
|
35
|
+
const baseY = hasDrainPan ? 0.04 : 0
|
|
36
|
+
// Drain pan (IPC 504.7)
|
|
37
|
+
if (hasDrainPan) {
|
|
38
|
+
add(new Mesh(new CylinderGeometry(r + 0.045, r + 0.045, 0.05, 24), pool.galvanizedSteel), 0, 0.025, 0)
|
|
39
|
+
}
|
|
40
|
+
const tankH = equipmentKind === 'water-heater-hpwh' ? h - 0.36 : h
|
|
41
|
+
// When linked to a placed real-world catalog water heater SKU, render only dielectric top unions +
|
|
42
|
+
// drain pan + copper T&P discharge line so zero duplicate tank cylinder Z-fights with the SKU mesh.
|
|
43
|
+
if (roughInOnly) {
|
|
44
|
+
add(new Mesh(new CylinderGeometry(0.016, 0.016, 0.16, 12), pool.pexColdBlue), 0.1, baseY + h + 0.06, 0)
|
|
45
|
+
add(new Mesh(new CylinderGeometry(0.016, 0.016, 0.16, 12), pool.pexHotRed), -0.1, baseY + h + 0.06, 0)
|
|
46
|
+
add(new Mesh(new CylinderGeometry(0.014, 0.014, 0.09, 10), pool.brass), r + 0.04, baseY + tankH * 0.78, 0).rotation.z = Math.PI / 2
|
|
47
|
+
add(new Mesh(new CylinderGeometry(0.011, 0.011, tankH * 0.72, 10), pool.copper), r + 0.08, baseY + tankH * 0.42, 0)
|
|
48
|
+
break
|
|
49
|
+
}
|
|
50
|
+
// Tank cylinder seated on pan (baseY = 0.04) or directly on floor (baseY = 0)
|
|
51
|
+
const bodyMat = pool.enamelSteel
|
|
52
|
+
add(new Mesh(new CylinderGeometry(r, r, tankH, 28), bodyMat), 0, baseY + tankH / 2, 0)
|
|
53
|
+
// Blue trim ring
|
|
54
|
+
add(new Mesh(new CylinderGeometry(r + 0.004, r + 0.004, 0.08, 28), pool.enamelBlue), 0, baseY + tankH - 0.12, 0)
|
|
55
|
+
// Top hot/cold nipples
|
|
56
|
+
add(new Mesh(new CylinderGeometry(0.016, 0.016, 0.14, 12), pool.pexColdBlue), 0.1, baseY + tankH + 0.07, 0)
|
|
57
|
+
add(new Mesh(new CylinderGeometry(0.016, 0.016, 0.14, 12), pool.pexHotRed), -0.1, baseY + tankH + 0.07, 0)
|
|
58
|
+
// Side T&P relief valve + copper discharge drop
|
|
59
|
+
add(new Mesh(new CylinderGeometry(0.014, 0.014, 0.09, 10), pool.brass), r + 0.03, baseY + tankH * 0.78, 0).rotation.z = Math.PI / 2
|
|
60
|
+
add(new Mesh(new CylinderGeometry(0.011, 0.011, tankH * 0.72, 10), pool.copper), r + 0.07, baseY + tankH * 0.42, 0)
|
|
61
|
+
|
|
62
|
+
if (equipmentKind === 'water-heater-tank-gas') {
|
|
63
|
+
// Draft hood & flue pipe
|
|
64
|
+
add(new Mesh(new CylinderGeometry(0.055, 0.11, 0.14, 16), pool.galvanizedSteel), 0, baseY + tankH + 0.07, 0)
|
|
65
|
+
add(new Mesh(new CylinderGeometry(0.055, 0.055, 0.42, 16), pool.galvanizedSteel), 0, baseY + tankH + 0.34, 0)
|
|
66
|
+
// Lower gas control valve
|
|
67
|
+
add(new Mesh(new BoxGeometry(0.11, 0.11, 0.09), pool.darkRubber), 0, baseY + 0.30, r + 0.04)
|
|
68
|
+
} else if (equipmentKind === 'water-heater-hpwh') {
|
|
69
|
+
// Top compressor heat pump shroud + intake louver
|
|
70
|
+
add(new Mesh(new CylinderGeometry(r + 0.008, r + 0.008, 0.36, 28), pool.galvanizedSteel), 0, baseY + tankH + 0.18, 0)
|
|
71
|
+
add(new Mesh(new BoxGeometry(0.18, 0.10, 0.03), pool.darkRubber), 0, baseY + tankH + 0.18, r + 0.015)
|
|
72
|
+
} else {
|
|
73
|
+
// Electric junction box & element access panels
|
|
74
|
+
add(new Mesh(new BoxGeometry(0.14, 0.18, 0.03), pool.galvanizedSteel), 0, baseY + 0.38, r + 0.01)
|
|
75
|
+
add(new Mesh(new BoxGeometry(0.14, 0.18, 0.03), pool.galvanizedSteel), 0, baseY + 1.01, r + 0.01)
|
|
76
|
+
}
|
|
77
|
+
break
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
case 'water-heater-tankless-gas': {
|
|
81
|
+
// Bottom service valves (cold, hot, gas) — in roughInOnly mode render only stubs so placed SKU doesn't Z-fight
|
|
82
|
+
if (roughInOnly) {
|
|
83
|
+
add(new Mesh(new CylinderGeometry(0.014, 0.014, 0.18, 10), pool.pexColdBlue), 0.10, 0.96, 0)
|
|
84
|
+
add(new Mesh(new CylinderGeometry(0.014, 0.014, 0.18, 10), pool.pexHotRed), -0.10, 0.96, 0)
|
|
85
|
+
add(new Mesh(new CylinderGeometry(0.015, 0.015, 0.18, 10), pool.csstYellow), 0.0, 0.96, 0)
|
|
86
|
+
break
|
|
87
|
+
}
|
|
88
|
+
add(new Mesh(new BoxGeometry(0.38, 0.62, 0.26), pool.enamelSteel), 0, 1.35, 0)
|
|
89
|
+
add(new Mesh(new BoxGeometry(0.12, 0.08, 0.02), pool.darkRubber), 0, 1.35, 0.135)
|
|
90
|
+
// Top concentric vent
|
|
91
|
+
add(new Mesh(new CylinderGeometry(0.045, 0.045, 0.30, 16), pool.pvcWhite), 0, 1.81, 0)
|
|
92
|
+
// Bottom service valves (cold, hot, gas, condensate)
|
|
93
|
+
add(new Mesh(new CylinderGeometry(0.014, 0.014, 0.16, 10), pool.pexColdBlue), 0.10, 0.96, 0)
|
|
94
|
+
add(new Mesh(new CylinderGeometry(0.014, 0.014, 0.16, 10), pool.pexHotRed), -0.10, 0.96, 0)
|
|
95
|
+
add(new Mesh(new CylinderGeometry(0.015, 0.015, 0.16, 10), pool.csstYellow), 0.0, 0.96, 0)
|
|
96
|
+
break
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
case 'expansion-tank': {
|
|
100
|
+
add(new Mesh(new CylinderGeometry(0.10, 0.10, 0.24, 20), pool.enamelSteel), 0, 0, 0)
|
|
101
|
+
add(new Mesh(new SphereGeometry(0.10, 20, 14), pool.enamelSteel), 0, 0.12, 0)
|
|
102
|
+
add(new Mesh(new SphereGeometry(0.10, 20, 14), pool.enamelSteel), 0, -0.12, 0)
|
|
103
|
+
add(new Mesh(new CylinderGeometry(0.015, 0.015, 0.07, 10), pool.brass), 0, 0.23, 0)
|
|
104
|
+
break
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
case 'main-shutoff-prv': {
|
|
108
|
+
// Copper riser + full-port ball valve + bell-shaped brass PRV + gauge nipple & dial
|
|
109
|
+
add(new Mesh(new CylinderGeometry(0.016, 0.016, 0.56, 14), pool.copper), 0, 0, 0)
|
|
110
|
+
add(new Mesh(new CylinderGeometry(0.028, 0.028, 0.08, 14), pool.brass), 0, -0.14, 0)
|
|
111
|
+
add(new Mesh(new BoxGeometry(0.12, 0.015, 0.02), pool.pexColdBlue), 0.06, -0.14, 0.02)
|
|
112
|
+
// PRV bell housing
|
|
113
|
+
add(new Mesh(new CylinderGeometry(0.024, 0.042, 0.12, 16), pool.brass), 0.06, 0.04, 0).rotation.z = -Math.PI / 2
|
|
114
|
+
// Brass gauge tee nipple + pressure gauge dial
|
|
115
|
+
add(new Mesh(new CylinderGeometry(0.009, 0.009, 0.046, 12), pool.brass), 0, 0.16, 0.022).rotation.x = Math.PI / 2
|
|
116
|
+
add(new Mesh(new CylinderGeometry(0.036, 0.036, 0.024, 18), pool.chrome), 0, 0.16, 0.045).rotation.x = Math.PI / 2
|
|
117
|
+
break
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
case 'water-softener': {
|
|
121
|
+
// Resin cylinder tank + control head + square salt brine tank + connecting brine draw tube
|
|
122
|
+
add(new Mesh(new CylinderGeometry(0.14, 0.14, 1.24, 22), pool.enamelBlue), -0.22, 0.62, 0)
|
|
123
|
+
add(new Mesh(new BoxGeometry(0.18, 0.16, 0.16), pool.darkRubber), -0.22, 1.32, 0)
|
|
124
|
+
add(new Mesh(new BoxGeometry(0.38, 0.92, 0.38), pool.pvcWhite), 0.22, 0.46, 0)
|
|
125
|
+
add(new Mesh(new BoxGeometry(0.40, 0.04, 0.40), pool.darkRubber), 0.22, 0.94, 0)
|
|
126
|
+
// Brine draw line connecting control head across to brine tank lid
|
|
127
|
+
add(new Mesh(new CylinderGeometry(0.008, 0.008, 0.42, 10), pool.pexColdBlue), -0.02, 1.28, -0.04).rotation.z = Math.PI / 2
|
|
128
|
+
add(new Mesh(new CylinderGeometry(0.008, 0.008, 0.36, 10), pool.pexColdBlue), 0.18, 1.11, -0.04)
|
|
129
|
+
break
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
case 'sump-pump':
|
|
133
|
+
case 'sewage-ejector': {
|
|
134
|
+
const r = equipmentKind === 'sewage-ejector' ? 0.28 : 0.24
|
|
135
|
+
add(new Mesh(new CylinderGeometry(r, r * 0.92, 0.62, 24), pool.absBlack), 0, 0.31, 0)
|
|
136
|
+
add(new Mesh(new CylinderGeometry(r + 0.02, r + 0.02, 0.03, 24), pool.castIron), 0, 0.63, 0)
|
|
137
|
+
// Discharge PVC riser + brass check valve
|
|
138
|
+
add(new Mesh(new CylinderGeometry(0.028, 0.028, 0.65, 14), pool.pvcWhite), 0.08, 0.95, 0)
|
|
139
|
+
add(new Mesh(new CylinderGeometry(0.038, 0.038, 0.11, 14), pool.darkRubber), 0.08, 0.85, 0)
|
|
140
|
+
if (equipmentKind === 'sewage-ejector') {
|
|
141
|
+
// Dedicated 2" vent pipe on sealed sewage ejector cover
|
|
142
|
+
add(new Mesh(new CylinderGeometry(0.028, 0.028, 0.65, 14), pool.ventGreen), -0.09, 0.95, 0)
|
|
143
|
+
}
|
|
144
|
+
break
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
case 'recirc-pump': {
|
|
148
|
+
add(new Mesh(new CylinderGeometry(0.065, 0.065, 0.16, 18), pool.pexRecircOrange), 0, 0, 0).rotation.z = Math.PI / 2
|
|
149
|
+
add(new Mesh(new CylinderGeometry(0.055, 0.055, 0.09, 18), pool.brass), -0.09, 0, 0)
|
|
150
|
+
add(new Mesh(new BoxGeometry(0.08, 0.07, 0.06), pool.darkRubber), 0.02, 0.08, 0)
|
|
151
|
+
break
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
case 'gas-meter': {
|
|
155
|
+
// Utility gas meter box + dual riser pipes + regulator
|
|
156
|
+
add(new Mesh(new BoxGeometry(0.32, 0.36, 0.22), pool.galvanizedSteel), 0, 0, 0)
|
|
157
|
+
add(new Mesh(new CylinderGeometry(0.018, 0.018, 0.45, 12), pool.blackIron), -0.11, 0.32, 0)
|
|
158
|
+
add(new Mesh(new CylinderGeometry(0.018, 0.018, 0.45, 12), pool.blackIron), 0.11, 0.32, 0)
|
|
159
|
+
add(new Mesh(new TorusGeometry(0.045, 0.014, 10, 18), pool.galvanizedSteel), -0.11, 0.35, 0.03)
|
|
160
|
+
break
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
case 'backwater-valve': {
|
|
164
|
+
add(new Mesh(new CylinderGeometry(0.062, 0.062, 0.34, 18), pool.pvcWhite), 0, 0, 0).rotation.z = Math.PI / 2
|
|
165
|
+
add(new Mesh(new CylinderGeometry(0.075, 0.075, 0.14, 18), pool.pvcWhite), 0, 0.08, 0)
|
|
166
|
+
add(new Mesh(new CylinderGeometry(0.08, 0.08, 0.03, 18), pool.absBlack), 0, 0.16, 0)
|
|
167
|
+
break
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
return g
|
|
172
|
+
}
|