OpenSCAD Enclosure, Lid & Screw Bosses example
Practical parts
Lesson 11 of 22
Design mating parts using shared dimensions and an explicit fit clearance.
Try changing:
steplengthwidthheightwallclearancepartMedium compile complexity. Two parts, eight holes, and a locating rim; export separately for fabrication.
Visual walkthrough: change step in the workspace Parameters panel to compile each construction stage.
How this model works
The shell is hollowed first; the bosses are then added and drilled. The lid is laid out beside the box, with its locating rim pointing upward for inspection. Flip it for assembly. A cross-shaped rim avoids the corner bosses, and matching lid holes use the same center coordinates. Clearance is per side. Pilot-hole sizing and screw engagement are examples only, not a fastening specification.
Hollow the shell ·
ShellSubtract the inside cavity, leaving the floor and four walls. No bosses are present yet.
Add solid bosses ·
BossesUnion four cylinders into the shell. They overlap its walls instead of touching at a single face.
Drill the pilot holes ·
DrilledRemove the four smaller cylinders from the bosses. The cutters stop above the bottom face, preserving a closed floor.
Add the mating lid ·
FinishedInspect the locating rim and matching lid holes. The part selector applies at this step; earlier steps show the box construction only.
main.scad
Loading draft
Ready
Z up · geometry preview
Your geometry will appear here
Preview or render the model to inspect it in 3D.
Geometry-only STL preview
Grid 10 units · Drag: orbit · Right-drag / two fingers: pan · Scroll / pinch: zoom
0 messages
Make it your own
Change length and width and verify that all eight hole centers still align. Export one part at a time using part, and test the rim clearance before printing a complete box.
Change one parameter at a time and inspect the result. Use the workspace reset action to return to this lesson’s original model.