This project provides a comprehensive suite of utilities designed to automate the creation, transformation, and conversion of files for CNC machines. It streamlines the workflow from engineering designs to machine-ready programs, particularly focusing on the crucial step of converting Tekla Structures (NC1) files into DXF, and subsequently into various CNC machine formats (.txt, .g, .nc, .cnc, .tap, .wkf, etc.). The utilities also facilitate the adjustment of files for specific CNC machines, including those from Hypertherm, ensuring optimal compatibility and performance. Furthermore, it supports integration with nesting software like Pronest for optimized material utilization. Our tools ensure precision, reduce manual effort, and enhance compatibility across diverse CNC controllers and equipment.
This project provides two main utilities for engineering file processing:
- wkf-rotator.exe β Rotate WKF files by 90, 180, or 270 degrees using a graphical window.
- wkf-creator.exe β Convert DXF (AutoCAD) files to WKF format (supports only LINE and CIRCLE entities).
- pronest-helper.exe β Utility for adjusting NC files for specific Hypertherm post-processors (e.g., MicroEdge Pro).
- Convert_DSTV2DXF.dll β Example of converting Tekla Structures DSTV files to DXF.
nc-helper-go is designed to assist engineers, technologists, and CNC operators in preparing, converting, and post-processing files for CNC equipment. The toolkit supports workflows for:
- Converting engineering drawings (DXF, DSTV, etc.) to machine-ready formats (WKF, DXF, etc.)
- Rotating, normalizing, and validating geometry for compatibility with specific CNC controllers
- Batch processing and integration with Windows context menu for fast file operations
- Supporting both simple (rectangular) and complex (arbitrary polygonal) part geometries
- DXF to WKF conversion with correct home calculation and contour ordering
- WKF rotation with GUI angle selection and home-aware transformation
- DSTV (NC1) to DXF conversion using Tekla DSTV2DXF integration
- Context menu integration for one-click file processing in Windows Explorer
- Support for both metric and imperial workflows
- Extensible architecture for adding new file formats and CNC post-processors
- Sheet metal, plate, and profile cutting
- Automated preparation of drilling, milling, and punching programs
- Rapid conversion of engineering drawings to CNC-ready files
- Batch conversion and rotation of part files for different machine setups
nc-helper-go/
ββ cmd/
β ββ wkf-rotator/ # main.go for WKF rotation
β ββ wkf-creator/ # main.go for DXF β WKF
ββ internal/
β ββ wkf/ # rotate.go β functions for coordinate rotation
β ββ dxf/ # parse.go β functions for DXF parsing
ββ bin/ # Third-party tools (e.g., Tekla DSTV2DXF)
ββ post/ # Archives with Postprocessors for specific CNC models
ββ abstract/ # Mathematical and formal algorithm descriptions
ββ Makefile # build commands
ββ go.mod # Go dependencies
- Install Go 1.18+ (https://golang.org/dl/)
- Install dependencies:
make install
- Build the desired utility:
- For DXF β WKF:
make dxf2wkf
- For WKF rotation:
make rotate-wkf
- For DXF β WKF:
This will produce wkf-creator.exe and wkf-rotator.exe in the project root.
- Run the exe with the path to a WKF file as an argument.
- A window will prompt for the rotation angle (90, 180, 270).
- A new file with the suffix
_90DEG.wkf,_180DEG.wkf, or_270DEG.wkfwill be created in the same folder.
- Run the exe with the path to a DXF file as an argument.
- A
.wkffile will be created in the same folder.
- Create a
wkf-rotate.batfile:@echo off start "" "%~dp0wkf-rotator.exe" "%~1"
- Create a reg file (e.g.,
ctx-cmd-rotator.reg):Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\SystemFileAssociations\.wkf\shell\ΠΠΎΠ²Π΅ΡΠ½ΡΡΡ WKF] @="ΠΠΎΠ²Π΅ΡΠ½ΡΡΡ WKF" "Icon"="%SystemRoot%\\System32\\imageres.dll,194" [HKEY_CLASSES_ROOT\SystemFileAssociations\.wkf\shell\ΠΠΎΠ²Π΅ΡΠ½ΡΡΡ WKF\command] @="\"D:\\wkf-rotate.bat\" \"%1\""
- Specify the absolute path to your
wkf-rotate.bat.
- Specify the absolute path to your
- Save the reg file in UTF-16 LE encoding and apply it by double-clicking.
- Create a
dxf2wkf.batfile:@echo off start "" "%~dp0wkf-creator.exe" "%~1"
- Create a reg file (e.g.,
ctx-cmd-creator.reg):Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\SystemFileAssociations\.dxf\shell\Π‘ΠΎΠ·Π΄Π°ΡΡ WKF] @="Π‘ΠΎΠ·Π΄Π°ΡΡ WKF" "Icon"="C:\\Windows\\System32\\imageres.dll,226" [HKEY_CLASSES_ROOT\SystemFileAssociations\.dxf\shell\Π‘ΠΎΠ·Π΄Π°ΡΡ WKF\command] @="\"D:\\dxf2wkf.bat\" \"%1\""
- Specify the absolute path to your
dxf2wkf.bat.
- Specify the absolute path to your
- Save the reg file in UTF-16 LE encoding and apply it by double-clicking.
- For correct reg file operation, use absolute paths and UTF-16 LE encoding.
- For hidden execution, use a PowerShell or VBS wrapper (see discussion above).
- To remove a menu item, delete the corresponding registry keys.
This project is licensed under the MIT License.
nc-helper-go streamlines the path from engineering drawing to CNC machine, reducing manual work and minimizing errors in file preparation for a wide range of controllers and equipment.