Plain-language guides to precision CNC manufacturing

Search

How CAM Software Turns Models into Toolpaths

cam software for cnc

Wondering what happens between your finished model and the spinning cutter? CAM software for CNC turns that model into toolpaths, and a post-processor translates them into G-code your machine’s controller can read.

Parts that cut well start with sound geometry, and the cnc design guidelines hub shows how design choices carry through to the toolpath stage.

Item Value
Post definition files bundled with MecSoft’s CAM plugins Over 300 files
Standard that MecSoft’s posted G-code follows ISO6983
File extension of MecSoft post definition files .spm
Edition date of the MecSoft post-processor guide March 2026
Stages in an eCAM NC program, header to footer 7 stages

These figures come from MecSoft’s RhinoCAM 2026 post-processor guide and the eCAM post-processor documentation. Software documentation changes between releases, so check the source before you rely on them.

What CAM software does between your model and the machine

CAM software sits between a finished design and the machine tool. You define operations on the model, and the software turns each one into a toolpath, the route the cutter follows. The eCAM documentation, for instance, shows a contour roughing operation, and the MecSoft guide walks through a deep drilling operation.

The chain from design to cut usually runs in four steps:

  1. You prepare the model and define operations such as contouring or drilling.
  2. The CAM software calculates a toolpath for each operation.
  3. A post-processor converts those toolpaths into G-code written for your controller.
  4. The controller reads the program and drives the machine.

Two earlier choices shape everything after them. The cutter you pick decides what the toolpath can reach, so the end mill selection guide is a good companion to this page. Once the code exists, the g-code basics guide explains what each line means.

How a post-processor turns toolpaths into G-code

The post-processor converts the toolpath operations you create into a format that your machine controller can interpret, according to MecSoft’s guide published in March 2026. The G-code it creates adheres to ISO6983, which the guide calls the international standard for numerical controls.

The post also tailors the output to a specific type of controller, with Haas, Fanuc, Mach3 and WinCNC named as examples. As of that March 2026 guide, MecSoft’s CAM plugins install with over 300 post definition files for a wide range of machines and controllers, as the RhinoCAM 2026 guide notes.

Those definition files use the .spm extension. The guide’s Post-Processor Generator lets you create and customize them, which matters when a shop’s machine needs a tweak the stock file does not offer (MecSoft, March 2026).

Why every controller needs its own dialect

The eCAM documentation puts the problem plainly: every controller has a slightly different dialect, so the generated G-code has to suit your machine. That statement comes from a page last updated on September 1, 2022.

Its template example shows the kinds of items a post has to get right:

  • The tool change block, which includes the M6 code.
  • The feed mode.
  • The spindle speed and spindle direction.
  • The work origin.
  • The coolant code.

Choosing the post that matches your controller is therefore part of job setup, not an afterthought. The same toolpath can be correct geometry and still fail at the machine if the dialect is wrong.

What a posted program looks like

The eCAM documentation treats an NC program as a sequence of seven stages, each with its own template:

  1. G-code header
  2. Tool change, for each operation
  3. Tool approach
  4. The list of movements that make up the toolpath, or in some cases macros such as drilling and tapping
  5. Tool disengagement
  6. Operation finalization
  7. G-code footer

A template is plain text with tag names inside curly brackets. The tag dictionary supplies the values, and together they produce the output G-code (eCAM).

Tag names follow a convention. A _CODE suffix means the value includes the letter and the number, while a _VALUE suffix means only the numeric part (eCAM).

In eCAM’s worked example, the tool change comes out as T15M6, followed by S2387M3, G54 and M8 for spindle, work origin and coolant, as the example output shows. Reading a posted file against its template is the fastest way to see where each line came from.

cam software for cnc Virtual reality
A woman in a black shirt wears a virtual reality headset against a dark background.

How do post-processors differ between CAM packages?

Each package hands toolpaths to its post in a different way. FreeCAD uses Python scripts to generate G-code, and it passes the list of operations to the script’s export function (FreeCAD CAM post documentation).

According to the same page, a FreeCAD post does this work itself:

  • It iterates through the operations and reads the underlying commands, such as G1 and G2.
  • It formats those commands into the string dialect the machine requires.
  • It must detect when the tool changes between operations and add its own tool change logic.
  • It represents probing moves as G38.2, which a machine-specific post must translate.

Fusion 360 works differently. Its post files are JavaScript based .cps files, and the engine calls handlers such as onLinear or onRapid for every single move, while FreeCAD gives the post the entire list of path commands upfront (FreeCAD documentation). The same page states that you cannot directly use Fusion 360 post processors in FreeCAD, so porting means rewriting the logic.

What to check before you run posted code

A post-processor is a translator, and translations deserve a read-through before the spindle turns. These checks follow from the sources above:

  • Confirm that the post you selected matches your controller’s dialect, since every controller differs slightly.
  • Read the header, the first tool change and the footer first, because those stages come from fixed templates.
  • Check that spindle, origin and coolant lines match what you set in the CAM operation.
  • If you edit a post, remember that FreeCAD’s documentation warns syntax errors might cause silent failures.
  • If you use probing, confirm the post produces the machine-specific cycle, as a ported post must intercept G38.2 and generate it.

Dry-run the program in simulation or in the air above the part where your setup allows it. The documentation can tell you how a post is built, but only your machine tells you whether the output is right.

Frequently asked questions

What is the difference between CAM software and a post-processor?

Show answer

CAM software creates the toolpath operations, while the post-processor converts them into G-code your machine controller can interpret, as described in MecSoft’s March 2026 guide.

Can I reuse a Fusion 360 post file in FreeCAD?

Show answer

Not directly. FreeCAD’s documentation says Fusion 360 post processors cannot be used as they are, because they are JavaScript based and FreeCAD posts are Python scripts, so the logic has to be rewritten (FreeCAD CAM post documentation).

Do all CNC controllers use the same G-code?

Show answer

Not exactly. MecSoft’s guide, published March 2026, says the G-code its posts create adheres to ISO6983, the international standard for numerical controls. Even so, eCAM’s documentation, last updated September 1, 2022, says every controller has a slightly different dialect, so the post must match your machine.

Can I customize a post-processor?

Show answer

Yes, in the packages covered here. MecSoft’s guide describes the Post-Processor Generator for editing .spm files (March 2026 edition), eCAM uses templates and tags, and FreeCAD uses Python scripts.