Fixes for various gcode errors
Some operations were still outputting even if disabled. Nested comments caused trouble in linuxcnc Machine was producing an initial move that was potentially dangerous
This commit is contained in:
@@ -121,7 +121,7 @@ class ObjectSurface:
|
||||
|
||||
def onChanged(self, obj, prop):
|
||||
if prop == "UserLabel":
|
||||
obj.Label = obj.UserLabel + " (" + obj.ToolDescription + ")"
|
||||
obj.Label = obj.UserLabel + " :" + obj.ToolDescription
|
||||
|
||||
def _waterline(self, obj, s, bb):
|
||||
import ocl
|
||||
@@ -258,6 +258,8 @@ class ObjectSurface:
|
||||
FreeCAD.Console.PrintWarning(
|
||||
translate("PathSurface", "Hold on. This might take a minute.\n"))
|
||||
output = ""
|
||||
if obj.Comment != "":
|
||||
output += '(' + str(obj.Comment)+')\n'
|
||||
|
||||
toolLoad = PathUtils.getLastToolLoad(obj)
|
||||
if toolLoad is None or toolLoad.ToolNumber == 0:
|
||||
@@ -275,9 +277,9 @@ class ObjectSurface:
|
||||
obj.ToolDescription = toolLoad.Name
|
||||
|
||||
if obj.UserLabel == "":
|
||||
obj.Label = obj.Name + " (" + obj.ToolDescription + ")"
|
||||
obj.Label = obj.Name + " :" + obj.ToolDescription
|
||||
else:
|
||||
obj.Label = obj.UserLabel + " (" + obj.ToolDescription + ")"
|
||||
obj.Label = obj.UserLabel + " :" + obj.ToolDescription
|
||||
|
||||
if obj.Base:
|
||||
for b in obj.Base:
|
||||
@@ -312,9 +314,15 @@ class ObjectSurface:
|
||||
elif obj.Algorithm == 'OCL Waterline':
|
||||
output = self._waterline(obj, s, bb)
|
||||
|
||||
path = Path.Path(output)
|
||||
obj.Path = path
|
||||
if obj.Active:
|
||||
path = Path.Path(output)
|
||||
obj.Path = path
|
||||
obj.ViewObject.Visibility = True
|
||||
|
||||
else:
|
||||
path = Path.Path("(inactive operation)")
|
||||
obj.Path = path
|
||||
obj.ViewObject.Visibility = False
|
||||
|
||||
class ViewProviderSurface:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user