Generate vendor-ready tube laser cut lists (STEP) and sheet panel DXFs for welded square-tube boxes
Project description
weldbox
Vendor-ready tube-laser cut lists for jigless welded frames — STEP + DXF from a YAML spec.
Enclosure with riveted siding (full_height_posts) |
Bench frame (top_bottom_frames) |
|---|---|
Generate laser tube cut lists for welded square-tube boxes and machine bases. From a single YAML spec, weldbox produces:
parts/*.step— one STEP file per unique tube part (deduplicated with quantities), ready to upload to a tube laser service (RMFG, OshCut, Fabworks)panels/*.dxf— flat patterns for riveted sheet-metal siding, with rivet holes that match the holes pre-cut in the tubesassembly.step— the full assembly for visual review (open in FreeCAD)cutlist.md/cutlist.csv— the manifest with lengths and quantities
Frames are self-fixturing: tee joints get through-wall tab-and-slot features (slip fit +0.25mm, dog-bone corner reliefs per vendor best practice) so parts interlock at 90° for tack welding without jigs.
Read the functionality deep dive → — topologies, blocking primitives, the tab/slot system, part-count consolidation, siding, shipping checks, and the full spec reference.
Quick start
uv sync
# browse a vendor's tube catalog
uv run weldbox catalog list --vendor rmfg --shape square
# check the cut list without generating CAD (fast)
uv run weldbox generate examples/winding_machine_cell.yaml --dry-run
# full generation
uv run weldbox generate examples/winding_machine_cell.yaml -o out
open out/winding-machine-cell/assembly.step # opens in FreeCAD
# author a new spec interactively
uv run weldbox wizard
# order a cheap 4-tube test coupon before committing to a full build:
# verifies the tab/slot slip fit on your actual material and vendor
uv run weldbox coupon --size 1.5in --wall 0.120in -o out
Test coupons
weldbox coupon generates a small (100mm cube) 4-tube assembly — a post,
two rails into it at a corner, and a support teed into a rail — that
exercises every joint feature weldbox cuts: end tabs, closed through-wall
slots, the open hook-in corner notches, and dog-bone reliefs. Order one
from your vendor in your material first, and check the fit-up before
spending on a full frame. Bracket the slip fit by rerunning with different
clearances:
uv run weldbox coupon --slot-clearance 0.15mm --name coupon-tight -o out
uv run weldbox coupon --slot-clearance 0.25mm --name coupon-nominal -o out
uv run weldbox coupon --slot-clearance 0.40mm --name coupon-loose -o out
The spec file
The YAML spec is the source of truth (the wizard just writes one). Lengths
accept unit suffixes (2000mm, 1.5in, 0.038", 1/4in); bare numbers are
millimetres. See examples/winding_machine_cell.yaml for a complete example:
name: Winding Machine Cell
vendor: rmfg
material: {shape: square, size: [1.5in], wall: 0.120in, family: A500}
exterior: {height: 2000mm, width: 1000mm, depth: 800mm}
topology: full_height_posts
blocking:
- type: level # horizontal frame; top surface at `height`
name: work-surface
height: 1000mm
cross_members: {count: 3, axis: depth}
- type: supports # verticals between two layers, at rail midpoints
between: [base, work-surface]
- type: spanner # single member across a face
face: top
axis: width
siding:
attachment: {method: rivet, rivet: 0.25in, spacing: 100mm}
panels:
- {faces: [left, right, back], material: {alloy: "304", thickness: 0.038"}}
quantity: 5
Conventions
- Box coordinates: X = width, Y = depth, Z = height; the exterior dimensions are outer envelope dimensions.
full_height_posts: 4 posts run full height; all rails butt between posts.levelheights place the level's top surface at the given height (it is a work surface); useheight_ref: centerline|bottom_faceto override.- Rivet holes: rivet diameter + 0.15mm clearance, evenly pitched at
spacing, on every member whose outer face lies on a sided box face. Panel DXF holes are derived from the same list, so they always line up. - All joints get tab/slot by default, including box corners — corner slots
that land flush with a post end become open hook-in notches. Disable with
joints: {corner_tabs: false}.joints.weld_gapshortens butting ends. - Sheet panels get a
siding.corner_radius(default 5mm) applied to the DXF outline and the assembly solids; panels carry their rivet holes in 3D. - Same-size panels consolidate into one flat part (vendors price multiples
cheaper): a sheet with through-holes can be flipped or rotated 180 in
plane, so left/right, front/back, and top/bottom pairs share one DXF
(e.g.
left-right.dxf, qty 2). When hole patterns differ, the union is cut into both so the blank stays reversible; conflicting patterns stay separate parts. - In the assembly STEP, members are colored by role (posts slate, rails gray, level rails teal, crosses orange, supports green, spanners purple) and panels are translucent. The assembly is written as flat named products (one per member/panel) with colors on every face, which FreeCAD imports as individually selectable/hideable colored objects regardless of its STEP import preferences.
consolidate: true(default) adds sacrificial slots/holes so same-length members collapse into one part number — the example box goes from 13 unique parts to 3. Setconsolidate: falseif you don't want unused cuts on visible faces.
Vendors
rmfg is fully encoded (from docs/samples/rmfg/material_list.md); oshcut
and fabtech are stubs awaiting material lists. Vendor shipping rules
(RMFG's LTL freight thresholds, see docs/samples/rmfg/shipping.md) drive
an order-level estimate: the generator weighs the cut list analytically and
warns — in the console and on cutlist.md — when a part dimension or the
order weight will trigger freight, with the specific reasons and the flat
surcharge. Vendor catalogs live in
src/weldbox/vendors/data/*.yaml — dimensions in inches as published, with
corner radius falling back to 2 x wall where unpublished.
Development
uv run pytest -m "not slow" # fast tests: frame math, features, dedupe (<1s)
uv run pytest -m slow # geometry tests (build123d/OpenCascade)
uv run pytest # everything
Pipeline: spec.py (YAML schema) → frame.py/blocking.py (member/joint
math, no CAD) → features.py (tab/slot/hole placement, no CAD) →
dedupe.py (symmetry-aware part grouping) → geometry/ (build123d solids,
STEP) + panels/ (DXF) → manifest.py.
All dimension and placement math is CAD-free and covered by fast tests; geometry tests verify solids against analytic volumes and RMFG's published stock STEP files, and assert zero interference at assembled joints.
License and attribution
weldbox is released under the MIT License.
The RMFG reference data in docs/samples/rmfg/ (tube profile
specifications, stock STEP/DXF geometry, and shipping thresholds) is
published by RMFG as design-against reference material for their laser tube
cutting service: https://www.rmfg.com/docs/services/laser-tube-cutting.
It is included here for interoperability and remains theirs; weldbox is not
affiliated with or endorsed by RMFG.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file weldbox-0.2.1.tar.gz.
File metadata
- Download URL: weldbox-0.2.1.tar.gz
- Upload date:
- Size: 626.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5bcc2186a0ae1d38364265add25e08e32d72b30e6a1b1821854876890dafea9d
|
|
| MD5 |
6752c5fb0b06324ef6a1638adfd8b725
|
|
| BLAKE2b-256 |
79f3bdabd14121bdd268dc33655348abfe041cf26de4c3dc436ab815fe2cfb14
|
Provenance
The following attestation bundles were made for weldbox-0.2.1.tar.gz:
Publisher:
publish.yml on Gwaihir-Robotics/weldbox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
weldbox-0.2.1.tar.gz -
Subject digest:
5bcc2186a0ae1d38364265add25e08e32d72b30e6a1b1821854876890dafea9d - Sigstore transparency entry: 2088636915
- Sigstore integration time:
-
Permalink:
Gwaihir-Robotics/weldbox@2acfbd9ed678d82302fe12476a2cdb521e7b05fd -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/Gwaihir-Robotics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2acfbd9ed678d82302fe12476a2cdb521e7b05fd -
Trigger Event:
release
-
Statement type:
File details
Details for the file weldbox-0.2.1-py3-none-any.whl.
File metadata
- Download URL: weldbox-0.2.1-py3-none-any.whl
- Upload date:
- Size: 50.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8ec0976bab154b0fba29f027fd374814fb37c4c6740535a77dab3050019fd7d
|
|
| MD5 |
3ca04999c5afbb129e804f83e33ca2db
|
|
| BLAKE2b-256 |
1f56776287d14250ea1cf8fb379542c474e5d53af55c9f7405673eeade1cedaf
|
Provenance
The following attestation bundles were made for weldbox-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on Gwaihir-Robotics/weldbox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
weldbox-0.2.1-py3-none-any.whl -
Subject digest:
f8ec0976bab154b0fba29f027fd374814fb37c4c6740535a77dab3050019fd7d - Sigstore transparency entry: 2088637321
- Sigstore integration time:
-
Permalink:
Gwaihir-Robotics/weldbox@2acfbd9ed678d82302fe12476a2cdb521e7b05fd -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/Gwaihir-Robotics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2acfbd9ed678d82302fe12476a2cdb521e7b05fd -
Trigger Event:
release
-
Statement type: