split paths on M6 and change placement to use offset

This commit is contained in:
Eric Trombly
2020-03-22 12:10:11 -05:00
2 changed files with 44 additions and 3 deletions

View File

@@ -25,20 +25,19 @@ import FreeCAD
import FreeCADGui
import Path
from PySide import QtCore
from copy import copy
__doc__ = """Path Custom object and FreeCAD command"""
movecommands = ['G0', 'G00', 'G1', 'G01', 'G2', 'G02', 'G3', 'G03']
# Qt translation handling
def translate(context, text, disambig=None):
return QtCore.QCoreApplication.translate(context, text, disambig)
class ObjectCustom:
def __init__(self, obj):
obj.addProperty("App::PropertyStringList", "Gcode", "Path",
QtCore.QT_TRANSLATE_NOOP("PathCustom", "The gcode to be inserted"))
@@ -46,6 +45,7 @@ class ObjectCustom:
QtCore.QT_TRANSLATE_NOOP("PathCustom", "The tool controller that will be used to calculate the path"))
obj.addProperty("App::PropertyPlacement", "Offset", "Path",
"Placement Offset")
obj.Proxy = self
def __getstate__(self):
@@ -72,6 +72,7 @@ class ObjectCustom:
obj.Path=newpath
class CommandPathCustom:
def GetResources(self):