Elbow
Butt-welding elbow: 90° and 180° return in long (1.5D) or short (1.0D) radius, 45° long radius. Centre-to-end from ASME B16.9, machined B16.25 weld bevels or welded-on weld-neck flanges. The work point (tangent intersection) is the origin; turn sets whether end B goes up, down or sideways.
Installation
Copies piping/elbow.tsx and the shared lib/ into src/components/deck-twin/. Needs three, @react-three/fiber and @react-three/drei. See installation for the manual route.
Usage
import { Canvas } from '@react-three/fiber'
import { OrbitControls } from '@react-three/drei'
import { Stage } from './components/deck-twin/lib/stage'
import { Elbow } from './components/deck-twin/piping/elbow'
export default function Scene() {
return (
<Canvas shadows camera={{ position: [8, 5, 9], fov: 35 }}>
<Stage>
<Elbow />
</Stage>
<OrbitControls makeDefault />
</Canvas>
)
}
Props
| Prop | Type | Default | Range |
|---|---|---|---|
nps | number (NPS, in) | null | |
schedule | "10" | "20" | "40" | "STD" | "80" | "XS" | "160" | "XXS" | "10S" | "40S" | "80S" | null | |
angle | 90 | 45 | 180 | null | |
radius | "LR" | "SR" | null | |
ends | "butt-weld" | "flanged" | null | |
rating | 150 | 300 | 600 | 900 | 1500 | 2500 | null | |
turn | "up" | "down" | "side" | null | |
service | "none" | "oil" | "gas" | "multiphase" | "water" | "seawater" | "firewater" | "steam" | "air" | "nitrogen" | "chemical" | "flare" | "drain" | "fuel-gas" | "diesel" | "potable" | "cooling" | null | |
...group | position, rotation, scale… |
P&ID
On P&IDs a change of direction is just a corner in the line; elbows are only drawn on isometrics and GA drawings, as a bend or a corner with a short tick at each weld.
Take the angle and radius (LR / SR) from the isometric or the piping class, not the P&ID. Treat a P&ID corner as an elbow only when building a 3D route.
npsscheduleangleradiusendsratingserviceTypical suppliers
Weldbend. The geometry is generic and sized from public standards. It is not vendor CAD.
For agents
Machine-readable entry with props, ranges, defaults and ports:
Or fetch /r/elbow.json, or copy a ready-made instruction:
Add the Deck Twin "Elbow" component to this project. Run `npx -y https://decktwin.com/cli/deck-twin-0.2.2.tgz add elbow` (it copies the file and the shared lib into src/components/deck-twin/), then `npx -y https://decktwin.com/cli/deck-twin-0.2.2.tgz info elbow` for its props, ranges and ports. Render <Elbow /> inside a React Three Fiber <Canvas shadows>, wrapped in <Stage> from src/components/deck-twin/lib/stage. Set props from my data (metres, NPS in inches, ASME class) and leave the rest at defaults. Install three, @react-three/fiber, @react-three/drei and @types/three if they're missing. Full guide: https://decktwin.com/skill/SKILL.md