Manufacture (CNC)

The Manufacture workspace turns a part into toolpaths and G-code for a 3-axis CNC mill or router. It covers 2.5-axis work (flat faces, outlines, pockets and holes cut from the top), 3-axis machining of curved surfaces, and engraving round a shaft on a rotary 4th axis.

A finishing toolpath over a mounting bracket in the Manufacture workspace

Setup and stock

Choose the part in the panel. The stock is the part's bounding box plus a side margin and a top allowance. The part is machined from the top, along +Z. In the G-code, Z is zero at the top of the stock, and X and Y are measured from the front-left corner of the stock or from its centre. Set the same work origin on your machine before you run the program.

Tool library

Tools opens the library of flat end mills, ball end mills, V-bits, drills and taps. Each tool has a diameter, a spindle speed, a cutting feed and a plunge feed in mm/min. End mills also have a step-down (depth per pass) and a step-over (a fraction of the diameter); drills have a peck depth; taps have a pitch, and their feed is always the pitch for every turn of the spindle.

Speeds and feeds for a material: choose the stock material (aluminium, brass, mild steel, stainless steel, titanium, plastics, or wood and MDF) and your spindle's top speed, then Set speeds and feeds for this material. Every milling tool, drill and tap gets a speed from the material's cutting speed, a feed from a chip load suited to its size, and a depth of cut; small tools that would need more speed than the spindle has are held at its limit, with the feed reduced so the chip stays the same. The values are cautious starting points at the low end of what tool makers publish. Check your tool maker's recommendations, and reduce them for small or flexible machines. Ctrl+Z puts the old values back.

Flutes / stick-out are the cutting length of an end mill or drill and how far it sticks out of its holder. Every operation is checked against them: one that cuts deeper below the top of the stock than the tool sticks out warns that the holder would hit the part, and one deeper than the flutes warns that the shank would rub the walls. Left empty, typical lengths for the size are used (flutes 3 × the diameter for an end mill, 10 × for a drill, and a few millimetres of shank showing); measure your own tools and enter them for a check you can rely on.

Save as my tools keeps the library, with your speeds and feeds, material and spindle limit, as the set every new design starts with on this computer. Load my tools brings it into a design made before.

Operations

OperationWhat it does
FacingSkims the top allowance off the whole stock in a zigzag, down to the top of the part.
2D ProfileFollows the outline of the flat faces you pick, with the tool outside the outline, inside it, or on it. Turn on Cut through the part to cut it free from the stock. Through-cuts leave holding tabs (4 by default): small bridges of material, with a width and height you set, that keep the part attached so it can't move or fly out. Cut them with a knife or saw afterwards and file them flush. Set the number of tabs to 0 to cut the part completely free. Holes inside the face are profiled too.
PocketClick the floor of a pocket. The pocket is cleared in rings from the walls inwards, in equal depth passes, and the tool goes around any islands left standing in the pocket.
3D RoughClears material from curved parts in equal depth levels, leaving stock to leave (0.3 mm by default) on every surface, walls included, for finishing. Use a flat end mill. The Offset strategy (the default) cuts rings round the part at each level from the outside in, so the tool takes one step-over of material at a time and only cuts full width on the short step from one ring to the next, and it ramps into material at 3° instead of plunging; Raster cuts zig-zag rows.
3D Parallel finishRaster passes over the whole part with a ball end mill, following the surface exactly (drop-cutter on a fine height map of the part, to the tolerance you set). A step-over of about 10% of the ball diameter gives a smooth finish.
3D Waterline finishPasses at constant heights round the part, where the tool just touches it, climb milling, every height step (0.3 mm by default). Best on steep walls, where parallel passes spread apart; on shallow areas use a parallel finish.
Chamfer / deburrBreaks the top edges of flat faces with a V-bit: the outline, holes and pocket openings in one pass. Set the chamfer width; the tool runs just outside each edge at the depth that cuts that width (45° with a 90° V-bit). The V-bit must be wide enough for the chamfer.
Adaptive pocketChoose Adaptive as a pocket's strategy for high-efficiency clearing: a small step-over (0.15 × the tool diameter by default) at up to a tool diameter deep per pass, entered on a 3° ramp along the first ring instead of plunging, and linked from ring to ring without lifting. The cutter never takes a full-width cut.
Rotary engrave (4th axis)For a machine with a rotary A axis along X: draw the design flat in any sketch and it is wrapped round a shaft, with the sketch's X along the shaft and its Y round it as length on the surface (π × diameter goes once round), at a depth below the surface. The program writes X, A (degrees) and Z measured from the axis. Leave the diameter empty to use the part's.
EngraveFollows every line, arc and curve of a sketch at a set depth: text, logos imported from DXF, part numbers and decorative grooves. Put the sketch on the part's top face. With a V-bit, the line gets wider the deeper it goes, and the panel shows the width.
TapThreads holes drilled to the tap drill size (5 mm for M6 × 1). All holes picks every vertical hole of that size. The thread goes right through a through hole and stops a thread short of the end of a blind one, unless you set a thread depth. It is written as a rigid tapping cycle (G84, with M29 on Fanuc-style controls) with the feed at the pitch for every turn. Sinumerik, Heidenhain and GRBL programs leave tapping out, with a note in the program, rather than write moves that would break the tap. A new Tap or Drill operation starts with the tap or drill that fits the most holes in the part.
Helical boreClick the round wall of each vertical hole. An end mill spirals down round the hole at the pitch you set (climb milling, counter-clockwise from above), then makes one flat turn at the bottom to clean the floor and wall, so one tool cuts any hole bigger than itself. Blind holes more than twice the tool's width are opened up in rings from the middle outwards; through holes are bored at the wall only, and the middle drops out. Leave some stock if a reamer or finishing pass follows.
DrillClick the round wall of each vertical hole. Holes are drilled with full-retract pecking, and through holes are drilled past the bottom by the drill's tip. You get a warning if the drill doesn't match the hole size. When you post, drilling can be written as canned cycles (G81, or G83 peck drilling) for controllers that have them.

Operations run in the order shown in the panel. Use the arrows to reorder them, the eye to leave one out, and click an operation to change its tool and settings. Each operation shows its cutting distance and an estimated time.

Turning (lathe)

Set Machine to Lathe in the setup to turn a round part. The part turns about its Z axis with its top (+Z) facing the tool and the chuck holding the back; the bar is the part's largest diameter plus twice the side margin (or the diameter you give), with the front allowance in front to face. Ruffle3D reads the part's profile (its outside diameter along Z, and any bore at the front) from its shape, and refuses a part that is not round. A design keeps its milling operations while it is set to turn, and the other way round.

OperationWhat it does
FaceFaces the front of the bar down to the part, past the centre.
Turn roughPasses along Z at falling diameters, each stopping where the profile rises to meet it, then one pass along the profile, leaving the stock to leave (0.3 mm by default) for finishing. Set Turn to to stop short of the chuck.
Turn finishOne pass along the outside profile from the centre of the front face, with the tool's nose radius allowed for.
GroovePlunges into the grooves behind shoulders that turning from the front cannot reach, side by side at 80 % of the tool's width.
Drill on axisPeck-drills along the axis as deep as the bore at the front (or the depth you give).
Part offCuts the part off the bar at its back face.

Lathe G-code is Fanuc style: G18 with X as a diameter, Z0 at the part's front face, feeds per minute at a constant spindle speed, tools as T0101, T0202 and so on. Turning paths are for the tool nose's centre, so set the tip direction to 0 in the tool offsets (the program's header says so). Stock simulates the turned bar and shows what is left, cuts into the part and rapid moves into material, as for milling.

Simulating and G-code

Simulate plays the tool along its toolpaths. Stock cuts the stock with every toolpath (each tool by its shape: flat, ball, V-bit or drill point) and shows what is left: grey at the part's surface, blue to yellow for material left, thin to thick, and red where a toolpath cuts into the part. The panel gives the deepest gouge, any rapid move that would run into material, the most material left on the part (measured from its surface, so stock left on a wall counts as the thin skin it is) and the volume removed. 4th-axis work is not simulated.

Post asks for the machine:

  • Fanuc, LinuxCNC, Mach3 and similar: tool length offsets (G43 H, with the tool number) after each tool change, so set each tool's length in the control's tool table. Drilling can use canned cycles (G98 G83 with the hole depth, an R plane 0.5 mm above the hole and the peck from the tool library, then G80).
  • Haas: as above, with the % and O-number program frame and tool length offsets (G43 H) after each tool change.
  • Siemens Sinumerik: the control's own language, not its ISO mode: G71 for millimetres, ; comments and T1 D1 / M6 tool calls, drilling as plain moves (a .mpf file).
  • Heidenhain TNC: conversational (plain language) programs with numbered blocks, BLK FORM, TOOL CALL and L moves (a .h file).
  • GRBL: no canned cycles and no tool changer, so drilling is plain moves and the program stops (M0) for you to change tools.

Curves at one height are written as arcs (G2 / G3, or C blocks for Heidenhain), which makes programs several times shorter and lets the machine run them smoothly. An arc stays within 0.005 mm of the path, and none is longer than 150°. Fanuc-style and Haas programs use the R form, so they do not depend on how the control is set to read I and J; Sinumerik and GRBL use I and J. Turn off Write curves as arcs in the Post dialog to get straight moves only. Lathe programs and curves that change height are always straight moves.

Feed moves are drawn in teal and rapid moves as dashed red lines; the stock is outlined in orange. Simulate moves a tool along the whole program so you can check the order and spot anything unexpected. Post writes a program in millimetres with absolute coordinates, tool changes, spindle speeds, and drilling as canned cycles or plain moves, in the dialect of your control (see below).

Every program format is checked by reading the finished text back with a separate interpreter and measuring the part it would cut, but that is a test on a computer: Ruffle3D's G-code has not been proven on your machine. Always check new G-code in your machine's own simulator or with an air cut above the stock, and run the first part slowly.

Limits

  • Milling is from the top (+Z), and 3D operations can't reach undercuts. The 4th axis is used for rotary engraving only: there is no simultaneous 4th or 5th-axis milling.
  • Holding tabs are spaced evenly around the outer outline only; cut-outs inside the part drop free. A through profile cuts the outline and any openings that go right through; pockets that stop short are left alone, and the operation says so.
  • Stock simulation checks the tool against the part, not against fixtures or clamps.
  • Pockets, profiles and roughing ramp into the material (3° unless you set another Ramp angle), so any end mill can do them. Choose Entry: Plunge on a pocket or profile to go straight down instead. Facing starts outside the stock; drilling, engraving and finishing passes go straight down.

Free tools on this site

To look at a program away from Ruffle3D (one from another CAM program, or on a computer without it), drop it into the free G-code viewer. The speeds and feeds calculator works out spindle speeds and feeds from your tool maker's figures, chip thinning included.