L2 · DS-110

Capstone: Design, Simulate, Validate & Optimize a Device

Deliver a complete, multi-feature parametric part to an exact spec: a mounting bracket = base plate + cylindrical boss + through-hole. Build it in real build123d on the OpenCascade kernel, then validate it against the spec by reading its bounding box (60 x 40 x 20 mm) and its volume (~20607.4 mm^3). Geometry valid, spec compliant within tolerance.

01
Challenge

Try this first — before any explanation.

A near-empty CAD Bench: one build123d cell that runs but ships the WRONG part. The starter builds a plate and a stubby boss but NO hole, and the boss is too short, so the part's bounding box is 60 x 40 x 14 and its volume is far too high (no bore removed). It renders in the 3D viewer and defines result, so it is a real, gradable artifact -- it just fails the spec. This is the productive-failure baseline: a part that builds and reports a failing number teaches more than a blank editor. Your job is to bring it to spec: raise the boss so the top sits at Z=16 (overall height 20 mm), and drill the through-hole that removes material from the whole stack. Meeting the exact envelope AND the exact volume is the mastery demonstration -- a single dimension right is not enough; the whole spec is the bar.

The Bench

Real build123d on the OpenCascade kernel (Pyodide + OCP.wasm), rendered live in the 3D viewer. Your code must define `result` as a build123d solid. The autograder reads `result.bounding_box().size` and `result.volume` and compares to the bracket spec: envelope 60 x 40 x 20 mm and volume 20607.4 mm^3. The starter builds and renders, but it ships the WRONG part -- the boss is too short and there is no through-hole -- so it FAILS until you bring it to spec. Fix the boss height/placement so the overall Z is 20, and add the boolean cut for the bore.

PARAMETRIC CAD

Capstone: Design, Simulate, Validate & Optimize a Device

Real build123d on the OpenCascade kernel (Pyodide + OCP.wasm), rendered live in the 3D viewer. Your code must define `result` as a build123d solid. The autograder reads `result.bounding_box().size` and `result.volume` and compares to the bracket spec: envelope 60 x 40 x 20 mm and volume 20607.4 mm^3. The starter builds and renders, but it ships the WRONG part -- the boss is too short and there is no through-hole -- so it FAILS until you bring it to spec. Fix the boss height/placement so the overall Z is 20, and add the boolean cut for the bore.

02
Model

The idea, built visually.

A primitive is easy. A real part is a conversation between features. Watch this bracket. The plate is the floor -- sixty by forty, eight thick. The boss is a tower rising off it, and here is the first lesson: the boss does not float. Its base must sit exactly on the plate's top face, or the solid has a seam, a gap, a lie. So you place it deliberately -- base at z equals four, where the plate ends. Now the hole. A hole is not a thing you add; it is material you take away. You build a cylinder where the bore should be, then subtract it -- and it must pierce the entire stack, plate and boss together, or you are left with a blind pocket pretending to be a through-hole. Three features, one solid. And the only way to know you got it right is to measure the result the way a machinist would: the bounding box -- the smallest crate it ships in -- and the volume -- how much metal it actually is. Match both numbers and the part is real. (2:30 target, ElevenLabs warm-confident; frames the build, shows the reasoning, never hands over the final code.)

▣ Stage animation: Cold open: three faint ghost-features drift in -- a flat plate, a cylindrical tower, a drill bit -- orbiting a word that resolves: PART. The plate draws itself first, centered on the origin, a thin dashed box labelling 60 x 40 x 8. The boss descends and snaps onto the plate's top face; a small teal marker pins z=4 (base) and z=16 (top), and a side ruler ticks the overall height climbing 8 -> 20. Then the bore: a translucent cylinder lowers through the whole stack, glows red, and is subtracted -- a clean round tunnel opens, plate-through-boss, with pi*r^2*h annotated as the removed volume. The finished bracket rotates once. Two HUD readouts lock in: BBOX 60 x 40 x 20 and VOLUME 20607.4, each flashing a PASS chip as it matches the dashed spec line. Signature dark canvas, blue-led, IBM Plex Mono numerals; the OpenCascade kernel badge ticks 'solid: watertight'.

03
Guided practice

Build it up, step by step.

Algebra-mode build123d, real OpenCascade kernel. Build the bracket in three deliberate steps. STEP 1 -- base plate: plate = Box(60, 40, 8). Box is centered at the origin, so it occupies z in [-4, +4]; its top face is at z = +4. STEP 2 -- boss on the plate: a Cylinder(radius=8, height=12) is also centered at the origin, so to seat its base on the plate top you must lift it by half-the-plate plus half-the-boss: place its center at z = 4 + 6 = 10, i.e. boss = Pos(0, 0, 10) * Cylinder(radius=8, height=12). Now the boss spans z in [4, 16] -- base flush on the plate, top at z = 16, giving overall height 20. STEP 3 -- through-hole: build the bore as a cylinder that spans the WHOLE solid (z in [-4, 16], so height 20, center at z = 6) and SUBTRACT it: hole = Pos(0, 0, 6) * Cylinder(radius=4, height=20); result = plate + boss - hole. The - is a real boolean cut on the kernel. Validate by hand the way the autograder will: bbox = (60, 40, 20); volume = 60408 (plate) + pi8^212 (boss) - pi4^220 (bore) = 19200 + 2412.74 - 1005.31 = 20607.43 mm^3. If your boss is too short the Z envelope and the volume both miss; if you forget the cut the volume runs ~1005 mm^3 too high.

04
Feedback

How the Bench grades your run.

PASS WHEN Spec met on the real kernel. The bounding box reads 60 x 40 x 20 mm (within 0.1) -- the boss now seats flush on the plate top (z=4) and its top hits z=16, giving the 20 mm envelope -- and the volume reads ~20607.4 mm^3 (within 5), which only holds if the through-hole actually pierced plate AND boss: plate 19200 + boss 2412.74 - bore 1005.31. Three features, one watertight solid, both measurements matching. That is a complete part delivered to spec.

  • Bounding box Z is 14, not 20. The boss is too short / mis-placed, so the part tops out at z=10 instead of z=16. Set the boss to Cylinder(radius=8, height=12) and place it with Pos(0,0,10) so its base sits on the plate top (z=4) and its top reaches z=16.
  • Volume is ~1005 mm^3 too high -- about pi*4^2*20. You never cut the through-hole. Build hole = Pos(0,0,6) * Cylinder(radius=4, height=20) and subtract it: result = plate + boss - hole.
  • Volume is low and the bore looks blind. Your hole cylinder does not span the whole stack (z in [-4, 16]). Give it height 20 centered at z=6 so it pierces both the plate and the boss as a true through-hole.
  • Bounding box X or Y is off. The plate must be Box(60, 40, 8) -- 60 along X, 40 along Y. A swapped or resized plate changes the envelope; the boss and hole stay centered on the origin.
  • result is not a build123d solid (or is undefined). Keep the booleans on the kernel: result = plate + boss - hole, where each part is a Box/Cylinder. The grader calls result.bounding_box().size and result.volume.
05
Retrieve & space

Bring back what you've already mastered.

  • (boss placement) A Cylinder(radius=8, height=12) is centered on the origin. To seat its base flush on a plate whose top face is at z=4, what Pos do you wrap it in, and why that z value? Answer: Pos(0,0,10) -- center must be plate-top (4) plus half the boss height (6).
  • (boolean cut) Which build123d expression turns a solid plus a positioned cylinder into a part with a through-hole, and what does the cylinder's height have to cover? Answer: result = plate + boss - hole, with the hole cylinder spanning the entire solid (z in [-4, 16], height 20) so the bore is through, not blind.
  • (measure to validate) The grader reads two properties off `result` to check the part against spec. Name them and the spec values for this bracket. Answer: result.bounding_box().size = (60, 40, 20) mm and result.volume ~= 20607.4 mm^3.
06
Mastery gate

What you must demonstrate to advance.

Terminal capstone of the Design & Simulation course. To complete it, deliver a single build123d part that passes both checks at once on the real OpenCascade kernel: the bounding box equals (60, 40, 20) mm within 0.1, AND the volume equals 20607.4 mm^3 within 5. Passing both -- not just one -- demonstrates the L2 competency: read a multi-feature spec, place features deliberately (boss seated on the plate top, bore piercing the whole stack), execute real boolean operations, and validate the finished solid by measuring its envelope and its volume the way a machinist would. A part that nails the bounding box but botches the volume (missing or blind hole) does NOT ship -- the whole spec is the bar.

07
Project

How this feeds your build.

The deliverable is a portfolio-ready parametric part: the mounting bracket as a single runnable build123d program defining result, with the three features (plate, boss, through-hole) built and combined by real boolean operations on the OpenCascade kernel, a spec card stating the target envelope (60 x 40 x 20 mm) and volume (20607.4 mm^3), and the grader's matched readout proving both. Because the model is parametric, it carries forward: change plate dimensions, boss radius, or bore size and the same measure-against-spec loop re-validates it. The watertight solid you measured here is the body the next course assembles, joints, and drops into physics -- the part you designed becomes the part the rest of the curriculum animates.