2.3 KiB
2.3 KiB
name, description, scope
| name | description | scope |
|---|---|---|
| cad-3d-print | Design, generate, and verify parametric 3D models for 3D printing using code-first CAD (OpenSCAD, build123d). | global |
CAD 3D Print
Design, generate, and empirically verify 3D-printable parts using programmatic CAD. Follow the shared workflow.
Workflow
-
Dimensional Budgeting & Tolerances
- Establish bounding box, mounting points, and mating interfaces from user specifications.
- Apply standard FDM 3D printing tolerances:
- Horizontal hole clearance: Add
+0.2 mmto+0.3 mmfor screw pass-through (e.g. M3 hole diameter =3.2 mm; tap hole =2.9 mm). - Fit clearances: Snug/snap fit
0.15 mm; sliding fit0.3 mm; loose/hinged fit0.4–0.5 mm. - Wall thickness: Multiples of nozzle width (minimum
1.2 mmfor 0.4 mm nozzles). - Bed contact: Add 45° chamfers to bottom edges touching the build plate to prevent "elephant's foot" binding.
- Overhangs: Keep unassisted overhangs
\le 45^\circto minimize support material.
- Horizontal hole clearance: Add
-
Parametric Script Generation
- Author a standalone, self-documenting OpenSCAD (
.scad) script:- Place all customizable dimensions at the top as labeled parametric variables.
- Set curvature resolution:
$fn = 60;or$fs = 0.5; $fa = 5;for smooth circular features. - Use Constructive Solid Geometry (CSG):
union(),difference(),intersection(),hull(). - Prevent non-manifold coincident faces (Z-fighting): always extend cutting bodies slightly beyond the target surface (e.g.,
translate([0, 0, -0.1]) cylinder(h = height + 0.2, ...)).
- Author a standalone, self-documenting OpenSCAD (
-
Empirical Verification
- Compile STL mesh:
Inspect compiler output to ensure
openscad -o model.stl model.scadSimple: yes(a manifold, watertight solid). - Render visual preview:
openscad --render --imgsize=800,600 -o preview.png model.scad - Verify the rendered image to check geometry, clearances, and aesthetic proportions.
- Compile STL mesh:
-
Handoff Artifacts
- Keep the editable
.scadsource in the workspace. - Provide the compiled
.stlor.3mffor slicing (PrusaSlicer, Bambu Studio, OrcaSlicer). - Embed or link the rendered
.pngpreview.
- Keep the editable