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, finish the whole model in 3D (parallel, scallop), simulate the stock against the model for gouges and cycle time, and download G-code from one of the three built-in posts or one you edit yourself.
Written for PartCraft 0.11. The same help is inside the app: press F1.
The Manufacture workspace turns the part into toolpaths and writes them as G-code. Most operations are 2.5-axis milling: the tool stays vertical, walls are cut straight down and floors flat. 3D rough and Rest clear curved parts in 3D (3D roughing and rest machining); Parallel and Scallop finish them (3D finishing). On a machine with rotary axes any operation can have a tilted tool, and two operations move the rotary axes while cutting (4- and 5-axis machining). There are operations for a lathe (Turning) and for a touch probe (Probing). It works on the named faces the mesh kernel gives the part (see 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
- Choose Manufacture in the workspace switcher, then New setup.
- 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).
My tools can be saved in the browser and moved between computers as a file: see The tool library.
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.
| Operation | Pick | What it does |
|---|---|---|
| Face | nothing | Zig-zag passes over the whole stock, past its edges, down to the model's top |
| a flat floor face, a round hole, or a closed chain of edges | Clears 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 | |
| Adaptive | the same as Pocket | Clears the same region in passes that each cut a set width (Engagement, a fraction of the diameter), so the cutter never takes a full-width slot, even in corners; it goes in by a helix and finishes the walls at each level. Narrow cuts allow a deeper step-down and a higher feed |
| Contour | a flat face (its outline), a round face, or edges | Follows the outline offset by the tool radius, outside or inside, with lead-in and lead-out arcs and optional tabs |
| Drill | holes (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 |
| Chamfer | a face's outline or edges | Runs a chamfer mill along the edge so it cuts the width you set |
| Parallel | nothing (the whole model) | 3D finishing in parallel lines at any angle, following the surface with a ball, bull-nose or flat end mill. See 3D finishing |
| Scallop | nothing (the whole model) | 3D finishing in passes a set distance apart over the surface, so the ridge between them has the height you ask for |
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.
Adaptive clearing keeps the cutter's engagement near one value. An engagement of 0.15 of the diameter is an engagement angle of about 46°: the arc of the cutter's edge in the material. An offset pocket, by contrast, cuts full width on its first pass and wraps further round in every inside corner. Between passes the tool stays down where it moves through cut air, and lifts and comes down in cut air elsewhere. The passes are worked out on a fine grid over the region (cells about a twelfth of the tool radius), so the engagement can run up to about a cell wider than set; the walls are finished exactly. A big open region makes a long program with many short moves.
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.
With Show the simulated stock on, the stock is coloured against the model, cell by cell: green where it is on the model (within 0.02 mm), red where the tool cut into the model, and where stock is left on the model yellow for a thin skin, orange for more, fading to the grey of uncut stock at 1 mm or more. The colours are made again with every change, from the same height map as the numbers in the panel, so green and red agree with the Gouges line. A chamfer cuts into the model on purpose and shows red along its edge.
Post the G-code
Choose the control under Post and press Download G-code (or Post on the toolbar):
| Control | File | Notes |
|---|---|---|
| Fanuc-style ISO | .nc | %, O number, line numbers, T M6 with G43 H, canned cycles |
| GRBL | .nc | No tool changer or canned cycles: a tool change pauses with M0, drilling is written as plain moves |
| LinuxCNC | .ngc | T M6 with G43 H, canned cycles, M2 |
| Fanuc-style lathe | .nc | For turning programs: X as a diameter, feed per revolution, G96 under a G50 limit, G32 threading |
| LinuxCNC lathe | .ngc | For turning programs: G7 diameters, G95, G96, G33 threading; writes no homing move |
| Your own | any | A post you wrote or changed: Edit post…, New post…, Import post file… |
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.
Check the output in your machine's own simulator before cutting, and run it in the air above the stock first. The three built-in posts are starting points that follow the controls' documented behaviour; they have not been proven on any particular machine. A post you change is yours to prove. How to write one: Post processors.
Exact STEP for the shop
Under the G-code buttons on the Operations tab, Exact STEP (work coordinates) downloads <part>-work.step: the part as an exact solid (true cylinders for holes and bosses, true circles for their edges) with its origin at this setup's work origin and Z along the tool axis. Those are the coordinates the G-code uses, so a shop's own CAM program or checker lines the model up with the program without moving it. The file holds the part only, not the stock or the toolpaths.
Export › STEP AP242 (exact solid) writes the same solid in the part's own position (Z up): see Export for printing, STEP and DXF.
Limits
- Pockets, contours, drilling and chamfers are 2.5-axis. Curved parts are roughed and finished in 3D by their own operations (3D roughing and rest machining, 3D finishing). Adaptive clearing is 2D (flat floors).
- Tilted tools, 5-axis and 4th-axis finishing, turning and probing are there, each with limits of its own, and none of them has been run on a machine: see 4- and 5-axis machining, Turning and Probing.
- 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. A post is text you can edit, but it only decides how the moves are written; it cannot change the toolpath, add axes or know your machine (Post processors lists what it cannot do).
Send the program to a machine
In CadCraft Studio on the desktop, with a machine set up in Studio, Send to a machine… appears beside Download G-code and uploads the same program to the machine on your network. It is never started from PartCraft: start it at the machine when it is clear. In a browser the button is not shown (a web page cannot reach a machine on your network): download the program instead.