CAM processing in HTML

Why do CAM processing in HTML and JavaScript?
- Good question, I see several advantages:

  • Works on almost all platforms
  • Can be stored local, on file server or internet (web server)
  • Easy to alter code (just using a text editor – no development platform needed)
  • Can be run directly (does not need to be compiled)
  • User interface and graphics is integrated
  • One single html file is all that is needed (but it looks better with the images)
  • Complete program with images is less then 150kB

The main disadvantage is that the program is quite slow on larger files. But for almost all my jobs it runs fast enough (using chrome).

What exactly does the program do?

- The program simply coverts a neutral polyline- or drill format to cnc code according to your specification. It is up to you to create good paths for the mill, there is no magic going on and you have full control. For 90% of my jobs this program is all I need and it is much faster to work with then full blown CAM programs.

This is a screenshot of the 2D single cut mode.

  1. Paste the polylines in the first text box (generated by this rhino script)
  2. Press sort to reduce travel time
  3. Enter cutting parameters
  4. Press generate
  5. Copy the generated CNC code and paste it in a file for the mill.

Try it here!

Caution

The program was written specifically for my equipment. It is very unlikely that your mill is configured exactly like mine. Position of zero, cutting speeds, position of tools etc is likely different. Test the code at very slow speed first to make sure it works with your equipment. Always keep one hand at the emergency switch :)

Please note that each program start by moving to x=0 first. This is to avoid cutting in the tool length sensor. In other equipment this move could easily cut in a clamping fixture or the mill itself. Remove it if you don’t need it!

Running untested code on expensive and powerful machines is always risky. I do not take any responsibility if the machine damage itself or worse, someone.

Related posts:

10 thoughts on “CAM processing in HTML

  1. Pingback: Milling a PCB | Johan von Konow

    • Not really, for most mills a curve still ends up in as polyline due to stepper motors or digital feedback loops on servo motors. It is actually just a matter of resolution. I can provide a polyline with same or higher resolution than the stepper motor giving the same result as curves. The beauty of this solution is in its simplicity.

  2. Pingback: Accelerometer and digital compass (BGA & LGA) breakout board | Johan von Konow

  3. Pingback: Web access lab board (internet of things) | Johan von Konow

  4. How you do the image effect of html image? ^^ Thanks in advance

    • Quite easy,
      1 – screenshot (screenshot captor) of html file (in crimson edit)
      2 – photoshop transform (ctrl-a + ctrl-t) then drag right side corners together.
      3 – save ;)

  5. Pingback: Miniature USB to serial PCB | Johan von Konow

  6. Pingback: Ultimate PIC16F628/627 breakout board | Johan von Konow

  7. Pingback: Bringing a 12 year old Roland MDX-20 up to date | Johan von Konow