Skip to main content

cadbuildr-piping

Summary

Process piping library: ASME/EN/ASTM pipe, B16.9 fittings, B16.5 flanges with gaskets and studs, B16.11 forged fittings, B16.10 valve envelopes and polyline routing, all hollow and joined by connect.

Contents

pip install cadbuildr-piping, import cadbuildr.piping, library id piping. Every part is real hollow geometry with the wall of its schedule, built from cited dimension tables, and every end carries a PipeEnd interface so assembly.connect puts pipe, fittings, flanges and valves together and refuses ends that do not join.

  • Pipe and tube (pipe.py): Pipe (ASME B36.10M / B36.19M, NPS 1/8-24, schedules 5S, 10S, 10, 40, 80, 160, XXS, STD, XS, 40S, 80S), ENPipe (EN 10220 / ISO 4200 series 1, DN 10-600, preferred walls), CopperTube (ASTM B88 K / L / M), PVCPipe (ASTM D1785 sch 40 / 80). Ends: BW (ASME B16.25 37.5 deg bevel, 1.6 mm land, compound bevel over 22 mm), PE (plain) or THD (ASME B1.20.1 NPT, cosmetic taper at the major diameter).
  • ASME B16.9 butt-weld fittings (fittings_bw.py): Elbow LR / SR 90 and LR 45 (B16.9 has no SR 45: NonStandardFitting), Tee equal and reducing (B16.9 outlet table), Reducer concentric and eccentric, Cap (2:1 head), StubEnd (lap joint). Schedule wall and bevels on every weld end.
  • ASME B16.5 flanges (flanges.py), classes 150 / 300 / 600: WeldNeckFlange, SlipOnFlange, BlindFlange, LapJointFlange; raised face, hub, bolt circle and holes; FlatRingGasket (B16.21), SpiralWoundGasket (B16.20); StudBolt + HeavyHexNut (ASME B18.2.2, UNC / 8UN); bolt_up() and FlangedJoint (studs close loops, so check() proves the grip).
  • ASME B16.11 forged fittings (forged.py), class 3000: socket-weld and threaded elbows (90 / 45), tees, couplings; MSS SP-83 ThreadedUnion; NPT bores at the correct diameters and 1:16 taper.
  • Valve envelopes (valves.py): GateValveEnvelope, GlobeValveEnvelope, BallValveEnvelope, CheckValveEnvelope; face-to-face per ASME B16.10, real B16.5 flanged ends, keep-out body and handwheel / lever clearance (Estimated, listed on each part).
  • Routing (routing.py): PipeRun(points, nps, schedule) pipes a polyline, picks elbows at 90 / 45 corners (NonStandardAngle otherwise), clocks them with connect(..., roll=), terminates with flanges or caps, gives cut_list() and bom(), and checks weld spacing and support spans (ASME B31.1 Table 121.5 / MSS SP-58).
  • Demos (demos.py): WaterLoop (a closed loop with a bolted-in valve: three loop closures check() verifies) and PumpSkidManifold.
from cadbuildr.foundation import show
from cadbuildr.piping import PipeRun

run = PipeRun([(0, 0, 0), (1000, 0, 0), (1000, 800, 0)], nps="2", schedule="40",
              start="flange", end="cap", supports=[1200])
print(run.cut_list())
assert [i for i in run.check() if i["severity"] == "error"] == []
show(run)
python -m cadbuildr.foundation.library manifest cadbuildr.piping
echo '{"item": "piping:Elbow", "inputs": {"nps": "4", "radius": "SR"}}' | python -m cadbuildr.foundation.library eval

Agent recipes: SKILL.md (mirror: threepointo/skills/libraries/cadbuildr_piping.md). Content plan: docs/specs/plan_library-content_00003/packages/piping.md.

Remaining simplifications

What Why What would fix it
NPT threads are cosmetic tapers (no helix) foundation's Thread op is cylindrical only a tapered-thread kernel op
B16.9 tee crotch = intersecting cylinders B16.9 fixes C, M, walls only; the contour is the maker's a fillet on the intersection edge (edge finder on the crotch)
Weld-neck hub is a straight taper; no hub fillet B16.5 fixes X, A, Y and a max slope same as above
Reducer straight ends 0.15 H (Estimated) B16.9 fixes only H maker data
B16.11 bodies keep the band / socket-wall OD to the centre forging shape is the maker's maker data
Valve bodies and operators are envelopes maker-specific vendor STEP (not redistributed)
Butt welds have zero root gap by default the gap is a WPS choice connect(..., gap=1.6) already takes it

Tags

cad, python, library, piping, asme, b16-5, b16-9, b16-11, flanges, fittings, valves, routing

Status

yellow

Guidelines

  • Every dimension comes from a tables/ module that cites its standard and source.
  • Values a standard does not fix go in the part's estimated list and its BOM.
  • Place parts with ground / connect on their interfaces, never by transforms.
  • Fail loudly with named errors (UnknownSize, NonStandardFitting, RoutingError...).
  • Keep a closed-form volume on every part so mass and tests need no kernel.
  • Depend on cadbuildr-foundation only, so the folder can move to its own repo.

Dependencies

Upstream

  • (none)

Downstream

  • (none)

Metadata

Release files for cadbuildr-piping 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cadbuildr-piping 0.1.0
File Size Uploaded Provenance Actions
cadbuildr_piping-0.1.0.tar.gz 66.6 kB Without provenance Details for cadbuildr_piping-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cadbuildr-piping 0.1.0
File Interpreter ABI Platform Actions
cadbuildr_piping-0.1.0-py3-none-any.whl Python 3 none any Details for cadbuildr_piping-0.1.0-py3-none-any.whl

Total release size: 134.5 kB

Release files / cadbuildr_piping-0.1.0.tar.gz

Download URL cadbuildr_piping-0.1.0.tar.gz
Size 66.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0601520d34a9bd5bc286d2c82b89951c1c5bc9c25caea9360b78c53a26417ed1
BLAKE2b-256 checksum
How to use checksums
c5a641931d4f07ba97aa0a3a50ecccdcb263f95527a7981025139a9adb22e233
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.19

Release files / cadbuildr_piping-0.1.0-py3-none-any.whl

Download URL cadbuildr_piping-0.1.0-py3-none-any.whl
Size 67.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48f7130728bb3828cdf24e06cc81cd9f05ab9c683543991c22abca50a1d75875
BLAKE2b-256 checksum
How to use checksums
f7cff3be769a64a99466f508f92f9e66f21c8f5b53abd45d6b2dc40a4d7d56b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.19

Security for cadbuildr-piping 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page