# How to Validate DXF/STEP Files for Manufacturing with the SendCutSend Skill

> Validate DXF/STEP files for manufacturing using the SendCutSend skill. Audit your designs for units, geometry, and material constraints to avoid order rejections.

- Repository: [earthtojake/text-to-cad](https://github.com/earthtojake/text-to-cad)
- Tags: how-to-guide
- Published: 2026-07-31

---

**The SendCutSend skill audits DXF and STEP files against SendCutSend.com manufacturing requirements, checking units, geometry, and material constraints to prevent order rejections.**

In the `earthtojake/text-to-cad` repository, the **SendCutSend** skill provides a pre-flight validation system for CNC manufacturing files. Whether you are preparing 2D laser-cut profiles or 3D routed parts, this skill inspects your CAD exports for geometry errors, unit mismatches, and service-specific tolerances before you upload to SendCutSend.com.

## Understanding the SendCutSend Skill

The SendCutSend skill is a specialized validator designed for the SendCutSend.com manufacturing service. It operates as an extension of the core CAD skill (`$cad`) referenced in [`skills/cad/SKILL.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/cad/SKILL.md), leveraging `build123d` to extract reliable geometry facts from source files.

Unlike generic CAD viewers, this validator applies conservative checks tailored to production realities. It never silently rescales geometry or suppresses errors; instead, it generates explicit pass/fail verdicts based on the specifications documented in [`plugins/cad/skills/sendcutsend/SKILL.md`](https://github.com/earthtojake/text-to-cad/blob/main/plugins/cad/skills/sendcutsend/SKILL.md).

## Validation Workflow

The validation process follows a six-step pipeline that inspects both 2D and 3D manufacturing files.

### File Loading and Geometry Extraction

For **STEP/STP files** (3D CNC routing), the skill invokes `build123d.import_step` to load solid geometry. For **DXF files** (2D laser cutting), it uses `build123d.ezdxf` to parse the drawing structure. This extraction captures bounding boxes, layer names, entity types, and contour data required for manufacturing analysis.

### Unit Verification

The validator inspects the DXF `$INSUNITS` header to confirm the drawing uses supported units. Valid codes are `1` (inches) or `4` (millimeters). If the header is missing or contains an unsupported value, the skill immediately flags a unit-scale error and advises re-export rather than attempting automatic conversion.

### Geometry and Manufacturing Checks

The skill performs service-specific validations depending on the file type:

- **Laser sheet cutting (DXF):** Verifies the profile is a single closed contour at 1:1 scale, detects open or duplicate contours, flags zero-area shapes, and identifies bend-line candidates and flange depths.
- **CNC routing (STEP):** Validates solid volume, material thickness suitability, and required tolerances for 3D machining.

These checks reference the template defined in [`plugins/cad/skills/sendcutsend/references/report-template.md`](https://github.com/earthtojake/text-to-cad/blob/main/plugins/cad/skills/sendcutsend/references/report-template.md).

## Running the Validation

You can execute validations via the command-line interface or programmatically through the Python API.

### CLI Validation for STEP Files

To validate a 3D part for CNC routing, run the following from the repository root with your virtual environment activated:

```bash

# Validate a STEP file for SendCutSend

cad sendcutsend --input my_part.step

```

This command loads the geometry via `build123d.import_step`, measures the bounding box and volume, and prints a JSON report to stdout. The report is also saved as [`my_part.sendcutsend.report.json`](https://github.com/earthtojake/text-to-cad/blob/main/my_part.sendcutsend.report.json) in the working directory.

### CLI Validation for DXF Files

For 2D laser-cut profiles, use the same CLI pattern with a DXF input:

```bash

# Validate a DXF sheet profile

cad sendcutsend --input sheet_profile.dxf

```

The skill checks the `$INSUNITS` header, validates layer integrity, and confirms the drawing represents a single, upload-ready profile without unsupported annotations or open paths.

### Programmatic Validation with Python

For integration into automated pipelines, import the skill module directly:

```python
from plugins.cad.skills.sendcutsend import sendcutsend

# Validate DXF and extract summary

report = sendcutsend.validate_dxf("sheet_profile.dxf")
print(report.summary())

# Validate STEP file

report = sendcutsend.validate_step("my_part.step")
print(report.summary())

```

The returned `report` object provides structured access to validation results, with the `summary()` method formatting findings consistently with the CLI output.

## Interpreting the Validation Report

The pre-flight report generated by the skill follows the structure defined in [`plugins/cad/skills/sendcutsend/references/report-template.md`](https://github.com/earthtojake/text-to-cad/blob/main/plugins/cad/skills/sendcutsend/references/report-template.md). It lists specific failures such as unit mismatches, open contours, or invalid geometry, alongside suggested fixes. A clear pass/fail verdict indicates whether the file is ready for upload to SendCutSend.com without risking production delays or order rejections.

## Summary

- The **SendCutSend skill** validates both 2D DXF and 3D STEP files against SendCutSend.com manufacturing requirements.
- It uses `build123d.import_step` for STEP files and `build123d.ezdxf` for DXF parsing to extract geometry.
- DXF validation requires the `$INSUNITS` header to be `1` (inches) or `4` (mm); unsupported units trigger explicit errors.
- The validator detects open contours, duplicate entities, zero-area shapes, and material thickness issues.
- Reports follow the template in [`plugins/cad/skills/sendcutsend/references/report-template.md`](https://github.com/earthtojake/text-to-cad/blob/main/plugins/cad/skills/sendcutsend/references/report-template.md) and are saved as JSON alongside the input file.

## Frequently Asked Questions

### Can the SendCutSend skill fix unit errors automatically?

No. The skill is designed to be conservative and will never silently rescale geometry. If the DXF `$INSUNITS` header is missing or set to an unsupported value, the validation fails with instructions to re-export the file with correct units.

### What DXF unit codes does SendCutSend support?

According to the source documentation in [`plugins/cad/skills/sendcutsend/SKILL.md`](https://github.com/earthtojake/text-to-cad/blob/main/plugins/cad/skills/sendcutsend/SKILL.md), only unit codes `1` (inches) and `4` (millimeters) are accepted for laser-cut profiles. Any other value results in a unit-scale error.

### How does the skill handle 3D STEP files differently from 2D DXF?

For STEP files, the skill validates solid volume and material thickness for CNC routing using `build123d.import_step`. For DXF files, it verifies closed 2D profiles, bend lines, and flange geometries using `build123d.ezdxf`, ensuring the file represents a single laser-cut sheet at 1:1 scale.

### Where is the validation report saved?

When using the CLI, the skill generates a JSON report in the working directory using the naming convention `{filename}.sendcutsend.report.json`. The report content follows the template structure defined in [`plugins/cad/skills/sendcutsend/references/report-template.md`](https://github.com/earthtojake/text-to-cad/blob/main/plugins/cad/skills/sendcutsend/references/report-template.md).