WELCOME TO THE WORKSHOP

Welcome back.

Sign in to upload models and follow your prints.

HOMEBREW / 3D PRINTING CONVERSATIONS

OpenSCAD for adjustable parts: a simple parametric modeling workflow

Practical 3D printing help, settings, projects, and advice from fellow makers.

Design & CAD

P0k3sm0t
OpenSCAD describes solids with a script instead of a conventional click-and-drag feature tree. It can be useful when a family of spacers, plates, or adapters differs mainly by a few dimensions. START WITH A TWO-HOLE PLATE The following example is a 50 × 30 × 3 mm plate with two nominal 4.2 mm holes, 32 mm apart. Dimensions are design inputs, not a guarantee that the printed hole will fit a particular screw. plate_x = 50; plate_y = 30; plate_t = 3; hole_d = 4.2; hole_spacing = 32; $fn = 64; difference() { cube([plate_x, plate_y, plate_t], center = true); for (x = [-hole_spacing/2, hole_spacing/2]) translate([x, 0, 0]) cylinder(h = plate_t + 2, d = hole_d, center = true); } The cube creates the plate; difference subtracts the cylinders. Each cylinder extends beyond both plate faces so the cut passes fully through. The centered model extends below Z=0 in its design coordinates: place its bottom on the build plate in the slicer before printing. MAKE IT REUSABLE 1. Save the editable .scad file before exporting. 2. Change one parameter and inspect the result. Check that holes remain inside the plate with enough surrounding material. 3. Render the complete model before mesh export. Preview and final rendering are different stages. 4. Export a printable mesh and inspect its dimensions, circular edges, and layer toolpaths in Slicer Studio. 5. Print a small fit sample and revise the hole dimension for the intended hardware and material. More facets can improve a circle's mesh approximation, but also increase file size. Choose export detail by the part's needs rather than an unnecessarily extreme value. This is a workflow example, not a strength-rated accessory. Add dimensions, edge treatments, mounting requirements, and physical tests appropriate to the final job. Share the editable parameters and the printed result if you adapt it. See the fit-test guide for recording clearance trials. References: OpenSCAD overview and official documentation links.
Sign in to reply

Edit post