CAD ENGINE // SOBEL GRADIENT + MARCHING SQUARES → AUTOCAD R12 DXF MILLIMETER SCALED · ZERO CLOUD UPLOADS
DXF PNGtoDXF CAD Foundry
PNGtoDXF CAD Foundry // TECHNICAL MANUAL

How to Convert PNG to DXF for Laser Cutting and CNC

Complete shop guide to turning PNG images, scanned gaskets, and sketches into accurate millimeter-scaled AutoCAD R12 DXF files ready for CAM.

Turning Raster Blueprints Into Accurate CNC Toolpaths

Whether you scanned a torn paper engine gasket on a flatbed scanner, photographed a wooden template, or downloaded a decorative steel gate silhouette as a PNG, getting clean geometry into CAM software requires three things: clean contrast, continuous stitched contours, and true physical scale.

Step-by-Step Shop Workflow

Step 1: Capture or Prepare High-Contrast Input

  • Flatbed scan beats phone camera: When copying a real gasket or bracket, place it on a flatbed scanner next to a steel ruler. Flatbed optics eliminate perspective keystone distortion.
  • Avoid shadows if shooting by phone: Place dark parts on backlit white paper or bright parts on matte black poster board, shoot straight down from 1 meter away with 2× zoom to minimize lens barrel distortion, and crop tight to the bounding box of the part.

Step 2: Choose Silhouette vs Sobel Mode

Open the PNG to DXF Converter and load your file:

  • Solid Silhouette treats dark regions as solid material and runs Marching Squares along the exact iso = threshold contour. Every bolt hole and outer flange produces one single closed perimeter polyline—exactly what laser and plasma cutters expect.
  • Sobel Edge Gradient calculates horizontal and vertical intensity derivatives (Gx, Gy) to extract edge ridges from line drawings and grayscale photos. Note that thick black lines traced in Sobel mode produce double outlines (left edge + right edge of the stroke).

Step 3: Calibrate Physical Millimeter Width

Measure the widest horizontal span of your actual scanned object (or desired final sign width) with digital calipers and enter that value into Target Physical Width (mm). Because our converter outputs $INSUNITS = 4 (mm) and scales both axes identically, circular bolt holes remain strictly circular with zero aspect ratio skew.

Step 4: Verify Cut Path Telemetry & Import Into CAM

Before cutting expensive aluminum or walnut:

  1. Check CAD Dimensions (W × H mm) to confirm overall stock clearance.
  2. Check Cut Path Length to estimate laser cycle time (e.g., 1200 mm at 15 mm/s ≈ 80 seconds).
  3. Import the .dxf into LightBurn, Fusion 360, or QCAD and verify one critical bolt-hole diameter with the CAD measure tool.

Step 5: Going From 2D Profiles to 3D Parts

Once your 2D profile is imported into Fusion 360 or FreeCAD, extrude the closed POLYLINE sketch to your sheet thickness for 3D assemblies—or skip manual extrusion on organic shapes by generating a 3D mesh directly from your PNG on Pixal3D.ai.

Frequently Asked Questions

Why does my Sobel trace create double lines around thick strokes?

A Sobel gradient peaks wherever pixel brightness changes sharply—once entering a thick dark line and once exiting it. For filled shapes and bold logos, switch Detection Mode to Solid Silhouette for clean single-wall contours.

Can I import the DXF into Fusion 360 and extrude it?

Yes. Use Insert → Insert DXF in Fusion 360, select millimeters as the unit, and every closed POLYLINE loop on the CUT_CONTOUR layer becomes a selectable sketch profile ready to extrude.