Bailey Military InstitutePhysical AI
EducationResearchEntrepreneurshipIntelligence
About ▾
AboutTeamCareers
Support BMI ↗
Design and Simulation of Devices
PARAMETRIC CAD

Locating Parts in Space

Position parts in a shared coordinate frame with Pos (and Rot when needed) so the combined assembly fills an exact envelope - placing one solid on top of another and grading the bounding box of the fused part within tolerance.

01Challenge

The starter runs and renders: a 60 x 40 x 10 mm base plate, with a Ø10 x 30 mm pin meant to STAND on top of it. But the pin spawned centered on the origin - so it is buried half-into the plate instead of resting on top, and the combined part is too short. Hit Run: the autograder reports the assembly's bounding box as 60 x 40 x 30 mm, but the target envelope is 60 x 40 x 40 mm. You have not been taught Pos yet. Try anyway: the plate top is at z=5 and the pin is 30 tall - reason about the z offset that lifts the pin's base onto the plate. Most first attempts get X and Y right and Z wrong (pin floats above the plate, or sinks into it). That gap is the lesson. Infinite deterministic retries - guessing is free.

02Model

You just placed a pin and it sank into the plate. Before we fix it, one question: where IS this pin? A part does not have a position - it has a position relative to a FRAME. The world has a frame; every solid you make is born centered on its own. 'Place the pin' really means: how do I move the pin's frame inside the world's frame so the two parts meet where I intend? In build123d the move is Pos - three numbers, a translation vector. Pos(20, 0, 0) slides the pin's frame twenty in x. The subtle one is z: a Cylinder of height 30 is born centered on z=0, so half of it lives below z=0. The plate top is at z=5. To rest the pin's BASE on that face, you must lift its center to z = 5 + 15 = 20 - half the height up from the plate top. Rot is the other half of placement - it turns a frame about an axis - but our pin spawned already vertical along z, so we rotate by nothing. The discipline: apply only the transform the mismatch demands. Then the test is not a feeling, it is a measurement: the bounding box of the fused part. Get the placement right and the envelope is exactly 60 by 40 by 40.

XY part Pos(x, y)
Place parts by pose in a shared frame.
03Guided practice

Step A (worked, full scaffold): read a solved PARALLEL example - a Ø8 x 20 post standing on a 50 x 30 x 6 plate. plate = Box(50, 30, 6) spans z[-3, 3], so its top face is z=3. post = Cylinder(radius=4, height=20) is born centered, spanning z[-10, 10]; to rest its base on z=3, lift its center to 3 + 10 = 13. result = plate + Pos(0, 0, 13) * post. Callout: Pos(dx,dy,dz) translates a solid by a world vector; the '+' fuses the two solids into one Part whose bounding_box() the grader reads. The z term = (plate top) + (half the post height) lands the base flush. Step B (fill the blank): in the starter the structure is pre-filled - result = plate + Pos(20, 0, __) * pin. You supply the one number that lifts the Ø10 x 30 pin's base onto the plate top (z=5). Hints, on request only: (1) the pin's height is 30, so its center sits 15 above its base; (2) the plate top is z=5, so the pin center must be at 5 + 15; (3) after two failed submits, a readout shows the current bbox z beside the target 40. Expected: Pos(20, 0, 20). Step C (independent, no scaffold): a variant where the pin is born LYING along +X (use Box or a rotated cylinder). You must compose Rot THEN Pos and get the order right: Rot(0, 90, 0) to stand it up, then Pos to lift it onto the plate. If you Pos-then-Rot and it swings away: Rot turns the part about the world origin, so rotating after translating sweeps the pin off the plate - stand it up first, then move it.

04Feedback

PASS WHEN PASS: the fused part's bounding box is 60 x 40 x 40 mm (within 0.1 mm) and its volume is 26356 mm³ - the pin stands flush on the plate top, concentric placement correct, envelope matched.

  • FAIL: bbox Z = 30 mm but the target is 40. The pin is buried in the plate (center at z=0). Lift it with Pos: a 30 mm pin needs its center at 5 + 15 = 20 so its base rests on the plate top.
  • FAIL: bbox Z = 50 mm, 10 mm too tall. The pin floats above the plate - its base is at z=15, not z=5. Reduce the Pos z to 20 so the base sits ON the top face.
  • FAIL: volume = 24000 mm³, too low. The pin sinks into the plate, so the overlap is removed from the fused solid. Lift the pin base exactly to the plate top (z=5) so the two solids only touch.
  • FAIL: bbox X = 65 mm, not 60. Your Pos moved the pin past the plate edge. Keep the pin's footprint within the plate; X is set by the plate, so the pin should not stick out.
  • FAIL: bbox Z correct but X/Y swapped (40 x 60). You rotated the plate. The plate is already aligned - apply Pos to the PIN only, no Rot.
05Retrieve & space
  • (build123d primitives) Box(L,W,H) and Cylinder(radius,height) are both born CENTERED on the origin. In one line, write the z offset that puts a Cylinder(radius=3, height=24)'s base on a face at z=8. (Answer: Pos z = 8 + 12 = 20.)
  • (Pos vs Rot) State which transform each job needs: (a) slide a part 15 mm in +y; (b) stand a part that spawned along +X up onto +Z. (Answer: (a) Pos(0,15,0); (b) Rot(0,90,0).)
  • (boolean fuse) The '+' operator fuses two solids into one Part; '-' cuts. Given plate and pin, write the result that fuses them, then the one-line change that instead drills the pin's shape as a through-hole. (Fuse: plate + pin. Cut: plate - pin.)
06Mastery & project

Submit a fused part whose bounding box is 60 x 40 x 40 mm (within 0.1 mm) and whose volume is 26356 mm³ (within 1 mm³) - proving the pin is placed concentric in X/Y and flush on the plate top in Z. Then pass the variant where the pin spawns lying down and you must Rot-then-Pos. Passing both proves you can read a target envelope, reduce it to the minimal Pos/Rot transform, and order composed transforms correctly. Only then does 3.2 unlock.

This lesson produces the placement discipline every later module reuses: a part that was never correctly posed in the shared frame can never be correctly jointed or simulated. Today's flush, on-top pin-on-plate is the literal seed geometry for 3.2's hinge - the base plate becomes the hinge base and the pin becomes the pivot.

← Constraints & Valid Ranges: A Part FamilyJoints & Degrees of Freedom →
Bailey Military InstitutePhysical AI

The Physical AI department of Bailey Military Institute — education, research, and a living intelligence map.

Physical AI

ResearchEntrepreneurshipIntelligenceAboutTeamCareers

Bailey Military Institute

Institute home ↗About ↗Courses ↗Support Us ↗Contact ↗
© Bailey Military Institute · A 501(c)(3) aviation-education nonprofit · FAA Part 107 training