How aryansaraogi/dxfconvertor works
img2dxf turns raster artwork into millimetre-scale laser paths, with both a GUI preview/export workflow and a headless CLI. The GUI accepts artwork and settings, schedules the shared tracing pipeline, displays the resulting paths, then exports DXF or SVG; CLI uses the same engine for batchable conversion. Core stages include framing and image preparation, thresholding, contour geometry and sizing, finishing and machine-aware layout/order, then file writing. README capabilities such as calibration, saved jobs, photo tone layers and settings are represented where tree paths support them; unsampled wiring is not inferred.
Main entry points: pipeline.py Trace pipeline · app.py Desktop GUI · cli.py Command line · worker.py Trace worker
Components 25
User interfaces
- Desktop GUI
img2dxf/gui/app.py - Settings controls
img2dxf/gui/controls.py - Trace worker
img2dxf/gui/worker.py - Live preview
img2dxf/gui/preview.py - Command line
img2dxf/cli.py
Image to paths
- Trace parameters
img2dxf/params.py - Trace pipeline
img2dxf/pipeline.py - Image preparation
img2dxf/preprocess.py - Framing and scale
img2dxf/transform.py - Contour tracing
img2dxf/trace.py - Path geometry
img2dxf/geometry.py - Detail smoothing
img2dxf/detail.py - Path straightening
img2dxf/straighten.py - Arc fitting
img2dxf/arcfit.py
Laser preparation
- Kerf offset
img2dxf/kerf.py - Holding tabs
img2dxf/tabs.py - Sheet tiling
img2dxf/tile.py - Cut ordering
img2dxf/order.py
Export and persistence
- DXF writer
img2dxf/dxfwrite.py - SVG writer
img2dxf/svgwrite.py - Saved settings
img2dxf/settings.py - Recent files
img2dxf/gui/recent.py - Calibration output
img2dxf/calibrate.py
Other components
- Operator
- Laser software
Connections 29
- Operator → Desktop GUI: opens artwork
- Operator → Command line: submits job
- Desktop GUI → Settings controls: edits settings
- Settings controls → Trace parameters: builds parameters
- Command line → Trace parameters: builds parameters
- Desktop GUI → Trace worker: requests trace
- Trace worker → Trace pipeline: runs trace
- Command line → Trace pipeline: runs trace
- Trace pipeline → Framing and scale: frames and scales
- Trace pipeline → Image preparation: prepares pixels
- Trace pipeline → Contour tracing: traces masks
- Contour tracing → Path geometry: creates paths
- Trace pipeline → Detail smoothing: smooths paths
- Trace pipeline → Path straightening: straightens paths
- Trace pipeline → Kerf offset: offsets paths
- Trace pipeline → Arc fitting: fits arcs
- Trace pipeline → Sheet tiling: duplicates paths
- Trace pipeline → Cut ordering: orders cuts
- Trace worker → Desktop GUI: returns result
- Desktop GUI → Live preview: renders result
- Live preview → Holding tabs: shows tab gaps
- Desktop GUI → DXF writer: exports DXF
- Desktop GUI → SVG writer: exports SVG
- Command line → DXF writer: writes DXF
- Operator → Saved settings: saves job
- Desktop GUI → Recent files: updates history
- Operator → Calibration output: generates test
- DXF writer → Laser software: provides drawing
- SVG writer → Laser software: provides drawing