Tutorials PartCraft help Walkthroughs

Make toolpaths and G-code (Manufacture)

Set up stock and a work origin, choose tools, add face, pocket, contour, drill and chamfer operations by picking faces, simulate the stock for gouges and cycle time, and download G-code for Fanuc-style, GRBL or LinuxCNC controls.

Written for PartCraft 0.3. The same help is inside the app: press F1.

The Manufacture workspace turns the part into toolpaths for a 3-axis milling machine and writes them as G-code. It is 2.5-axis: the tool stays vertical, walls are cut straight down and floors flat. It needs the exact kernel (see The exact kernel and the mesh kernel).

Lab build: check every program in your control's own simulator, and run it in the air above the stock first.

Set up

  1. Choose Manufacture in the workspace switcher, then New setup.
  2. On the Setup tab choose:
    • Tool axis (+Z): which way the tool points into the part. World +Y (PartCraft's up) is the default; machine X is then world X and machine Y is world −Z.
    • Work origin (G54): a stock corner or centre, top or bottom, the model's top centre, or the model origin.
    • Stock: a box or a cylinder, either the model plus offsets (sides, top, bottom) or a fixed size.
    • Material (sets the starting feeds and speeds), the post (control), the machine's maximum spindle speed, rapid rate and tool change time, coolant and the program number.

Tools

The Tools tab holds the library: flat, ball and bull nose end mills, drills, chamfer mills and face mills, each with a T number, diameter, flutes and flute length (plus corner radius, point or chamfer angle where they apply).

Spindle speed and feed come from the material: n = 1000 × cutting speed / (π × diameter), feed = n × flutes × chip load (drills: n × feed per rev). The numbers are conservative starting values from published ranges, not tuned for your machine; type your tool maker's cutting speed, chip load, rpm or feed to override them. When the speed passes the machine's maximum it is held there and the feed follows, keeping the chip load.

Add operations

Each toolbar button adds an operation and, where it needs geometry, starts picking: click faces or edges in the view (click again to drop one), then Done picking or EscEsc.

OperationPickWhat it does
FacenothingZig-zag passes over the whole stock, past its edges, down to the model's top
Pocketa flat floor face, a round hole, or a closed chain of edgesClears the region in offset passes inside-out, at each step-down; islands (faces standing up inside the floor) are left; a floor open all round (nothing higher outside it) is cleared out to the stock edge
Contoura flat face (its outline), a round face, or edgesFollows the outline offset by the tool radius, outside or inside, with lead-in and lead-out arcs and optional tabs
Drillholes (click a hole's wall or its rim)Drills each hole with a canned cycle: peck (G83), drill (G81) or chip break (G73); or give a diameter to drill every hole of that size
Chamfera face's outline or edgesRuns a chamfer mill along the edge so it cuts the width you set

Select an operation in the list to change its tool, heights (clearance, retract, feed height, top, bottom), step-down, stepover, stock to leave, finishing pass, entry (helix, ramp or plunge), climb milling, tabs or cycle. Up and Down reorder, Suppress leaves it out, Delete removes it. Everything is in the undo history and saved in the part file.

A pocket's stepover is at most half the tool diameter, so every point of its floor lies within one tool radius of a pass. Inside corners keep the tool's radius.

Simulate

Toolpaths are made again after every change (the part's too). Simulate also shows the stock left after the whole program. The panel shows:

  • Cycle time: feed moves at their feed, rapids as straight lines at the setup's rapid rate, plus the tool change time. Real machines accelerate, so they take longer.
  • Gouges: places where the tool went more than 0.02 mm below the part's surface. Red marks show them in the view.
  • Stock left on the part.

The stock is a height map of the top (a Z-map), so it cannot show undercuts. Drag Playback to move the tool along the program. In the view, feed moves are solid and rapids dashed, one colour per operation.

Post the G-code

Choose the control under Post and press Download G-code (or Post on the toolbar):

ControlFileNotes
Fanuc-style ISO.nc%, O number, line numbers, T M6 with G43 H, canned cycles
GRBL.ncNo tool changer or canned cycles: a tool change pauses with M0, drilling is written as plain moves
LinuxCNC.ngcT M6 with G43 H, canned cycles, M2

Every file starts with comments for the program, stock, work offset and tools. Coordinates are in millimetres with 3 decimals. Toolpath CSV and Toolpath JSON export the moves themselves.

Limits

  • 2.5-axis only: no 3D roughing or finishing of curved faces (the flange's cone is left as steps), no adaptive clearing, no rest machining.
  • Holders and shanks are not checked for collisions; a warning appears when a cut is deeper than the flute length.
  • Feeds and speeds are starting values; there is no machine-specific post editor.