Fusion Guide
intermediate10 min read

Tutorial 2: Electronics Enclosure with Snap-Fit Lid

Design a two-part 3D-printable project box with screw-less snap-fit cantilever latches, PCB standoffs, a connector cutout and a draft-friendly shell.

Goal#

Create a small project box for a 60 mm x 40 mm circuit board, with a base, a lid, four PCB standoffs, a USB-style cutout on one short wall and two cantilever snap hooks that let the lid click on and off without screws. The outside is about 66.6 mm x 46.6 mm (the parameters below drive it) and 22 mm tall when closed: the base is 20 mm tall and the lid is 5 mm tall, a 2 mm plate plus a 3 mm rim that overlaps the top of the base. The design is for FDM printing in PLA, PETG or ABS, and every critical clearance is a named parameter so you can retune it for your own printer.

If your board is different, change four parameters and the whole box regenerates. That is the real lesson of this tutorial: build the box around parameters, not around constants.

What you'll learn#

  • Planning a two-part enclosure as two components in one design.
  • Using shell versus extruding walls, and why shell is the better first move for a box.
  • Building a lip and groove so lid and base register to each other.
  • Designing a cantilever snap hook with correct length, thickness, and lead-in angle.
  • Placing standoffs from a sketch and mirroring features.
  • Creating connector cutouts that follow the board position.
  • Checking fit with Interference analysis and a section view.
  • Printing orientation and tolerance advice.

Prerequisites#

  • Tutorial 1 (parameters, sketches, extrude, fillet).
  • Basic idea of components and joints from the Components and Assemblies section.
  • A printer with 0.4 mm nozzle (the numbers assume it).

Parameters#

Open Modify > Change Parameters and create these user parameters. Spaces in names are not allowed, so use underscores.

NameValuePurpose
pcb_l60 mmPCB length
pcb_w40 mmPCB width
pcb_t1.6 mmPCB thickness
wall2 mmWall thickness
clear0.3 mmGap on each side between PCB and wall
fit0.2 mmPrint clearance between lid and base mating faces
base_h20 mmBase height
lid_hwall + 3 mm (5 mm)Lid plate plus rim height
stand_h5 mmStandoff height
stand_d6 mmStandoff outer diameter
screw_d2.5 mmPilot hole for M3 self-tapping screws, or 2.2 for heat-set (verify for your insert)
in_lpcb_l + 2*clearInner cavity length
in_wpcb_w + 2*clearInner cavity width
out_lin_l + 2*wallOuter length (about 66.6 mm)
out_win_w + 2*wallOuter width (about 46.6 mm)

With these values the outer size is 66.6 x 46.6 mm; the parameter-driven result is authoritative.

Steps#

Part A: Base body#

  1. Create the design. File > New Design, save as Enclosure. Enter the parameters above.
  2. Make components. Right-click the root in the browser, choose New Component, name it Base, and keep Activate selected. Later you will add Lid the same way. Working in separate components lets you move and joint them independently. See Components vs Bodies.
  3. Sketch the outer outline. Create a sketch on XY. Choose Create > Rectangle > Center Rectangle (R is the 2-Point Rectangle). Click the origin, then drag out, and type out_l and out_w. Press Tab between fields.
  4. Corner radius. Use the sketch Fillet tool. Set each of the four corners to 4 mm. Constrain with one radius and set the others Equal.
  5. Extrude. Press E, distance base_h, Operation New Body (or Join inside the component). OK.
  6. Shell. Choose Modify > Shell. Select the top face, set Inside Thickness to wall and the direction to Inside. OK. The box now has a floor and four walls of 2 mm. Shell is robust because it follows later changes to outer shape.
  7. Floor check. The floor equals wall as well. If you want a thicker floor (3 mm), change it later with Press Pull on the inner floor face.

Part B: Lip for the lid#

  1. Sketch the lip step. The lip is a thin ridge that sits inside the lid rim. Select the top face of the wall and sketch. Use Offset (O) on the inside edge of the wall loop with an offset of wall/2. The offset curves are 1 mm into the wall.
  2. Cut the outer half. Select the region between the outer wall edge and the new loop. Extrude Cut with distance 3 mm downwards. The wall now has a stepped top: inner half stays tall, outer half is lowered 3 mm. This is the lip that registers the lid.
  3. Add clearance. The lid groove will be made fit larger, so you do not add clearance here.

Part C: Standoffs and screw pilot#

  1. Mark board position. Create a sketch on the floor top (the inside bottom face). Draw a Center Rectangle pcb_l x pcb_w from the origin and convert it to construction geometry (X toggles construction for the selected geometry). The floor top is at Z = wall (2 mm).
  2. Place four points. Assume the board's mounting holes are 3.5 mm in from each corner (check your board). Draw four points and dimension each to the corner of the construction rectangle: 3.5 mm in both directions (the points land at X = +/-26.5 mm, Y = +/-16.5 mm). Use Mirror for the other corners.
  3. Draw circles. Create > Circle > Center Diameter at each point with diameter stand_d.
  4. Extrude standoffs. Press E, select the four circles, distance stand_h, Operation Join. Then add holes: press H, Placement From Sketch, select the points on the standoff tops, diameter screw_d, depth 4 mm (the standoff is 5 mm tall on a 2 mm floor, so a deeper hole would break through the floor).
  5. Fillet the standoff roots. Press F, select the bottom circular edges, radius 0.8 mm. This reduces stress concentration at the standoff roots.

Part D: Connector cutout#

  1. Sketch on the outer short wall. Choose the outside face at the -X end. Create a sketch.
  2. Draw the opening. A micro-USB port is about 8 mm wide and 3 mm tall; leave extra: rectangle 12 mm x 7 mm. The PCB top surface is wall + stand_h + pcb_t (8.6 mm) above the outer bottom edge. Constrain the bottom of the rectangle to wall + stand_h + pcb_t - 1 mm (7.6 mm), so the opening starts 1 mm below the PCB top surface and extends 7 mm above that line. Center it horizontally on the face or offset by the real port location.
  3. Cut. Extrude Cut through the wall, Extent wall + 1 mm or To Object (the inner cavity).

Part E: Snap-fit hooks in the lid#

The hooks live on the lid. Two hooks go on the long sides so the lid flexes along its short span.

  1. Create the Lid component. Activate the root, New Component named Lid.
  2. Lid plate. Sketch on a plane at the top of the base: use Offset Plane at distance base_h from XY (Construct > Offset Plane). Draw the same rounded rectangle (out_l, out_w, radius 4 mm). Extrude upward wall as New Body inside Lid.
  3. Rim. On the lid underside, sketch an offset loop inward from the outline by wall/2 - fit (0.8 mm). The band between the outline and this loop is the rim: it hangs from the plate underside and sits over the lowered outer half of the base lip (the tall inner half, 1 mm thick, stays fit clear of it). Select that band and extrude it 3 mm downward (the depth of the lip step) with Operation Join.
  4. Hook geometry. The cantilever hook sketch is drawn on the XZ plane (side view). Dimensions (general snap-fit guidance, not Autodesk data): arm thickness 1.2 mm, arm length 10 mm, hook protrusion 0.8 mm, lead-in angle 30 degrees, return face 90 degrees (flat) for strong retention. Draw this as a closed profile: arm rectangle 1.2 x 10, plus a triangular barb at the free end.
  5. Position. Locate the arm hanging from the plate underside, just inside the base's inner wall face (leave fit clearance) and centered along the long wall, with the barb pointing outward. Width of the arm 8 mm (extrude the profile 8 mm symmetric).
  6. Join and mirror. Use Create > Mirror (Pattern Type Features) on the hook about the XZ plane to put a hook on the opposite long side. Add a second pair near each end if you want four (parameters: positions at +/-18 mm).
  7. Catch windows in the base. Back in Base, sketch on the outer long wall and cut a rectangular window 9 mm wide and 1.4 mm tall at the height where the barb lands when the lid is seated: the barb is at the free end of the 10 mm arm, so the window bottom is at base_h - 10 mm (10 mm above the outer bottom); check with a section. Cut depth wall (through the wall thickness only).

Part F: Fit check#

  1. Assemble. The lid body was built in place, so its position already matches. Use Inspect > Interference with both components selected. Expect zero interference; if the barb intersects the wall, check the position of the catch windows.
  2. Section analysis. Inspect > Section Analysis through the long side (a plane normal to Y). You should see a gap of fit all around the rim.
  3. Appearance. Assign a matte plastic appearance in two colors (for example black for the base and white for the lid) for readability.

Checkpoints#

  • With pcb_l changed to 70 mm, both components resize and the standoffs stay on the corners; if they do not, your standoff points were dimensioned from the wrong reference.
  • Hook arm thickness at the root: 1.2 mm. Strain check (general engineering guidance): for a cantilever the permissible deflection is roughly 0.67 * strain_limit * L^2 / t; for PETG with a 2 percent limit, 10 mm length, 1.2 mm thickness this gives 1.1 mm, comfortably above the 0.8 mm barb. Verify numbers against your material.
  • Interference result is empty.
  • The USB cutout aligns with the board when you place a 1.6 mm slab (a fake PCB) on the standoffs.

Printing notes#

  • Print the base open side up and the lid with its plate on the bed so hooks print vertically as seen in the Z direction: the arm layers run along its length, which maximizes strength. If hooks print with layer lines across the arm they snap at the root.
  • Use 3 perimeters and 30 percent infill.
  • Print at 0.2 mm layer height; clearance fit of 0.2 mm works on tuned printers. If the lid is tight, increase fit to 0.3 mm and regenerate.

Variations#

  1. Replace snap hooks with two screw bosses in the lid.
  2. Add ventilation slots: a 1.5 mm x 12 mm slot pattern using Rectangular Pattern.
  3. Add an LED light pipe: a 3 mm hole in the lid with a 0.8 mm counterbore.
  4. Add a label recess: Emboss or a 0.4 mm deep cut for a sticker.
  5. Make an injection-mold version using draft 1.5 degrees and uniform 2 mm wall; see the plastic rules page.

Troubleshooting#

SymptomCauseFix
Shell failsFace selected is open or fillets too tightReduce corner radius or shell thickness
Hooks snap while assemblingToo thick or too shortRaise arm length or reduce thickness
Hooks too looseBarb protrusion smallRaise to 1.0 mm
Cutout misses the portWrong datum for heightMeasure from the board top, not the base floor
Components move as oneBoth bodies in same componentMove each body into its own component with drag and drop
Parameters show redUnit missingAdd mm after numbers
  • Lip, Groove and Snap Fit explains the hook formulas in more depth.
  • Shell, Draft and Scale describes shell options.
  • Mirror and Patterns for placing hooks.
  • Tutorial 7 builds a PCB-aware version of this enclosure.

Sources

Checked against these Autodesk help topics (opens autodesk.com):

Related pages