CAD/CAM Tools is a Visual Studio Code extension for working with drawings, 3D models, CAM projects and NC programs. It connects VS Code to MiniCAD and Easy G-Code Plot (EGP), allowing engineering workflows to be run directly from the workspace.
The extension uses the local MiniCAD and EGP executables. Geometry calculations, toolpath generation and G-code analysis are performed by those applications. Commands work offline.
Getting started
- Open a trusted workspace in VS Code.
- Run CAD/CAM: Configure MiniCAD and EGP to select a CLI or desktop executable, or enter its path in Settings under
cadcam. The CLI executables can also be resolved from PATH.
- Open the Command Palette (
Ctrl+Shift+P) and type CAD/CAM:.
- Select a command and follow the prompts to choose input files, parameters and output paths.
File-based commands are also available from the Explorer context menu. A selected file is assigned to the first compatible, unsupplied input field in the preset declaration order; later inputs are prompted separately. Save changes to input files before running a command.
The command palette, settings, dialogs, and built-in presets are available in English and Russian. VS Code selects the language from its display settings.
Select the cube in the Activity Bar to open CAD/CAM. Use the filter above the commands to find an operation. Selecting a command opens the same prompts as the Command Palette. The gear opens the extension settings.
Run History keeps the latest 30 runs from the sidebar, Command Palette, Explorer and Chat in the current workspace after VS Code restarts. Expand a run to open its output folder or up to 30 listed results, or read its error. Clear Run History removes the recorded runs and keeps the generated files on disk.
In Custom Scenarios, choose Add Scenario, enter a name, and fill in the JSON in the normal VS Code editor. Each editor contains one preset object (not the enclosing version/presets object). Keep the generated id unchanged. The new scenario is stored in the workspace's .cadcam/scenarios.sqlite3 database and appears in the list immediately, even with an empty steps array. Use Save (Ctrl+S) to validate and store edits. Add at least one step before running the scenario. Choose Edit Scenario to reopen its JSON, or click the scenario itself to run the last saved definition. Delete Scenario and Clear Scenarios remove saved definitions. In a multi-root workspace, each folder has its own database. Existing presets from the configured cadcam.presetsPath are imported by the existing SQLite migration; editing scenarios does not write to that file.
Commands
All commands use the CAD/CAM: prefix.
CAD and 3D
| Command |
Description |
| Inspect Drawing |
Inspect drawing geometry and properties. |
| Create Drawing |
Create a drawing from a JSON CAD recipe. |
| Apply CAD Recipe |
Apply a recipe to an existing drawing or project. |
| Generate Dimensions |
Generate coordinate dimensions, a dimension table, or both. |
| Render Drawing |
Export a drawing or selected sheet as SVG. |
| Create 3D Model |
Create a model from a JSON scene recipe with primitives or STEP/STL sources. |
| Inspect 3D Model |
Display scene or body properties in a JSON report. |
| Export 3D Model |
Export a scene or selected body as STEP or STL. |
| Transfer 3D to CAM |
Transfer a scene body to a CAM project. |
CAM
| Command |
Description |
| Generate CAM Operations |
Generate machining operations from a CAM recipe. |
| Regenerate Toolpath |
Recalculate saved machining operations. |
| Calculate Stock Removal |
Generate a stock-removal report. |
| Postprocess |
Generate an NC program using the saved Setup or a selected postprocessor. |
| Run MiniCAD Command |
Run a MiniCAD command with custom arguments. |
G-code
| Command |
Description |
| Analyze G-Code |
Generate a JSON analysis report. |
| Export NC |
Export an NC program in expanded or full mode. |
| Export DXF |
Export toolpath geometry as DXF. |
| Batch Analysis |
Analyze NC programs in a directory. |
| Batch Export |
Export NC programs or DXF toolpaths in a directory. |
| Simulate NC |
Launch simulation in EGP, with optional stock and tooling data. |
| Run EGP Command |
Run an EGP command with custom arguments. |
Workflows and results
| Command |
Description |
| Run Preset |
Run a sequence of engineering operations. |
| Open Result |
Open a file generated during the current extension session. |
| Configure MiniCAD and EGP |
Select the CLI or desktop executable for either application. |
Workflows
Use CAD/CAM: Run Preset to select a built-in workflow.
| Preset |
Result |
| CAD recipe → DXF → SVG |
DXF drawing and SVG preview from a CAD recipe. |
| 3D recipe → model → STEP |
STEP model and geometry report from a 3D scene recipe. |
| Drawing → 3D model → STEP |
STEP model from closed DXF profiles, extruded to the chosen thickness. |
| 3D scene → CAM project |
CNC project with reference geometry from a selected scene body. |
| Drawing → CAM → NC |
CAM project and FANUC NC program from a drawing and CAM recipe. |
| NC → EGP analysis |
JSON report for an NC program. |
| MiniCAD CAM → NC and stock → EGP simulation |
NC program and stock-removal simulation from saved CAM operations. |
For example, use CAD recipe → DXF → SVG to create a drawing, then use Drawing → CAM → NC with the generated DXF and a CAM recipe. Open the resulting CNC project with MiniCAD CAM → NC and stock → EGP simulation to inspect the machining process in EGP.
Custom workflows are defined as individual JSON objects in the Custom Scenarios editor. Workflow steps run in sequence and stop on the first error. Completed results remain available.
Results
The CAD/CAM output channel shows command output, diagnostics, exit codes and result paths. Running commands can be cancelled using the progress notification.
The save dialog starts in the working directory. For presets with several outputs, enter one output folder and the preset writes its files there. Use cadcam.outputDirectory to set another default. Choose a new filename or destination when a result already exists. EGP batch export requires a new destination outside the input folder.
Use CAD/CAM: Open Result to open a generated file. NC, JSON, SVG, CSV and HTML files open in the VS Code editor. DXF, DWG and CNC files open in MiniCAD if configured, or through the system file association. STEP and STL files use the system file association. Machining simulations open in EGP.
Settings
Search for cadcam in VS Code Settings.
| Setting |
Description |
cadcam.minicad.cliPath |
MiniCAD CLI path. The default CLI on PATH is minicad_cli. |
cadcam.egp.cliPath |
EGP CLI path. The default CLI on PATH is easy_gcode_plot_cli. |
cadcam.minicad.guiPath |
MiniCAD desktop executable for opening drawings and CNC projects. |
cadcam.egp.guiPath |
EGP desktop executable for simulations with an explicitly selected machine language. |
cadcam.workingDirectory |
Working directory. Defaults to the workspace folder. |
cadcam.outputDirectory |
Default results directory. An empty setting uses the working directory. |
cadcam.presetsPath |
Legacy preset file for import into the scenario database. Defaults to .cadcam/presets.json. |
Executable settings accept either a path string or a launcher object with path (required), args (optional array of strings) and cwd (optional working directory). For example, {"path": "python", "args": ["-m", "app"], "cwd": "${workspaceFolder}/tools"}. Paths in settings are relative to the workspace folder. Relative request inputs, outputs, native arguments and outputDirectory are resolved from the requested cwd (relative to workspaceFolder), or cadcam.workingDirectory if no cwd is supplied. A preset's explicit step directory or a configured launcher cwd controls relative native tokens within that step; explicit request paths in preset fields are resolved before that override.
Catalog operations and presets always require new output paths, even if a custom preset includes --overwrite in a step. To replace an existing output, use a native command with --overwrite where the native CLI supports it.
Chat
The same commands are available in VS Code Chat in Agent mode. Describe the task in natural language, for example "postprocess part.cnc with the saved Setup" or "create a STEP model from plate.dxf, 10 mm thick", and the assistant selects and runs the matching command. Use #cadcamListCommands to ask for the commands and their fields, and #cadcamRunCommand to run a specific command. Chat uses the same settings and result handling as the command palette.
Chat support requires a chat that can use VS Code language model tools, for example GitHub Copilot Chat in Agent mode.
Noninteractive VS Code requests are restricted to open workspace folders and the configured output directory; workspaceFolder must be within an open workspace. The LM run tool shows a VS Code confirmation dialog with the planned output paths before running. Scoped raw commands require known catalog arguments so that file paths can be checked. For standalone CLI calls, use --restrict-workspace before list or run to restrict paths to the current directory. These checks are not an OS sandbox: native applications retain their usual filesystem permissions, including paths referenced inside recipes and their own settings.
Requirements and limitations
- VS Code 1.100 or later on Windows or Linux. macOS is not tested or officially supported.
- Local MiniCAD and EGP executables for their respective commands.
- A trusted VS Code workspace.
- Automatic stock and tooling exchange between MiniCAD and EGP supports FANUC milling projects with saved Setup, stock bounds, tools and machining operations in the WCS.
- Existing milling and turning simulation manifests can be used with Simulate NC.
- A successful simulation launch does not indicate that playback has completed. Check the simulation in EGP. Simulation does not replace verification on the actual CNC machine.
License
MIT License - See LICENSE for details