From 736b7a01592d7db6499a68493f8c65302ac7ba5e Mon Sep 17 00:00:00 2001
From: skeatz <schewlk@hotmail.com>
Date: Wed, 28 Oct 2020 10:04:23 +0800
Subject: [PATCH] corrected feedrate calc

---
 modules/path/formats/g-code | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/modules/path/formats/g-code b/modules/path/formats/g-code
index 008a386..bad3af8 100644
--- a/modules/path/formats/g-code
+++ b/modules/path/formats/g-code
@@ -7,6 +7,10 @@
 // Updated: Steven Chew
 // Date:    Feb 20 2019
 // Comments: Added option to output in inch or mm
+// Date:... Oct 28 2019
+// Comments: Corrected feedrate conversion
+//           - inch/s to inch/min
+//...........- mm/s to mm/min
 //
 // This work may be reproduced, modified, distributed, performed, and 
 // displayed for any purpose, but must acknowledge the mods
@@ -206,7 +210,7 @@ function make_path() {
    str += "G90\n" // absolute coordinates
    str += "G94\n" // feed/minute units
    str += "T"+tool+"M06\n" // tool selection, tool change
-   str += "F"+cut_speed.toFixed(4)+"\n" // feed rate
+   str += "F"+cut_speed.toFixed(4)*60+"\n" // feed rate
    str += "S"+spindle_speed+"\n" // spindle speed
    if (mod.coolanton.checked)
       str += "M08\n" // coolant on
@@ -228,8 +232,8 @@ function make_path() {
       // move down
       //
       z = scale*mod.path[seg][0][2]
-      str += "G01Z"+z.toFixed(4)+" F"+plunge_speed.toFixed(4)+"\n"
-      str += "F"+cut_speed.toFixed(4)+"\n" //restore xy feed rate
+      str += "G01Z"+z.toFixed(4)+" F"+plunge_speed.toFixed(4)*60+"\n"
+      str += "F"+cut_speed.toFixed(4)*60+"\n" //restore xy feed rate
       for (var pt = 1; pt < mod.path[seg].length; ++pt) {
          //
          // move to next point
-- 
GitLab