Using JScut to Generate Gcode

One of the easiest ways to generate gcode is with a free web-based app by Todd Fleming called JScut. You can access it here: http://jscut.org 

I am in the process of forking this GitHub repository so I can customise it for the REMOte Painter.

It is my opinion that JScut will be the way we create all the gcode for the REMOte Painter. The exception will be when we need special mathimatical patterns that only Sandify can create.

The way JScut works we upload an SVG file, choose a configuration file, ajust a setting or two, generate the gcode and download it to your computer. The configuration files can be associated with a specific tool which should make the process quite painless. We might even be able to download the gcode directly into OctoPrint.

The only negative is that we can’t generate the gcode directly from Inkscape.

Estabishing Tool Settings

Tool Settings for a Shape Operation

The first step is to set the parameters to use JScut with the REMOte Painter. Once we make all the changes we can save these specific setting in the browser. Most if not all these setting will be true for both the Line and shape operations. So I believe we will need separate setting for a line; and maybe for each tool.
 
Lets start by estabishing setting for a marker with a diameter of 2mm.
 

In Operations

  • Choose the appropriate px per inch: 96,
    (Note: this is for late version of Inkscape.)
  • Click the Create Operation button,
  • Choose Pocket,
  • Depth: 1,
  • Make sure there is a check mark in Enabled.

In Tool (shared for all operations)

  • Units: mm
  • Diameter: 2mm
  • Angle: 180 degrees
  • Pass Depth: 1
  • Step Over (0,1): .5
  • Rapid (mm/min): 20000
  • Plung (mm/min): 10000

In Materials:

  • Click Make all mm
  • Thickness: 0
  • Z Origin: Top
  • Clearance: 30

In Curve To Line Conversion leave as is:

  • Minimum Segments: 1
  • Minimum Segment Length (inch): 0.01

In Gcode Conversion

  1. Gcode Units: mm
  2. Do not click Zero lower left
  3. Return to 0,0 at end: check
  4. X Offset: 0
  5. Y Offset: 870

With these parameters selected:

  • Go to the top of the page and click Save Setting
  • Give your settings a name: 2mm Marker – ShapeTool for REMOte Painter
  • Click the In Browser button.

Now, whenever you open JScut you don’t have to remember these setting for a 2mm shape operation, you just choose them before starting an operation.

Concept: A shape is created by drawing the outline and filling in with slightly smaller shapes until you reach the center. The thickness of the marker will determine how many outline offsets will be needed.

This Example: For this example we will create a solid vertical oval 100mm tall and 50mm wide. It will be 50mm from the X and Y work coordinateds. The thickness of the marker is 2mm. The example was created in Inkscape and converted into a path.

Y Offset Note: When we put 870 in the Y Offset we are essentially reversing the Y coordinates. This places the Machine 0,0 in the bottom left corner of the canvas.

Changes to JScut interface:

Creat Operation >>> Create Tool

Pocket >>> Shape

Depth >>> Pressure

Thickness >>> Canvas Thickness

Clearance >>> Safe Travel

Remove Zero lower left

Hard code 870 into Y Offset?

 

Tool Settings for a Line Operation

The next operation will be a line tool.
 

In Operations

  • Choose the appropriate px per inch: 96,
    (Note: this is for late version of Inkscape.)
  • Click the Create Operation button,
  • Choose Engrave,
  • Depth: 1,
    (the depth can be pressure if tool has spring)
  • Make sure there is a check mark in Enabled.

In Materials:

  • Click Make all mm
  • Thickness: 0
  • Z Origin: Top
  • Clearance: 30

In Curve To Line Conversion leave as is:

  • Minimum Segments: 1
  • Minimum Segment Length (inch): 0.01

In Gcode Conversion

  1. Gcode Units: mm
  2. Do not click Zero lower left
  3. Return to 0,0 at end: check
  4. X Offset: 0
  5. Y Offset: 870

With these parameters selected:

  • Go to the top of the page and click Save Setting
  • Give your settings a name: Line Tool for REMOte Painter
  • Click the In Browser button.

Now, whenever you open JScut you don’t have to remember these setting to create a line operation, you just choose.

Notes to Self: I don’t think we will need different tool widths for the line tool. One should work for all line widths.

Changes to JScut interface:

Engrave >>> Line

Depth >>> Pressure

 

 

Steps to Generate Line or Shape Gcode

Now that you have the tools settings defined, the process for generating gcode is much simpler.

Access JScut

  • Go to http://jscut.org/jscut.html 
  • Upload an .svg file (Open SVG)
  • Select a tool (Open Setting)
  • Click the generate link
  • Run the simulator (optional)
  • Save the Gcode

Notes to Self: Once we have control of the interface we can change the Operation names to better suit the intent of the Painting machine.

Shape Exception: if the diameter of the shape tool is other than 2mm, you will need to adjust 

Tests

Save this for now. Might be useful later.

Setting In JScut

Using these setting In Gcode Conversion

X Offset = 0

Y Offset = 870

In Inkscape

The oval is 100mm tall and 50 wide

The position on page is 50mm to the right of Canvas X

Ans 50mm up from Canvas Y

What Machine Does

The oval is the correct size and in the correct position for X, however the Y may be a little off (2mm – instead of 50mm it is 48mm)

It is the oval is 5mm to right of X0

The oval is 4.8mm up from Y0