🐛 GCV: Fix rendering of G02 and G03 (#4587)

* Fix rendering for G02 and G03 commands
* Improve performance of arc direction check
This commit is contained in:
Kestin Goforth authored and GitHub committed 2022-08-01 14:03:06 +02:00
1 parent db83680d57
commit 534824eb17
1 file changed
+4 -2
@@ -480,8 +480,10 @@ var doParse = function () {
center_j = Number(args[j].slice(1));
break;
case "g":
if (args[j].charAt(1).toLowerCase() === "2") direction = -1;
if (args[j].charAt(1).toLowerCase() === "3") direction = 1;
if (args[j].charAt(1) === "2" || args[j].charAt(2) === "2")
direction = -1;
else if (args[j].charAt(1) === "3" || args[j].charAt(2) === "3")
direction = 1;
break;
}
}