dfam-check
earthtojake/text-to-cad
Measure mesh files against Design for Additive Manufacturing rules and report printability per process.
What is dfam-check?
Analyzes STL, OBJ, PLY, and 3MF files for additive manufacturing feasibility across FDM, SLS, SLA/DLP, metal PBF, and MJF processes. Use this before slicing or printing to identify wall-thickness violations, overhangs, support requirements, and build-orientation trade-offs.
- Measures wall thickness, overhang angles, and support volume from mesh geometry
- Compares measurements against process-specific design limits (FDM, SLS, SLA/DLP, metal PBF, MJF)
- Recommends build orientations to minimize support area and material cost
- Reports watertightness, scale/unit issues, and partial measurement gaps
- Provides concrete redesign instructions (target thicknesses, angles, locations) for failures
How to install dfam-check
npx skills add https://github.com/earthtojake/text-to-cad --skill dfam-check- Python environment with `requirements.txt` installed in the active project
- Target process name and material/machine datasheet (optional but recommended)
- Mesh file in STL, OBJ, PLY, or 3MF format; STEP/STP files must be exported to STL first
How to use dfam-check
- 1.Determine the target additive manufacturing process (FDM, SLS, SLA/DLP, metal PBF, or MJF) and gather material/machine specs if available
- 2.Run `python scripts/dfam_tool.py measure <file.stl> --angle-limit <degrees>` with the self-supporting angle from `references/process-limits.md` for your process
- 3.Review the JSON output for wall thickness, overhang, support volume, and watertightness measurements
- 4.Run `python scripts/dfam_tool.py orientations <file.stl> --angle-limit <degrees>` if supports are required to find build orientations that reduce support area
- 5.Compare each measured fact against the process limit, cite the source, and report findings as pass (✅), fail (❌), or need-more-info (❓)
- 6.For each failure, apply the concrete redesign instruction (e.g., thicken wall to X mm, chamfer overhang to Y°) and re-measure until all violations clear
Use cases
- Check whether a part design is printable before sending to a slicing tool or printer
- Analyze wall thickness and overhang violations in an STL and get specific redesign guidance
- Compare build orientations to reduce support material and print time
- Validate a mesh against a custom machine or material datasheet before manufacturing
- Identify trapped powder cavities or other process-specific geometry issues
- Additive manufacturing engineers and designers
- CAD/3D modeling professionals preparing parts for production
- Product developers iterating on printable designs
- Manufacturing teams evaluating part feasibility across multiple AM processes
dfam-check FAQ
No. This skill only measures geometry and compares it against design limits. It never slices, uploads files, or initiates printing. Use `$gcode` to slice after DfAM checks pass.
A partial report means one measurement family (e.g., wall_thickness) could not compute. Reinstall `requirements.txt` to ensure all dependencies are present, then re-run the measure command. Treat unmeasured facts as `❓ need more info` until the full report succeeds.
STEP files are CAD boundary representations, not meshes. Export an STL sidecar using the `$cad` skill first, then measure the STL here. Report that you need an STL export rather than attempting to parse the STEP directly.
The geometry's bounding-box diagonal suggests the file may be in meters or inches instead of millimeters. Confirm the correct units with the user before comparing any measurements against material limits, as all comparisons assume millimeters.
No. Powder processes do not require support-angle analysis. Instead, check for trapped powder cavities (enclosed voids that cannot escape powder during post-processing), which this tool does not yet measure—report that as `❓ need more info` if enclosed cavities are likely.
Full instructions (SKILL.md)
Source of truth, from earthtojake/text-to-cad.
name: dfam-check
description: Measure mesh files against Design for Additive Manufacturing (DfAM) rules and report printability findings per process (FDM, SLS, SLA/DLP, metal PBF, MJF). Use when the user asks whether a part is printable, wants overhang/wall-thickness/support analysis of an .stl, .obj, .ply, or .3mf mesh, wants a build-orientation recommendation, or wants DfAM redesign guidance before slicing with $gcode or regenerating geometry with $cad.
DfAM Check
Provenance: maintained in earthtojake/text-to-cad. Use the installed local skill files as the runtime source of truth; the repository link is only for provenance and release review.
Use this skill to produce conservative, evidence-backed DfAM reports for mesh files before slicing or printing. It measures geometry facts locally and compares them against per-process design limits; it never slices, uploads, or starts print jobs.
Geometry Inspection
Use scripts/dfam_tool.py in the active project Python environment for all
geometry facts (install requirements.txt first — every run needs it). The tool is fact-only:
it reports measurements and never emits pass/fail or readiness statuses.
Comparisons and verdicts belong to this workflow. Do not estimate wall
thickness, overhang angles, or support volume by eye or from renders when the
tool can measure them.
python scripts/dfam_tool.py measure part.stl --angle-limit 45
python scripts/dfam_tool.py orientations part.stl --angle-limit 45
Set --angle-limit to the target process's self-supporting angle from
references/process-limits.md before measuring, and re-run when the target
process changes: the aggregate support-area facts are binned against it.
STEP/STP input is boundary-representation CAD, not a mesh. When the $cad
skill is installed, export an STL sidecar with it first, then measure the STL
here. Report that remediation instead of attempting raw STEP parsing. measure
on a STEP exits 1 with {"error": "failed to load mesh: ..."}; that is the
wrong-input signal, not a missing dependency — do not install extra mesh
loaders to work around it.
A fact family that cannot compute returns {"error": ...} in its place rather
than costing the report its other measurements — wall_thickness does this when
the dependency set is incomplete, support_volume on geometry with no convex
hull. That report is PARTIAL: it carries "partial": true, names the families
in partial_sections, and the command exits 2 (0 is a complete report, 1 a
mesh that would not load at all). Treat every such object as an unmeasured fact
(❓ need more info), never as a measurement of zero, and reinstall
requirements.txt before comparing wall limits.
Workflow
- Collect print intent: target process, material, layer height, and any machine or material datasheet the user can provide. If the process is unknown, measure once with the default 45° limit, then present findings per candidate process rather than guessing a single verdict.
- Read
references/process-limits.mdand select the limit column for the target process. A user-provided machine/material datasheet overrides the defaults; cite whichever source is used for every comparison. - Run
measureon the exact upload file. Do not inspect only a generator script, source CAD model, or console summary of the file. - Run
orientationswhen the process requires supports and the measured support area is nonzero. Report any candidate that materially reduces support area, with its build-height tradeoff. - Compare each measured fact to the cited limit and report findings with
restrained status labels:
✅ pass: the measured fact satisfies the cited limit.❌ fail: a measured fact directly violates the cited limit.❓ need more info: missing process context, unmeasured geometry, sampling too sparse to trust, or tool limitations.
- Order findings by severity: watertightness first (blocks slicing for every process), then wall thickness, then overhangs/supports, then orientation and cost signals.
Comparison
Compare only trustworthy pairs of evidence.
- Cite the limit source (process-limits table row, or the user's datasheet field) and the measured fact (JSON field path) for every finding.
- Treat
p05_mmbelow the wall-thickness limit as a violation even whenmin_mmalone could be a sampling outlier; report both values. - On an assembly,
wall_thicknessreportsbody_countand aper_bodybreakdown. Attribute a violation to the body it belongs to; a thin figure pooled across bodies is not a finding against the part as a whole. - Do not apply support-angle findings to powder processes (SLS, MJF); the
relevant powder-process check is trapped-volume powder escape, which this
tool does not yet measure — report that as
❓ need more infowhen enclosed cavities are likely. - Do not silently rescale geometry.
scale.units_suspectis measured from the bounding-box diagonal: when it istrue, the source is probably in meters or inches, every down-facing face reads as resting on the plate, and overhang and support figures of 0.0 mean nothing. Report a unit/scale finding and ask the user to confirm units before comparing anything against a material limit. - Support-volume ratios are coarse upper bounds; report them as cost signals, not hard failures, unless the user has set an explicit budget.
Redesign Handoff
For every ❌ fail, include a concrete, plain-language redesign instruction
with target numbers (for example "thicken the wall at [12.4, 3.0, 8.1] from
0.6 mm to ≥1.2 mm" or "chamfer the overhang at [23.3, 10.0, 52.0] to ≥45°").
When the $cad skill is installed, offer to apply the redesign instructions
with it and re-measure the regenerated geometry here, repeating until no
❌ fail findings remain. When $cad-viewer is installed, hand the measured
file path(s) to it so the user can inspect the findings visually.
Related skills
More from earthtojake/text-to-cad and the wider catalog.

dxf
Generate and validate 2D DXF drawings from Python build123d sources for laser/plasma/waterjet cutting.

gcode
Generate and validate FDM G-code from 3D meshes using local slicer CLIs.

implicit-cad
Create browser-native implicit CAD models using GLSL signed-distance fields and raymarching.

render
Render CAD and robot files in CAD Explorer with review links and snapshots.

sdf
Author, validate, and hand off SDFormat robot models and worlds to simulators.

sendcutsend
Validate DXF and STEP/STP files for SendCutSend.com orders before upload.