Level 3 · Advanced
Engineering-grade projects. You will tune the machine's dynamics, design mechanisms that work straight off the bed, calculate instead of guess, script your CAD and read the G-code your slicer produces.
Prerequisites and mindset
Complete most of Level 2 first, in particular the temperature, flow and tolerance exercises (L2-1, L2-3, L2-6). Level 3 assumes you have a trustworthy profile for at least one filament, your own tolerance table and some CAD practice.
The mindset changes from "what setting works?" to "what is the physical reason, and can I predict it?". Many exercises therefore contain a short calculation you can check against a measurement. Keep the numbers in your print journal.
Overview of all fifteen exercises
| # | Exercise | Core skill | Time | Model / file |
|---|---|---|---|---|
| L3-1 | Pressure advance tuning | Dynamics | 2 h | slicer calibration |
| L3-2 | Input shaping and ringing analysis | Dynamics | 3 h | ringing_tower.scad |
| L3-3 | Volumetric flow test | Hotend limits | 2 h | vase-mode tower |
| L3-4 | Print-in-place hinge | Design / clearance | 3 h | hinge_test.scad |
| L3-5 | Snap-fit with strain calculation | Design / mechanics | 3 h | snap_fit_test.scad |
| L3-6 | Thread design | Design | 3 h | CAD |
| L3-7 | Custom filament profile | Process | 4 h | several tests |
| L3-8 | Multi-material with minimal waste | Process | 3 h | two-color part |
| L3-9 | Annealing experiment | Materials | 4 h | test bars |
| L3-10 | CAD scripting (OpenSCAD / CadQuery) | Software | 4 h | parametric_box.scad |
| L3-11 | Gear design | Design | 4 h | CAD |
| L3-12 | Designing a mechanism | Design | 5 h | four-bar linkage |
| L3-13 | Optimizing print time vs strength | Optimization | 5 h | test bars |
| L3-14 | Vapor smoothing / finishing project | Post-processing | 4 h | any ABS/ASA part |
| L3-15 | G-code reading and custom start G-code | Software | 3 h | text editor |
🔧 Exercises
Exercise 1 — Pressure advance tuning
⏱ 2 hTune pressure advance (Bambu Studio calls the same effect flow dynamics, with a K value) so that corners are sharp and line width stays constant during acceleration and deceleration. Plastic in the nozzle is compressible; pressure advance pushes a little extra before a speed-up and relieves it before a slow-down.
You will need- The calibration function of your slicer (line or pattern test), or a manual test pattern
- Dry filament with a tuned temperature (L2-1) and flow (L2-3)
- A magnifier or macro photo
- Write down the current K (or pressure advance) for the filament. Check the slicer's calibration help; typical values for direct-drive extruders are small (of the order of 0.02–0.1 in Marlin/Klipper units), but the unit and scale differ between firmwares.
- Run the calibration print (line pattern or tower) with acceleration and speed at your production values.
- Pick the best K from the pattern: the line where corner bulge and thin starts both disappear. Photograph it.
- Verify on a real part with sharp corners and long straights (a box with a 90° notch) at production speed. Compare with the old value.
- Test at a second speed. If K must change a lot when speed doubles, your flow ratio or temperature is probably wrong.
- Store K per filament and per nozzle. The auxiliary nozzle on the X2D is fed through a tube; do not assume the same value as for the main nozzle.
- Calibration print photographed with the chosen K marked
- Verification part shows sharp corners with no bulge and no gaps
- K stored in the filament profile under a clear name
Hint
Pressure advance interacts with temperature, because hotter plastic is less viscous, and with flow ratio. Always calibrate flow first. If the best line is at the extreme end of the range, extend the range instead of accepting the edge value.
Worked solution / what good looks like
Example: PLA, direct drive, test range 0.00–0.06 in steps of 0.005. At K = 0 corners bulge; at 0.04 corners are crisp; at 0.06 the inside of corners shows gaps. Choose 0.04. Check: a 0.4 mm box shows constant 0.42 mm lines at 100 and 200 mm/s. If K differs strongly between two spools of the same plastic, one of them probably holds moisture. See Calibration playbook and Speed, cooling & quality.
Exercise 2 — Input shaping and ringing analysis
⏱ 3 hMeasure the ripple (ringing, ghosting) pattern next to sharp features, calculate the resonance frequency of your printer from the ripple spacing and see how acceleration and speed change it. Input shaping cancels that resonance in firmware and lets you print faster at the same quality.
You will need- ringing_tower.scad (30 × 30 × 50 mm block with a notch and X/Y letters)
- Calipers or a ruler and a good light; the printer's acceleration and speed settings
- Optional: the vibration compensation or resonance calibration your printer provides (check your model's documentation)
- Print the tower at your normal outer-wall speed and acceleration. Note both values.
- Measure ripple spacing d on the X face and on the Y face with calipers across 5–6 ripples (divide the total by the count to improve accuracy).
- Calculate f = v / d for both axes. X and Y often differ because of different moving mass.
- Change one parameter: halve the acceleration, reprint and compare ripple height. Then halve the speed and check that ripple spacing shrinks in proportion (so f stays constant).
- Enable or run the resonance compensation of your printer if available and print again. Compare ripple amplitude with the first print.
- Record the highest acceleration at which ripples remain acceptable for each setting.
- Ripple spacing measured on both axes, resonance frequencies calculated
- Verified that frequency stays constant when speed changes while spacing does not
- Before/after photos with and without compensation, and a chosen acceleration limit
Hint
Ripples that follow a feature are ringing; ripples that start at the bottom and exist on blank surfaces are something else (z-wobble, bad belts, loose parts). Make sure the printer sits on a firm surface, as a table that shakes lowers measured frequency and increases the amplitude.
Worked solution / what good looks like
Example: X face d = 2.4 mm at 200 mm/s → 83 Hz; Y face d = 3.1 mm → 65 Hz. At half speed the spacing is 1.2 and 1.55 mm, so the frequencies are unchanged, which proves a mechanical resonance. Ripple height drops with lower acceleration and drops further with input shaping; the allowed acceleration can then be raised, which reduces print time on small parts. Some printers (including the X2D) run an automatic resonance compensation, so the measured ripple may already be small; in that case compare different accelerations instead. See Speed, cooling & quality.
Exercise 3 — Volumetric flow test
⏱ 2 hFind the maximum volumetric flow (mm³/s) your hotend can melt with a particular filament. Slicers limit speed with this number: print speed alone does not matter, only the volume of plastic per second.
You will need- A vase-mode (spiral) cylinder, or a slicer calibration for max flow, plus a speed ramp; or any wall tower sliced so that speed increases with height
- Calipers, a camera, dry filament and the temperature you want to test (higher temperature allows higher flow)
- Prepare the test: single wall, 0.2 mm layer height, line width 0.45 mm. Use a speed ramp from about 8 to 30 mm³/s, or use your slicer's max-flow calibration.
- Print it with cooling set to your normal value and observe: at high flow the extruder may click or skip steps.
- Find the onset height where under-extrusion becomes visible (rough, thin, matte). Convert the height to speed or flow using the ramp definition.
- Set the limit to about 80–85 % of that value in the filament's "max volumetric speed" field.
- Repeat at +10 °C to see how much temperature helps. Record the gain in mm³/s per 10 °C.
- Check a real print: a 0.4 mm-layer part will hit the limit at a much lower speed than a 0.12 mm part.
- An onset value in mm³/s for two temperatures
- A maximum flow set with a safety margin in the filament profile
- A table that converts layer height and line width to the maximum speed
Hint
To convert back: speed = Q / (layer height × line width). With Q = 15 mm³/s, line 0.45 mm and layer 0.2 mm the speed limit is 15 / 0.09 = 167 mm/s. Using a 0.4 mm layer would allow only 83 mm/s. The nozzle size changes the limit too: a high-flow hotend or a larger nozzle melts more plastic per second.
Worked solution / what good looks like
Example: standard PLA, 0.4 mm nozzle, 220 °C. Walls are smooth up to 20 mm³/s, matte at 23 mm³/s, with gaps from 27. Limit = 0.85 × 23 ≈ 19.5 mm³/s. At 230 °C the onset moves to ~26 mm³/s. Table: 0.12 mm layer × 0.42 mm → 387 mm/s max; 0.20 × 0.45 → 217 mm/s; 0.28 × 0.45 → 155 mm/s. Real printers also limit by acceleration, so the slicer will not reach these speeds on short moves. See Speed, cooling & quality.
Exercise 4 — Print-in-place hinge
⏱ 3 hPrint a hinge that moves right off the bed, with no assembly. You will determine the clearance that separates the moving parts and design a hinge that fits your own printer and material.
You will need- hinge_test.scad: five knuckles, pin radius 2 mm, clearance 0.4 mm; edit
clearanceto 0.25, 0.3, 0.4, 0.5 - Your tolerance table from L2-6, a thin spatula or a hobby knife (carefully) for loosening
- Print four hinges with clearance 0.25, 0.3, 0.4 and 0.5 mm on one plate, no supports, no brim touching the knuckles.
- Free the hinge: flex it back and forth gently 10–20 times. Record how much force was needed ("free", "stiff", "stuck").
- Check wobble: hold one leaf and move the other sideways. Measure the play at the leaf tip with calipers or a feeler gauge.
- Choose the smallest clearance that frees without a tool. Reprint your final hinge with that value.
- Cycle test: open and close 500 times and note any wear, noise or cracking.
- Improve: replace the round bore with a teardrop shape and check if you can print with a smaller clearance and better surface.
- Four clearances tested with notes on freedom and play
- A chosen clearance that frees by hand and passes the 500-cycle test
- A note on which direction the hinge fails first (pin, knuckle or leaf)
Hint
Horizontal holes are always smaller and more oval than vertical holes. Printing the hinge with its axis along the bed's X or Y direction places the pin circle in the plane of the layers, and the pin's top and bottom are the weakest surfaces. A fast, cool first layer under the knuckles also reduces fusing: keep first-layer squish moderate.
Worked solution / what good looks like
Typical result for a 0.4 mm nozzle, 0.2 mm layers: 0.25 mm fused; 0.3 mm freed with force; 0.4 mm freed easily with 0.3 mm of play at a 25 mm leaf; 0.5 mm was sloppy. Choose 0.35 mm for a good compromise. A teardrop bore removed the rough roof in the bore. For a tighter hinge, print a pin with 45° flats and a cone-shaped end that self-centers. Read Design patterns & recipes and Joints & fasteners.
Exercise 5 — Snap-fit with strain calculation
⏱ 3 hDesign a cantilever snap-fit so that the maximum strain in the beam stays below a safe limit for the material, then print it and test it for 100 cycles. You will use a one-line formula to choose the beam dimensions instead of trial and error.
You will need- snap_fit_test.scad, which prints the strain with
echo()for any beam values - PETG or nylon (PLA is brittle) and optionally PLA to compare
- Calipers and a pen to record the number of cycles
- Choose the material and a permissible strain from a datasheet or the file comment (rough guide: PLA ~1.5 %, PETG ~3 %, nylon 4 %+; apply a safety factor of 2 for repeated use).
- Calculate the strain for the default beam using the formula, then change beam length L and thickness t in OpenSCAD until ε is below the limit. Remember the strength drops when layers cross the beam.
- Print the clip lying on its side so layer lines run along the beam. Print the socket at the same time.
- Cycle test: snap in and out 10 times, then 100 times. Note any whitening (stress), cracks or loosening.
- Break it on purpose with a design with ε about twice the limit and compare. This tells you how much margin you really have.
- Write down the allowed strain you validated for your material and printer.
- Strain calculation for at least three beam variants, with the formula written out
- 100 successful cycles for the chosen design
- An over-strained variant that fails, proving the limit
Hint
The strain is linear in thickness and inverse to length squared. Doubling the beam length reduces the strain by a factor of four, which is by far the cheapest fix. Tapering the beam from root to tip spreads the strain better, and a fillet at the root removes the stress concentration.
Worked solution / what good looks like
Default beam: ε = 1.5 × 1.0 × 1.6 / 14² = 1.22 %. Safe for PETG (limit about 3 %, factor 2 gives 1.5 %), borderline for PLA. A PLA design with L = 20 mm and t = 1.6 mm has ε = 1.5 × 1.0 × 1.6 / 400 = 0.6 %, which survived 100 cycles in practice. With h = 2 mm and L = 14 mm the strain is 2.4 %: the PLA beam cracked after 3 cycles, PETG whitened at the root. See Joints & fasteners.
Exercise 6 — Thread design
⏱ 3 hDesign a printable screw thread pair (a jar-style lid or a bolt and nut) with a profile and clearance that work on your printer, and find the smallest pitch that prints reliably. ISO metric threads are too fine for most FDM printing at small sizes; coarse trapezoidal threads work much better.
You will need- A CAD tool that can make a helical sweep (Fusion coil, FreeCAD helix, OpenSCAD
linear_extrudewithtwist) - Calipers, your tolerance table (L2-6), a 0.4 mm nozzle and 0.12–0.2 mm layers
- Choose the profile: trapezoidal, 45° flanks, pitch about 3 mm for a 30 mm diameter lid. For a small bolt use the standard M8 × 1.25 only if you are going to print a dedicated test.
- Model both parts from the same parametric profile, and add a radial clearance
cto the nut (try 0.2, 0.3 and 0.4 mm). - Print vertically (the axis is Z) so the thread is made of full rings. Use 0.12–0.16 mm layers for small pitches.
- Test: Does the nut start by hand? Does it spin freely, with wobble, or bind? Count turns until fully seated.
- Torque test: tighten by hand with a lever until the thread strips and note whether the bolt or the nut fails.
- Add a lead-in chamfer and a thread start relief (the first half turn cut flat) so it does not cross-thread.
- A bolt/nut or lid/jar pair that closes smoothly by hand
- A table of clearance vs feel, with the best value highlighted
- A minimum pitch for your printer and a design note (profile, clearance, orientation)
Hint
A vertical thread's accuracy depends on the XY accuracy of the printer, so keep the thread diameter large. If the nut binds only at one point, the thread is out of round because a seam sits in the thread; move the seam to the least visible position and print a few perimeter rings with "avoid crossing walls" off.
Worked solution / what good looks like
Example for a 30 mm lid in PETG: trapezoidal profile, pitch 3 mm, thread depth 1.5 mm, radial clearance 0.3 mm. With 0.2 mm the lid needed force, with 0.4 mm it wobbled slightly but sealed. Selected 0.3 mm, 3 turns to close. Also test the O-ring or rubber seal if you need waterproof behavior: printed threads are not watertight without a gasket. Rule: ISO threads below about M6 should be tapped or heat-set (see L2-14); above M12 or in custom coarse form they print well. More in Joints & fasteners.
Exercise 7 — Custom filament profile
⏱ 4 hCreate a complete, shareable filament profile for a spool that has no factory profile: temperature, flow, pressure advance, cooling, maximum volumetric speed, drying temperature and retraction, all validated by tests. Name it clearly and document the test results.
You will need- A spool of a filament without a ready-made profile (brand-specific PETG, a silk PLA, a matte PLA or a composite)
- The results and models of exercises L2-1, L2-2, L2-3, L3-1 and L3-3
- Your slicer's profile export function
- Clone the closest existing profile (same polymer family) and rename it: Brand · Type · Color · Version.
- Run the tests in order (dry, temperature, flow, pressure advance, volumetric flow, cooling, retraction) and enter each result immediately.
- Check special properties: silk and metallic filaments want lower speed and higher temperature, matte filaments often prefer less cooling, CF and GF composites need a hardened nozzle (see Engineering plastics).
- Validate with a demanding part: bridges, fine text, a snap-fit or a large flat area, and compare with a print from the base profile.
- Document the spool (brand, lot, color, diameter measured at five points), the values, the test photos and the date in a short text file saved next to the exported profile.
- Export the profile and re-import it on a clean install to confirm nothing is missing.
- A named profile with all values filled in and verified by a test for each
- A validation print that equals or beats the base profile
- An exported file and a one-page note describing the test results
Hint
Measure the real filament diameter (mean of 5 positions and 2 directions) and enter it. A 1.70 mm spool declared as 1.75 mm causes 5 % under-extrusion. Colors of the same brand can have different temperature requirements because pigments change flow and cooling behavior, so keep color in the profile name.
Worked solution / what good looks like
Example documentation entry: "Brand SilkPLA Gold v1, lot 25-03, Ø 1.74 ± 0.02. Nozzle 225 °C, bed 55 °C, flow 0.96, K 0.035, max flow 12 mm³/s, fan 60 %, retraction 0.8 mm at 30 mm/s, dry 50 °C for 6 h. Validated with a vase and a bridge test; strings: none; layer bond: weaker than standard PLA, avoid load-bearing parts." This level of detail enables a repeat later. See Bambu Studio settings & profiles.
Exercise 8 — Multi-material with minimal waste
⏱ 3 hReduce the waste of a multi-color print by at least 50 % without damaging quality, using color order, flush volume tuning, design changes and the ability of the printer to flush into infill or sacrificial objects.
You will need- A part with 3 colors that change many times (a logo tile with text and a border works), plus a baseline print from L2-15
- A multi-filament system (AMS or AMS 2 Pro) and a kitchen scale (0.1 g)
- Measure the baseline: slice with default flush settings, note the slicer's waste estimate and the number of filament changes, print, and weigh the flushed material (or read it from the slicer's statistics).
- Reorder the colors in the slots and check the effect in the slicer's flush matrix. Pairs such as dark → light need more flush than light → dark.
- Edit the flush volumes for similar colors (e.g. two blues) lower, but never to zero when you can see color bleeding.
- Use "flush into infill" or "flush into objects" if your slicer offers it, so that purge material becomes part of hidden internal structure.
- Redesign the part: place color transitions at layer boundaries, make regions of one color tall instead of thin and widely separated.
- Print the optimized version and compare weight, time and appearance with the baseline.
With two nozzles, each nozzle holds one filament, so assigning the two main colors to the two nozzles removes most changes of those colors. The remaining colors still need flushing. See Dual-nozzle printing for the rules for which material can go where.
- Baseline and optimized waste in grams, with the percent reduction
- A comparison photo showing no visible color contamination in the optimized print
- A list of the measures that gave the biggest gains
Hint
The number of color changes is more important than the volume of one change. If your model has a color on every layer, the changes multiply with layer count: 200 layers × 2 changes is 400 flushes. A model where the color changes at only 10 layers needs about 10 flushes.
Worked solution / what good looks like
Example: logo tile with 3 colors, 60 layers. Baseline 17 g waste, 180 changes. Reordering colors cut 3 g, reducing flush volumes for two similar colors another 2 g, enabling "flush into infill" saved 3 g, redesigning the text as thick raised letters (fewer color layers) saved 5 g; final 4 g. Quality is equal. Rule: before touching settings, look at the model. Read Multi-color & multi-material.
Exercise 9 — Annealing experiment
⏱ 4 hAnneal printed parts (heat them below the melting point so the polymer crystallizes more) and measure the change in heat resistance, stiffness and dimensions. The effect varies widely between materials and brands, so you test your own.
You will need- Four identical parts or bars of a crystallizable material (PLA of a type marked for annealing, PETG is not typically annealed, nylon or PA usually after drying); mark each with a number
- An oven with a reliable thermometer (separate from the oven display), a baking tray and sand or salt for support, calipers
- A kitchen oven is not suitable for food after use with plastic: use a dedicated one or a filament dryer that reaches the required temperature
- Check the material data for the recommended annealing temperature. Never exceed it: parts soften and sag. Stay well below the melt temperature.
- Measure all parts in three directions and weigh them. Keep one part as an unannealed control.
- Embed parts in a tray of sand or salt to hold their shape (hollow parts need support).
- Heat as in Figure 10. Try two hold times (30 and 60 min) or two temperatures on different parts.
- Cool slowly by switching off the oven and leaving the door shut until the parts are near room temperature.
- Measure again and compare shrinkage. Test heat resistance on a control and an annealed bar in warm water or an oven at a set temperature, and a bend test as in L2-9.
Work in a ventilated space, do not use a food oven unless you accept the contamination, and never heat plastics near their decomposition range. Let hot sand cool before handling.
- Dimension table before and after for each annealing condition
- Heat resistance and bend result of annealed vs control
- A conclusion on whether annealing helps your material, and a rule to compensate shrinkage in CAD
Hint
If a feature has to fit after annealing, print it larger by the measured shrinkage factor (scale in one direction only if the shrinkage is anisotropic). Annealing works best with thick, solid parts: thin-walled hollow parts distort and gain little.
Worked solution / what good looks like
Example: PLA bars annealed at 90 °C for 45 min in sand. Length change −0.8 %, height +0.3 %, sand-supported parts stay straight. Heat test: the control sagged in 60 °C water, the annealed bar kept its shape up to about 90 °C. Bend test: annealed bar failed at a slightly higher load with a more brittle break. Conclusion: use annealing only when heat resistance is the priority and scale holes by +0.8 %. For high-temperature use, engineering materials in the heated X2D chamber are an alternative (Engineering materials & chamber); see also Post-processing.
Exercise 10 — CAD scripting (OpenSCAD or CadQuery)
⏱ 4 hWrite a part as code, with parameters, loops and conditionals, so you can generate a whole family of parts (for example a screwdriver-bit holder with N slots) from one file and keep it under version control.
You will need- OpenSCAD (free) or Python with CadQuery
- A text editor, a version-control tool (git) is recommended
- The reference parametric_box.scad
- Pick a part with repeated features: a bit holder, a battery organizer, a hex-key holder, a pegboard hook set or a gear tooth ring.
- Put every number at the top as a named parameter with units and a comment.
- Generate repeated features with a loop and conditionals (e.g. only add a label if
label != ""). - Add input checks:
assert(wall >= 1.2, "wall too thin"). - Export two or more variants by changing parameters from the command line (
openscad -D n=8 -o out.stl file.scad) or by editing CadQuery variables. - Commit the file with a message; tag the version you printed.
- One script producing at least three different valid parts through parameters
- Input checks that block invalid combinations
- An STL printed from the script, and the script saved in version control
Hint
Test the extremes: n = 1, n = 20, the smallest wall and the largest diameter. If the preview works but the export fails with a non-manifold error, a shape probably touches another exactly on a face; extend one by 0.01 mm so they overlap. Keep each module small and name it after what it makes.
Worked solution / what good looks like
A good solution has: parameters at the top, a module bit_slot(), a loop over slots, a label text engraved on the front, an assertion that the wall is at least 1.2 mm and a comment block explaining each parameter. The loop in Figure 11 gives a six-slot holder; with n = 10 it automatically grows. Compare with the structure of parametric_box.scad. A CadQuery version uses a Workplane and rarray. Background: Parametric CAD workflow.
Exercise 11 — Gear design
⏱ 4 hDesign and print a pair of spur gears with a chosen ratio, correct center distance and enough backlash to run smoothly, then measure how well they mesh. Gears show every error in your printer's accuracy.
You will need- A gear generator or script: an OpenSCAD involute-gear module you write or any open-source library for your CAD tool (you may use libraries in your own work; this site's models use none)
- Two M3 or M4 screws as axles and a baseplate with two holes at the calculated distance
- Choose the module m = 1.5 to 2 for a 0.4 mm nozzle (module 1 teeth are only 2.2 mm tall and small-detailed). Choose tooth counts for your ratio; avoid fewer than 12 teeth to avoid undercut.
- Calculate d, da and a with the formulas in Figure 12.
- Add backlash by increasing the center distance by 0.1–0.3 mm or by thinning teeth slightly. Print three baseplates with a = nominal, +0.15, +0.3 mm.
- Print gears flat so that the teeth are in the XY plane (best accuracy and strongest teeth).
- Test: turn by hand; feel for binding, count backlash by rocking one gear. Run for a few minutes and check for wear or noise.
- Try a variation: herringbone or helical gears for quieter running, or a rack and pinion.
- A calculation sheet for both gears and the center distance
- A baseplate that turns smoothly with small backlash
- A note of the best center-distance addition for your printer
Hint
If the gears bind at some positions only, the bore is off-center or the gear is not round (check the first-layer squish). If they run smoothly but click, the center distance is too large. A bore with a clearance of 0.2–0.3 mm on an axle of known diameter is better than a press fit for the test.
Worked solution / what good looks like
Example: m = 2, z₁ = 20, z₂ = 12: d₁ = 40, d₂ = 24, a = 32 mm. The nominal plate bound slightly; a = 32.2 mm gave smooth running with about 1° of backlash; a = 32.4 mm was loud. Final choice 32.2 mm. Use PETG or nylon for wear resistance or add a small amount of lubricant (dry silicone or PTFE) suitable for plastics. See Design patterns & recipes for more mechanism recipes.
Exercise 12 — Designing a mechanism
⏱ 5 hDesign a working four-bar linkage (for example a gripper, a parallel clamp or a walking leg) starting from a sketch and angle calculation, print it with pins or print-in-place joints, and compare the motion with your simulation.
You will need- Graph paper or a 2D CAD sketch with constraints, or a free linkage simulator
- 3 mm filament offcuts or M3 screws as pins, a drill for cleaning holes
- Your clearance values from L3-4
- Define the motion you need (output angle range, force direction). Sketch the linkage and choose link lengths.
- Check the Grashof condition and the transmission angle at the extreme positions. Simulate in 2D CAD by dragging the constrained sketch.
- Design joints: pin joints with 0.2–0.3 mm clearance around a 3 mm pin, or print-in-place pins (L3-4). Add stops to limit the travel.
- Print one link at a time as a test to check hole sizes before the full assembly.
- Assemble and measure the real positions of the output at 5 input angles. Compare with the calculation.
- Iterate: if it binds at an extreme angle, the transmission angle there is too small; lengthen a link or move a pivot.
- A sketch with link lengths and a Grashof check
- A working mechanism that moves through its full intended range without binding
- A table comparing predicted and measured output angles within a few degrees
Hint
Printed holes and links bend and flex: widen links in the plane of motion, and add a washer or spacer so links do not rub on each other in the Z direction. Keep joints in the same plane as the build plate so the pin holes print accurately.
Worked solution / what good looks like
The example 30 / 80 / 60 / 90 mm linkage meets Grashof (120 ≤ 140) so the 30 mm crank can rotate fully while the rocker oscillates about 70°. Predicted and measured output angles agreed within about 3° at five positions; the deviation came from 0.3 mm joint clearance. Add a 1 mm spacer between the layers of links to avoid rubbing. Design patterns for hinges and joints are in Design patterns & recipes.
Exercise 13 — Optimizing print time vs strength
⏱ 5 hFind the best trade-off between print time and strength for one bracket by varying wall count, infill density and layer height, then show the results on a time-versus-strength chart (the Pareto front). You will learn which settings give a lot of strength per minute.
You will need- A simple test part: a 100 × 15 × 10 mm bar or the L-bracket from L2-12
- The load rig from L2-9, a kitchen scale and your slicer's time estimate
- Nine to twelve parts: three levels each of two variables, e.g. walls 2/4/6 and infill 10/25/50 % (a small DoE; see L4-6 for the full method)
- Define the load case (bending across the bar) and the response (failure load).
- Make a table of nine setting combinations and record slicer time and weight for each.
- Print in random order on random plate positions to avoid systematic errors.
- Test every part and record the load at failure and the failure type.
- Plot time vs load as in Figure 14, mark the Pareto front, and compute strength per gram and per minute.
- Choose the settings for three situations: fastest acceptable, best compromise, strongest.
- A complete table of settings, time, mass and load
- A scatter plot with the Pareto front identified
- Three named presets saved in your slicer (e.g. "Draft", "Standard", "Strong")
Hint
For a bar in bending, the outer walls carry the largest stresses, so each extra wall adds more strength than the same extra material put into infill. Check wall count before infill density. For tension along the part, solid infill matters more.
Worked solution / what good looks like
| Walls | Infill | Time | Mass | Load |
|---|---|---|---|---|
| 2 | 10 % | 24 min | 8 g | 150 N |
| 4 | 10 % | 29 min | 11 g | 290 N |
| 4 | 25 % | 33 min | 13 g | 320 N |
| 6 | 25 % | 41 min | 16 g | 440 N |
| 6 | 50 % | 52 min | 21 g | 460 N |
Example only. The 4 walls / 10 % row almost doubles the strength of 2 walls for 5 minutes more; going to 50 % infill costs 11 minutes for 4 % more load. "Standard" preset: 4 walls, 15 %. Read Strength & orientation.
Exercise 14 — Vapor smoothing and finishing project
⏱ 4 hTake a printed part from rough to presentation-grade: sand, fill, prime and paint, or (for ABS and ASA only) vapor smooth. Document the surface quality at each stage with macro photos and measure the dimensional change.
You will need- An ABS or ASA print (or PLA if you choose the sand-and-paint route), 6–8 cm tall with curved and flat surfaces and a snap or press-fit feature to check dimensions
- Sandpaper 120–800 grit, filler primer, putty, paint and clear coat; for vapor smoothing: acetone, a sealed glass or metal container and a way to hold the part above the liquid
- Nitrile gloves, respirator rated for organic vapors, ventilation or outdoors, safety glasses
- Measure and photograph the raw part: three critical dimensions, one macro photo of a curved surface.
- Sand through the grits wet or dry as the material allows; photograph again and measure again.
- Prime and fill: apply a thin coat, sand with 400 grit, repeat until the layer lines no longer show.
- Alternative for ABS/ASA: vapor smoothing: suspend the part above a small amount of acetone in a closed container for a short time (minutes, not hours; start with 5–10 min), then remove and let it dry in ventilated space for 24 h. The part is soft and easily damaged while wet.
- Paint and clear-coat, or leave the smoothed surface as is.
- Final inspection: compare dimensions at each stage and check if the snap or press-fit still works. Write down the dimension change you must add to the design next time.
Acetone is highly flammable and its vapor can ignite from a spark or a heater. Work outdoors or in a strongly ventilated space away from ignition sources, never use a heated chamber, wear protective gloves and eye protection, and keep quantities small. PLA and PETG do not smooth with acetone. Follow the safety data sheet of the chemical you use.
- Photos and three measurements at each stage
- A finished surface without visible layer lines at arm's length
- A list of dimensional corrections for next time (e.g. "+0.1 mm on press-fit holes if primed")
Hint
Thick primer layers fill detail; thin and repeated coats keep it. Start sanding with the coarsest grit that does not leave scratches you cannot remove, and avoid sanding through the shell on thin-walled parts. For vapor smoothing, cleaner results come from a clean, dry part and a short exposure repeated twice rather than one long exposure.
Worked solution / what good looks like
Example: ASA vase, height 70 mm. After sanding to 400 grit the diameter dropped by 0.2 mm, primer added back 0.15 mm, and paint plus clear another 0.05 mm. The vapor-smoothed twin lost nearly all layer lines but rounded sharp edges by about 0.3 mm and shrank by 0.1 mm. Conclusion: design press-fit features after finishing allowances, mask them, or finish the mating faces separately. Details in Post-processing.
Exercise 15 — G-code reading and custom start G-code
⏱ 3 hOpen a G-code file in a text editor, identify what each command block does, calculate the filament use by hand for one line, and add a safe custom start or layer-change snippet (for example a message or a pause at a layer). G-code is the language your printer actually speaks.
You will need- A sliced file as plain G-code (for Bambu printers: extract the G-code from a
.gcode.3mfproject, which is a zip archive, or export plain G-code) - A text editor that opens large files (VS Code, Notepad++)
- The G-code, firmware & ecosystem page for command references
- Find the structure: start block (heating, homing, bed leveling, purge), per-layer blocks (look for layer-change comments), end block (cool, park). Note the line numbers.
- Decode ten commands using the reference: M104/M109, M140/M190, G28, G90/G91, M82/M83, G92, G0/G1, M106/M107, M204 (acceleration). For each, write down its purpose.
- Calculate by hand the extrusion for one 20 mm outer-wall line and compare with the number in the file (as Figure 16). Explain differences with the flow ratio and line width.
- Customize: in the slicer's machine settings, add a harmless line to the start G-code, such as a status message or a short beep (for a printer that supports it), or a pause at a chosen layer through the slicer's layer-change field.
- Test on the printer with a short print. Check that the new command appears in the exported file and behaves as intended.
- Restore the original block afterwards if the change was only for the experiment and keep a copy of the original start G-code.
Bambu and other modern printers use vendor-specific macros in the start and end blocks for calibration, filament handling and safety. Do not delete lines you do not understand; add your own lines after the existing ones, and test with the printer attended. A wrong temperature, move or missing homing command can damage the machine.
- A commented list of at least ten commands from your file
- A hand calculation of extrusion for one move with the comparison to the file
- A custom snippet tested on a short print without problems
Hint
Absolute and relative extrusion differ: with M82 the E value is the total filament pushed since the last G92 E0; with M83 each E is a delta. Check which mode the file uses before computing. Search for comments such as ; LAYER_CHANGE or ;TYPE: to navigate quickly.
Worked solution / what good looks like
In Figure 16 the line length 40 mm at 0.2 mm × 0.42 mm needs 40 × 0.2 × 0.42 / 2.405 = 1.40 mm of filament. A file value of 1.6 mm indicates a flow ratio of about 1.14, or a wider line. Real files differ by a few percent from the ideal formula because of the flow ratio, line shape (rounded ends) and pressure advance. A harmless custom snippet: M117 My profile v3 (display message, if supported) at the end of the start block. A pause at layer 12 is typically inserted via the slicer's "custom G-code at layer change" with the printer's pause command; check your firmware's command first.
Key takeaways
- Pressure advance, flow and temperature interact; tune them in order and recheck after any change.
- Use formulas to design (strain, flow rate, gear distance, linkage geometry) and tests to confirm.
- Clearance values belong in a table that comes from your own printer, not from the internet.
- The cheapest strength usually comes from walls, orientation and geometry, not infill.
- Reading G-code removes the "magic" from the slicer: you can verify and fix what it does.
- Document every experiment so that you can reproduce and share your results.