Workpiece

Workpiece

An open-source CAD kernel and desktop app, written in Rust: parametric modelling, a constraint sketcher, assemblies, ISO drawings and scripting.

Try it in your browser Get it

Early prototype: the part file format and the APIs are not stable. Free, MIT or Apache-2.0. Nothing is uploaded: files you open stay in your browser. The first start downloads the program (about 20 MB before compression).

The Workpiece app showing a cast aluminium bracket, with the list of steps that built it on the left

ISO drawings from the same script

The script that builds the part also lays out its sheet: projected and section views, dimensions with tolerances, datums, surface texture and the title block. Change a dimension and the drawing follows.

The flanged bearing housing, rendered
Flanged bearing housing, as built by its script

All examples with their drawings

Examples

11 original parts and assemblies, each written as a Python script that also draws its sheets. Click a part to open it in the web app, already built, or a sheet to see it full size; the examples page shows the sheets larger.

The web app needs a desktop browser. On this screen a part's picture opens its drawing sheet instead.

Flanged bearing housing: a shaded view of the part

Flanged bearing housing

A turned hub on a square flange: a revolved profile dimensioned by diameters about its drawn axis, counterbored holes for M8 cap screws in a circular pattern, fillets and a section through the bore.

  • part
  • revolve
  • rotation axis
  • counterbore
  • circular pattern
  • fillet
  • section
Vented sheet-metal cover: a shaded view of the part

Vented sheet-metal cover

Driven by named values you can change on the command line: a base with flanges and inward lips bent along its edges, a row of vent slots, mounting holes, and its flat pattern on a sheet of its own.

  • part
  • sheet metal
  • flange
  • flat pattern
  • linear pattern
  • parametric
Axial fan: a shaded view of the part

Axial fan

A turned hub and five twisted blades: one blade lofted from a root section to a tip section, each pitched at its own angle, and a circular feature pattern; a section shows the tip's pitch.

  • part
  • loft
  • revolve
  • circular pattern
  • section
Bearing unit (assembly): a shaded view of the part

Bearing unit (assembly)

A housing, a shaft turning in two catalogue 6204 bearings, a cover held by four catalogue M5 cap screws: joints, a part pattern, a section through the axis, a parts list and balloons.

  • assembly
  • joints
  • revolute
  • standard parts
  • part pattern
  • parts list
  • balloons
Caster (assembly): a shaded view of the part

Caster (assembly)

A shelled steel fork, a wheel of two bodies (aluminium hub, rubber tyre) each weighing by its own material, and an axle pin; the wheel turns on a revolute joint.

  • assembly
  • shell
  • multi-body
  • appearance
  • revolute
  • parts list
Butt hinge (assembly): a shaded view of the part

Butt hinge (assembly)

One brass leaf part placed twice, the second turned end for end so the knuckles interleave, a steel pin, and a revolute joint driven open to 110°; knuckles, reliefs and countersunk holes are each one feature and a pattern.

  • assembly
  • revolute
  • drive
  • linear pattern
  • countersink
  • parts list
Bench vise (assembly): a shaded view of the part

Bench vise (assembly)

A cast body and moving jaw and an M12 screw: the jaw slides on the body, the screw turns in it, and a Drive step opens the vise to a width; built open and nearly shut, its section draws the screw whole.

  • assembly
  • slider
  • revolute
  • drive
  • thread
  • section
  • parts list

What it can do

A part is a list of steps that the program applies in order. The tabs of the app group them; Ribbon.md lists per feature what is built and what is not yet.

The Modeling tab: a cast bracket with its steps listed at the left

Modelling

  • Extrude, revolve, sweep and loft; thicken; shell, draft, rib.
  • Fillet and chamfer on edges of any NURBS shape; holes to the sizes of the standards; threads.
  • Booleans on tolerant B-reps: one that cannot be done exactly is refused with a reason.
  • Change an early step and the ones after it are rebuilt.
The Annotate tab: a cast bracket with its dimensions, its H7 bore, datum A and a flatness and a parallelism tolerance frame standing on the model in 3D

Dimensions and tolerances on the model

  • Dimensions, fits and tolerances (ISO 129-1, ISO 286), datum features (ISO 5459) and geometric tolerances (ISO 1101) are placed on the model in the 3D view, as ISO 16792 shows them, in the Annotate tab or from a script (p.dimension, p.datum_feature, p.geometric_tolerance, tol= on any sketch dimension).
  • The sizes steps are held to count too: a sketch's dimensions, an extrude's distance, a hole's diameter, each with its tolerance.
  • The drawing takes them from there: one source for model and sheet. What the model says and a sheet does not show yet, the sheet offers to place.
A sketch being edited: two circles and six holes with their dimensions

Constraint sketcher

  • Lines, arcs, circles, slots, ellipses, splines, text.
  • Constraints and driving dimensions with tolerances, solved by the geometric solver; the sketch says how many degrees of freedom are left.
  • Trim, offset, mirror, patterns; project edges of the model into the sketch.
An ISO drawing sheet of a flanged housing: plan, section and pictorial views with dimensions

Drawings to ISO

  • Projected, section, detail and pictorial views; dimensions with ISO 129-1 tolerances; datums; balloons and parts lists.
  • Third-angle or first-angle projection; cosmetic threads drawn as ISO 6410 has them.
  • A drawing is a step of the part, so it follows the part. Export as PDF and DXF.
A brass butt hinge and a caster, both assemblies built in Workpiece

Assemblies

  • Insert part files, STEP files and standard parts (screws, nuts, washers, ball bearings).
  • Joints with limits and drives; gear, rack and screw mechanisms; drag parts within what the joints allow.
  • Interference, bill of materials, exploded view.
A sheet-metal cover with vent slots, beside its flat pattern drawn to size

Sheet metal

  • Flange, bend, unfold and flat pattern.
  • The flat pattern goes on a sheet of its own, dimensioned like any other view.
from workpiece import Part

p = Part()
s = p.sketch("XY")
r = s.rect("a", 0, 0, 60, 40)
s.coincident(r.points[0], s.origin)
s.distance_u(r.points[0], r.points[1], 60)
s.distance_v(r.points[1], r.points[2], 40)
p.extrude(s, 10)
p.build("plate.wpc")

One script: part, check and drawing

  • A Python script builds the part, its assembly and its ISO drawing sheets; the build reports every step, the degrees of freedom left in each sketch, lint and problems on the sheets. See Scripting.
  • All 11 examples are such scripts, rebuilt clean (every step ok, every sketch fully constrained, no drawing problem) by examples/build_all.py --check.
  • Import STEP, IGES, STL and 3MF; export STEP, IGES, STL, 3MF and drawings as PDF and DXF.
3650/3650 cases of the third-party suite brep-conformance 2.0.1 passed at 1e-7 mm, self-scored fillets 627/627 · chamfers 171/171 · booleans 1253/1253 · STEP 163/163

A kernel measured by others’ tests

  • Booleans, fillets and chamfers on general NURBS edges, shells and STEP import, checked case by case against the suite’s own expected values; the run, its date and how to repeat it are on the benchmarks page.
  • A boolean that cannot be done exactly is refused with a reason, never approximated. See Benchmarks.

Scripting

The part below is made by this script: a dimensioned disc with a bore, a bolt hole patterned six times, a rounded rim, and a drawing. Every sketch is constrained, so the dimensions are the geometry.

"""A flange: a dimensioned disc with a bore, one bolt hole patterned six times, a rounded rim."""
import math
from workpiece import Part, profile, axis

out = "flange.wpc"
p = Part(material="Steel")

# The disc with its bore: two circles on the origin, each with its diameter.
s = p.sketch("XY", show_in="top")
outer = s.circle(s.origin, 45)
bore = s.circle(s.origin, 12)
s.diameter(outer, 100)
s.diameter(bore, 30)
disc = p.extrude(s, 12, combine="NewBody")

# One bolt hole on the pitch circle, placed by its dimensions.
h = p.sketch("XY", show_in="top")
c = h.point(36, 0.5)
h.horizontal(h.origin, c)
h.distance(h.origin, c, 37.5)
hole = h.circle(c, 4)
h.diameter(hole, 9)
first = p.cut(h, through=True)

report = p.build(out)
# ...patterned six times about z, by the hole's own wall.
wall = report.faces(near=(37.5, 0, 6), where=lambda f: not f["flat"])
p.op("Pattern", along="Circle", count=6, angle=360.0, axis=axis("Z"),
     features=[{"Topology": wall[0]}])
report = p.build(out)
# The outer top rim, rounded.
rim = report.edges(where=lambda e: not e["straight"] and abs(e["middle"][2] - 12) < 1e-6
                   and abs(math.hypot(*e["middle"][:2]) - 50) < 1e-6)
p.fillet(rim, 2)
# A sheet with the usual views and every dimension of the sketches on it.
p.drawing(scale=(1, 2))
report = p.build(out, render=True)
print("volume", report.volume)  # mm^3
The flange the script makes, in the app
The part
The drawing the script adds: the plan and the side view of the flange with its diameters, bolt circle radius and thickness
Its drawing

The script is agent/examples/flange.py without its checkout-only path line. The scripting chapter has the rest; the examples above are longer scripts.

# both coming with the first release
pip install workpiece
python -m workpiece flange.wpc   # opens the part in the desktop app

Benchmarks

Measured with suites other people wrote or with public data. Every Workpiece number below is self-scored: run by Workpiece’s authors, not by the suites’ maintainers. The table is drawn from results.json when the site is built.

3650/3650 brep-conformance cases at 1e-7 mm: booleans, constructions, queries, modify, fillets, chamfers, STEP and parts
1902/1917 cases of the boolean bench: 12 refused with a reason, 3 wrong, 0 crashed
105/108 step-conformance cells: the STEP importer, scored by Workpiece’s port of the rule

brep-conformance, by category

  • booleans1253/1253
  • constructions448/448
  • queries320/320
  • modify612/612
  • fillets627/627
  • chamfers171/171
  • step163/163
  • parts56/56

The boolean bench, by group

  • Hand-made cases with closed-form answers618/618
  • brep-bench's cases (19 categories)236/236
  • Parts of public STEP files: halved, drilled, combined280/280
  • 675 public STEP files imported as solids663/675 (12 refused)
  • step-conformance cells (below)105/108 (3 wrong)

brep-conformance beside other kernels

Cases passed at 1e-7 mm in brep-conformance, suite 2.0.1, best first (by the share of cases passed, ties by the number passed). The other rows are the maintainers' reports of 2026-11-23 (all 3650 cases, each run by them on one machine); Workpiece's row was run here, self-scored, on the same 3650 cases, the NIST files included.

KernelVersionLicencebooleans
1253
constructions
448
queries
320
modify
612
fillets
627
chamfers
171
step
163
parts
56
all
3650
springrep2.1.0MIT1253448320612627171163563650
Workpiece
self-scored, run here 2026-11-26, 3650 cases
0.1.0MIT OR Apache-2.01253448320612627171163563650
cadrs0.2.9MIT OR Apache-2.01253448320612627171161563648
kentron0.19.3AGPL-3.0-or-later AND BSD-3-Clause AND MIT1183410316535582171148553400
opencascade8.0.1.1.0LGPL-2.1-only WITH OCCT-exception-1.01192279270421418171142402933
next.BREP0.24.0LicenseRef-Autodrop3d99530060344343129140342345
arris0.10.0MIT OR Apache-2.0962223213184328115128292182
cad-kernel0.17.0MIT OR Apache-2.011651945334722000302009
solidcore1.0.1Apache-2.0958267605435900291727
anvil-brep0.2.0MIT OR Apache-2.0811128018411896091346

step-conformance beside other readers

step-conformance: 27 STEP parts read and meshed at four tolerances, 108 cells; cells passed. Workpiece's row was run here on 2026-11-25; the other readers were run by the benchmark's maintainers on 2026-11-22.

ReaderVersionshop parts
28
freeform panel
4
parts of known shape
76
all
108
Scored by
Workpiece450425c + uncommitted changes28176105Workpiece's port of the benchmark's rule (self); not the benchmark's own scorer
ogeom0.11.528376107benchmark maintainers
opencascadeopencascade-rs 0.3.0 with camcraft's patches, OCCT 7.8.128176105benchmark maintainers
solidcraftc95c2bef428176105benchmark maintainers
solidcraft, through cadmpegc95c2bef4, cadmpeg 0.6.1228176105benchmark maintainers
truck, master88ed0052306891benchmark maintainers
truck, releasedtruck-stepio 0.3.0, truck-meshalgo 0.4.02106081benchmark maintainers
brepkit4.1.492003050benchmark maintainers

What the data says, and where it stops

  • On brep-conformance, springrep also passes every case (the maintainers’ run of all 3650, and reproduced here on the 3617 cases without NIST’s files), and cadrs passes 3648 of 3650; the other kernels in the maintainers’ runs pass fewer (from 1346 of 3650 up). On step-conformance, Workpiece is level with 3 published readers at 105 cells, and ogeom passes 2 more.
  • Speed: run back to back in the same sandbox on the 3617 cases without NIST’s files (2026-11-25), springrep’s median per case was 11.8 ms, lower than Workpiece’s; neither kernel is faster in every category (the benchmarks page has the medians).
  • Every brep-conformance case was run, the 33 that read NIST’s STEP files included; Workpiece’s adapter does not answer the functions inertia, betti, section_area and mesh, and no case was counted as unsupported for that.
  • The boolean bench is Workpiece’s own suite, built on public data and brep-bench’s cases; the 12 refused STEP files are listed in the method page. Booleans that cannot be done exactly are refused with a reason rather than approximated.
  • On step-conformance’s shop parts the reference mesh is Workpiece’s own, so those cells are a weaker check than the benchmark’s. The three cells Workpiece fails are the freeform panel.
  • The rows say what each kernel passed in the suite’s run, not what it can do outside the suite, and none of the benchmarks measures the sketcher, assemblies, drawings or the app.

Method, machine, versions, sources, dates and every command to reproduce the numbers: the benchmarks page of the documentation (source). Last updated 2026-11-26.

Get it

There is no release yet; these buttons will point at the files of the first one. Until then, build from source (below) or try it in the browser. Release builds are made for all three systems; the authors have so far run the app on Linux only. An unsigned build may be stopped by Windows SmartScreen (More info, then Run anyway) or by macOS (right-click, Open).

With pip coming with the first release

pip install workpiece
python -m workpiece          # the desktop app

The wheel carries the workpiece command line and the desktop app; the import name is workpiece.

From source

git clone https://github.com/geop-cad/Workpiece.git
cd Workpiece
cargo run --release -p workpiece-app

Needs Rust 1.95 or newer; the install page lists the system libraries on Linux.

Or try it in your browser

Open in the app PDF
The drawing sheet