Skip to content

Examples

Bundled with the package, in src/b123d_print/examples/. Start a part from one with new_part("my_part", example="<example>") over MCP or b123d-print new my_part --from <example>; b123d-print examples lists them.

remix_bracket

The original L bracket and the remix side by side

A remix: an L bracket that exists only as an STL (ref/l_bracket.stl, made for this example, CC0) is loaded with import_model and changed: its two mounting holes become slots, and two gussets stiffen the corner. The faceted 6 mm hole in the upright is the original's, so its overhang is reported as inherited from the original. new_part(..., example="remix_bracket") copies the reference file too.

The original colored where the remix differs

The deviation view: red where the slots were cut, grey where the gussets were added.

Script

esp_ir_blaster

ESP IR blaster box, assembly with board stand-ins

A two-part box (base and screw-on lid) for an ESP8285 IR transceiver board. Shows an assembly(d) with board, LED and receiver stand-ins, so the overlap check proves the board fits.

Section through the LED

Section through the LED: lid cone, board, clearances. Its templates(d) adds two fit-test templates to every export: the top of the standoffs and lid posts (set the board on it), and the lid's inner face (lay it on the base, try the screws). Script

tuya_motion_sensor_outdoor_case

Outdoor motion sensor case, arch cover

An outdoor case for a PIR motion sensor: a back plate stays on the wall, a hooded cover slides down over it on dovetails and clicks into detents. Variants: the standard one (flat on the wall, flat-top cover), tilt15 (plate tipped 15° down) and arch (a cover that prints without supports).

Section through the arch cover and back plate

Section through the middle of the arch variant.

Script

plate_2gang_to_1gang

2-gang to 1-gang wall plate

A 2-gang to 1-gang adapter wall plate for a smart switch, in two sizes (VARIANTS). Shows hole compensation from the config and the wall check around the counterbores — the first print of this part broke through a 0.05 mm skin there.

Wall plate section through the counterbores

Section just past the face, where the wall check looks. Script

testblock

The smallest complete example: a block with a rounded notch, a few measured dimensions, one fillet, one cut. Script

hole_coupon

Hole calibration coupon

The calibration coupon for hole compensation: vertical holes in the plate and horizontal ones in the tab (round, and teardrop), cut at their nominal size and labeled. Measures hole_comp and hole_comp_h. Script

fit_coupon

Fit coupon, holes plate

Measures the fits, per side, for your printer and material: a 6 mm peg (part peg) tried in holes 0 to 0.40 mm bigger per side (part holes; the label is hundredths of a mm), and discs printed inside rings with gaps of 0.10 to 0.40 mm (part pip). The results go into press_fit, clearance, free_fit and pip_clearance (Settings). Its checks(d) shows a declared Gap (the discs are closer than pip_clearance on purpose) and ThinFeature ignoring the engraved labels.

Fit coupon, print-in-place discs

Script

overhang_bridge_coupon

Overhang and bridge coupon

Measures your printer's limits: ledges whose undersides are 40° to 75° from vertical, and bridges of 5 to 40 mm between pillars. The steepest clean ledge is your max_overhang, the longest clean bridge your max_bridge. The overhang and bridge checks warn on it on purpose. Script