Preparing Gcode in Fusion 360

Writing g-code by hand is not practical for anything more than simple lines and curves. To create complex movement from the Painter we need to use one of the many CAD options. Fusion 360 is a popular option and my favorite.

The basic idea is that we draw in a vector drawing program like illustrator or the free Inkscape program, import the drawing into Fusion 360 and output it as g-code. This page will focus on the Fusion 360 process. 

Setting Up the Canvas

The current version of our Painting Machine can handles up to (X) 1470mm by (Y) 860mm (58″ x 34″). For this example we will use a canvas size of 1000mm by 800mm with home at the center.

In Fusion 360:

  1. Create a new model design.
  2. Create a sketch on the XY plane.
  3. From the center point create a center-point rectangle 1000mm by 800mm.
  4. Turn the rectangle into construction lines.

This is the canvas size of our drawing.

Notes: This machine can be support a bed of 58″ by 84″. But do to Covid 19 I have it set up in my bedroom at a smaller size.

Import SVG

SVG is the file format most commonly used to output vector line drawings from Inkscape. 

  1. Choose Import > SVG and locate your .svg file from your computer.
  2. Scale the SVG file to the appropriate size for your canvas size.
  3. Place it on the canvas where you want to be.
Now you can close the sketch.

 

Notes: In this example I just drew another rectangle 200mm by 300mm. This is as if I imported a vector rectangle.

Switch to

Now switch from DESIGN to MANUFACTURE.

Click SETUP

  1. Under 2D select Trace (A five tab dialogue box will appear.)
The first tab is TOOL
  1. Select the smallest drill tool.
  2. Disable Coolant.
  3. Make sure the Cutting Feedrate is around 2400 mm/min
The second tab is GEOMETRY
  1. Select the curves that you want to draw.

The third tab is HEIGHT

  1. With the From set to Stock Bottom, set the Offset to “20”
  2. With the From set to Stock top, set the Offset to “10”
  3. With the From set to Model bottom, set the Offset to “0”
The fourth tab is PASSES
  1. Uncheck Chamfer
The fifth tab is LINKING
  1. Ignore
Click OK

Notes: This is where it can get complicated, but once you have created your first successful drawing you will be able save the setting and use them again, cutting out most of the difficulty.

The Height tab is the most critical settings. 

Remember, the g-code will find the tip of the marker 5mm above the canvas and this will be work zero. In other words, X0 Y0 Z0.

The cap will be off.

So the g-code needs to lower the head by 5mm when drawing and raise it by 5 when moving to another position. 

So we have 3 height setting to set.

The clearance height is the first height the tool rapids to on its way to the start of the tool path.

We will consider Stock bottom as if it were the Canvas. So we will set the Clearance height 10mm above the Stock bottom (canvas).

Simulate

Under ACTIONS select Simulate

  1. Use the Orbit tool to get a good view of the simulation.
  2.  Click the center arrow to start the simulation

Notes:
xxx

Generate Gcode

Under ACTIONS click Post Process

  1. Change the Program name or number

 

Notes:
xxx

XXX

Click SETUP > New setup to bring up the SETUP dialogue box.

Under Setup tab:

  1. Operation Type: Milling
  2. Orientation: Model orientation
  3. Origin: Model origin

Under Stock tab:

  1. Mode: Relative size box
  2. Stock Offset Mode: No additional stock

Post Process tap – no changes.

Click OK.

Under 2D, select Trace to bring up the Trace dialogue box.

Under Tool tab:

  1. Choose tool
  2. Disable Coolant
  3. Cuttingrate: 2400 mm/min

Under Geometry tab:

  1. Choose the lines to draw

Under Height tab:

  1. Clearance Height: Retract height: 0mm
  2. Retract Height: Stock Top: 10mm
  3. Feed height: Model top: 0mm

Under Passes tab: just uncheck Chamfer

Under Linking tab: change nothing

Click OK.

 

 

 

The third tab is HEIGHT

  1. With the From set to Stock Bottom, set the Offset to “20”
  2. With the From set to Stock top, set the Offset to “10”
  3. With the From set to Model bottom, set the Offset to “0”
  4.  

Notes:
The following are definitions from the mouse-overs in FUSION 360:

IN SETUP

The Z axis should point away from the XY canvas plane. The XY plane is usually the front. In Home model view, the Z should be pointing toward you down and to the left.

The clearance height is the first height the tool rapids to on it way to the start of the tool path.

The clearance height offset is applied and is relative to the clearance height selection in the above dropdown list.

Retract height sets the height that the tool moves up to before the next cutting pass. Retract height should be set above the Feed height and Top. Retract height is used together with the subsequent offset to establish the height.

  • Clearance height: incremental offset from the Clearance height.
  • Feed height: incremental offset from the Feed height.
  • Top height: incremental offset from the Top height.
  • Bottom height: incremental offset from the Bottom height.
  • Model top: incremental offset from the Model top.
  • Model bottom: incremental offset from the Model bottom.
  • Stock top: incremental offset from the Stock top.
  • Stock bottom: incremental offset from the Stock bottom.
  • Origin (absolute) absolute offset from the Origin that is defined in either the Setup or in Tool Orientation within the specific operation.

 

 

 

Notes:
This is the gcode that resulted from test 1:

: (PGM, NAME=”1001″)
; T1 D=4.762 CR=0 TAPER=90DEG – ZMIN=0 – SPOT DRILL
: G90 G40 G94
G17
G71
M26
; TRACE2
:T1 M6
S11999 M3
H0
G0 X-100 Y-150
Z10
Z0
G1 X100 F2402
Y150
X-100
Y-150
G0 Z10
G17
M26
G0 X0 Y0
M30
M2