Skip to content
Back to skills

Cad Mechanical

ASecurity

Model dimensioned mechanical parts (brackets, enclosures, mounts, adapters, gears, replacement parts) as parametric CAD with build123d in Python, checked against the required dimensions and exported as STEP and STL.

  • 3 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added December 1, 2026
ai-agentspython

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 2 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Omerfaruk-aydn/Atlas-Agent --skill cad-mechanical --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cad Mechanical?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cad Mechanical
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/omerfaruk-aydn-cad-mechanical/badge)](https://www.skillsdirectory.com/skills/omerfaruk-aydn-cad-mechanical)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cad-mechanical
description: Model dimensioned mechanical parts (brackets, enclosures, mounts, adapters, gears, replacement parts) as parametric CAD with build123d in Python, checked against the required dimensions and exported as STEP and STL.
compatibility: Atlas native tools; Python 3.10+ with build123d (pip install build123d). Blender (blender tool) is optional, for looking at the result.
metadata:
  provenance: atlas-authored
---

# cad-mechanical

A mechanical part is defined by its dimensions and how it mates with other
parts, not by how it looks. Model it the way a mechanical designer does:
sketch, constrain with numbers, extrude, then add holes, fillets and
chamfers as features, all driven by named parameters. build123d is a
Python CAD library on the OpenCascade kernel; it produces exact solids
(B-rep) that export to STEP for any CAD program and STL for printing.

## Setup

Check `python -c "import build123d"`. If it is missing, ask before
installing (`pip install build123d`, about 200 MB with the kernel). The
checker is installed at `.atlas/cad/atlas_cad_check.py`.

## 1. Requirements (`.atlas/cad/brief.md`)

- Every functional dimension with its tolerance and what it mates with:
  "M5 clearance holes, 5.5 mm, on a 40 x 40 mm square", "slot for a 3 mm
  aluminium sheet, 3.2 mm", "bore for a 608 bearing, 22.0 mm H7".
- Material and process (machined, FDM, resin, laser-cut sheet): it sets
  minimum walls, radii, draft and clearances.
- Loads and where they act; the faces that locate the part.

## 2. Model parametrically (`part.py`)

```python
from build123d import *

# Parameters first: every number has a name and a unit (mm).
WIDTH, DEPTH, THICK = 60.0, 40.0, 5.0
HOLE_D, HOLE_PITCH = 5.5, 40.0
FILLET = 3.0

with BuildPart() as bracket:
    with BuildSketch(Plane.XY):
        RectangleRounded(WIDTH, DEPTH, FILLET)
    extrude(amount=THICK)
    with Locations((0, -DEPTH / 2 + THICK / 2, THICK)):
        Box(WIDTH, THICK, 30, align=(Align.CENTER, Align.CENTER, Align.MIN))
    with GridLocations(HOLE_PITCH, 0, 2, 1):
        Hole(HOLE_D / 2)
    fillet(bracket.edges().filter_by(Axis.X).group_by(Axis.Z)[1], radius=2)

part = bracket.part

import sys, os
sys.path.insert(0, os.path.join(os.getcwd(), ".atlas", "cad"))
from atlas_cad_check import check
check(part, name="bracket", size=(WIDTH, DEPTH, THICK + 30), tol=0.05,
      holes=[{"diameter": HOLE_D, "count": 2}], out="qa")
```

Rules of the craft:

- Sketch on the plane that carries the design intent; extrude, revolve,
  sweep or loft from it. Holes with `Hole`, `CounterBoreHole`,
  `CounterSinkHole` at `Locations`/`GridLocations`/`PolarLocations`.
- Fillets and chamfers last, selected by geometry (`edges().filter_by`,
  `group_by`, `sort_by`), never by index: indices change when the model
  changes.
- Inside corners of machined pockets get a radius at least the tool
  radius; printed parts get 45-degree chamfers instead of overhangs.
- Keep one solid; fuse features, and check every cut did not split it.
- Standard sizes: ISO metric clearance holes (M3 3.4, M4 4.5, M5 5.5, M6
  6.6), tapping holes (M3 2.5, M4 3.3, M5 4.2), counterbores (M3 6.5 x 3.3
  deep), bearing seats from the bearing's datasheet.

## 3. Check

Run `python part.py`. `ATLAS_CAD_QA` reports the bounding box, volume
(and mass in PLA), the cylinders found by diameter, validity, the number
of solids, and the checks you asked for; it writes `qa/<name>.step` and
`qa/<name>.stl`. Fix every failure. For a printed part, also run the print
QA on the STL in the blender tool: `exec` with
`bpy.ops.wm.stl_import(filepath="qa/bracket.stl")`, then `qa` with
`script: print` and `args: --unit mm`.

## 4. Look

Import the STL into the blender tool and `look` in `clay` from front34,
top and side (and `wire` to see the tessellation is fine), or render a
section. Check the features against the brief one by one.

## 5. Report

The parameters, every functional dimension with its measured value, the
checker's result, the files (STEP for CAD, STL for printing), and the
assumptions (tolerances chosen, standard sizes used).

Files in this skill

  • SKILL.md4 KB
  • assets/atlas_cad_check.py5.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.