Mechanical7 hours total3 h on the project

Mechanical Integration with FreeCAD

Move a board between electrical and mechanical CAD without losing information: derive the outline from the enclosure, check fit in 3D, and produce a mechanical drawing that a machinist or a printer can use.

Learning material0/27
Project0/16
Competence checklist0/7

Two ways in. Work the material, or if you already know this, go straight to the project and prove it.

How this skill is structured

  1. 1. Concepts — the ideas stated plainly, with the equations worth memorising.
  2. 2. Worked example — one real problem solved end to end, numbers included.
  3. 3. Tool demonstration — do the thing in a real open-source tool.
  4. 4. Resources — the specific free readings and videos, and what part of each to use.
  5. 5. Project — built alone, producing something a reviewer can check.
  6. 6. Competence checklist — what you must be able to do. This is also the audit rubric.

1. Concepts

Read these first. Tick each one when you could explain it to someone else without notes.

0/8

2. Worked example

Fitting a 50 x 40 mm board into a printed enclosure with a USB-C cut-out

ProblemA board must sit on four M2 standoffs inside a 3D-printed enclosure, with a USB-C receptacle accessible through a side panel cut-out. Determine the outline, hole positions and cut-out dimensions.

  1. 1
    Start in FreeCAD, not KiCad. Model the enclosure interior first: internal cavity dimensions, wall thickness, and the standoff positions.
  2. 2
    Choose the datum: the front-left internal corner of the cavity at the standoff seating plane. Every dimension in both tools references this point.
  3. 3
    Board outline: cavity internal size minus clearance. For a 3D-printed enclosure with typical FDM tolerance of +/-0.3 mm, allow 0.5 mm clearance per side. A 51 x 41 mm cavity therefore takes a 50 x 40 mm board.
  4. 4
    Mounting holes: M2 clearance hole is 2.2 mm diameter. Position them 3.5 mm in from each corner so the M2 screw head (typically 3.8 mm across) and washer clear the board edge and any components.
  5. 5
    Add a keep-out annulus around each hole in the mechanical model — 4 mm diameter is a reasonable default — and carry this into KiCad as a courtyard-level keep-out so no component is placed under a screw head.
  6. 6
    USB-C receptacle: find its datasheet's recommended panel cut-out. A typical vertical mid-mount or through-hole receptacle specifies a cut-out around 9.2 x 3.4 mm with radii, positioned relative to the board surface.
  7. 7
    Now the tolerance stack for the cut-out. Contributions: board outline tolerance +/-0.15 mm, board position within the cavity +/-0.5 mm (the clearance you allowed), connector placement tolerance on the board +/-0.1 mm (assembly), connector's own dimensional tolerance +/-0.1 mm, enclosure print tolerance +/-0.3 mm.
  8. 8
    Worst case sum: 0.15 + 0.5 + 0.1 + 0.1 + 0.3 = 1.15 mm in each direction. So the cut-out must be oversized by at least 1.15 mm per side relative to the connector body: 9.2 + 2.3 = 11.5 mm wide, 3.4 + 2.3 = 5.7 mm tall.
  9. 9
    That is a visibly loose cut-out. If cosmetics matter, reduce the stack: locate the board with dowel pins rather than clearance holes (removes the 0.5 mm), tighten the print tolerance, or make the cut-out part of a separate press-fit bezel that references the connector directly.
  10. 10
    Export the board outline and mounting holes from FreeCAD as a DXF, referenced to the chosen datum.
  11. 11
    In KiCad, File > Import > Graphics, import the DXF onto Edge.Cuts. Verify the imported size with the measurement tool — DXF unit errors (mm versus inches) are common and produce a board ten or twenty-five times the wrong size, which is obvious, or subtly wrong, which is not.
  12. 12
    Place the mounting holes at the imported positions and place the USB-C connector at its specified position relative to the datum.
  13. 13
    Lay out the board. Then export it: File > Export > STEP, with the origin set to the same datum.
  14. 14
    Back in FreeCAD, import the board STEP into the enclosure assembly. Now check: does every component clear the lid? Does the USB-C receptacle align with the cut-out? Do the screw heads clear the components? Use FreeCAD's measurement tools to find the minimum clearance and record it.
  15. 15
    Iterate. Expect at least two rounds. Then produce a TechDraw drawing of the board outline with dimensions and tolerances for the record.

AnswerMechanical defines the outline; KiCad imports it as DXF and exports the populated board as STEP for checking. The USB-C cut-out must be 11.5 x 5.7 mm to survive a 1.15 mm worst-case tolerance stack, which is loose enough that a dowel-pin location scheme or a separate bezel is worth considering if appearance matters.

3. Tool demonstration

Complete a full round trip: enclosure in FreeCAD, outline to KiCad, board back to FreeCAD, interference check, drawing.

0/15

Tool: FreeCAD with KiCad STEP export and DXF import

4. Resources

Free and, wherever possible, openly licensed. The note tells you which part to actually use — do not read them cover to cover.

0/4

5. Project — build this on your own

About 3 hours. This is the artifact that proves the skill. Work it without a walkthrough.

0/16

Take a board you have designed and integrate it into an enclosure you model yourself, completing the full round trip and producing both a verified 3D assembly and a dimensioned drawing.

Deliverables

Acceptance criteria — how you know it is good enough

If you want to push further

  • Install the KicadStepUp workbench and redo the round trip using it, comparing the workflow to the manual DXF/STEP process.
  • 3D print the enclosure and physically fit a board (or a printed board mock-up) into it, and report where the model and reality disagreed.

6. Competence checklist

Tick these honestly. If you are auditing this skill, this is your rubric — you should be able to demonstrate every line from the project you just built.

0/7
Tick every line above first — 7 remaining.