Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #2617 from mlampert/bugfix/path-ocl-warning
Browse files Browse the repository at this point in the history
Path: couple of minor bug fixes
  • Loading branch information
sliptonic committed Oct 15, 2019
2 parents 2b22105 + 4dc50ed commit b479a4c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
1 change: 1 addition & 0 deletions src/Mod/Path/InitGui.py
Expand Up @@ -98,6 +98,7 @@ def Initialize(self):

try:
import ocl # pylint: disable=unused-variable
from PathScripts import PathSurfaceGui
threedopcmdlist.append("Path_Surface")
threedcmdgroup = ['Path_3dTools']
FreeCADGui.addCommand('Path_3dTools', PathCommandGroup(threedopcmdlist, QtCore.QT_TRANSLATE_NOOP("Path",'3D Operations')))
Expand Down
14 changes: 9 additions & 5 deletions src/Mod/Path/PathScripts/PathDressupHoldingTags.py
Expand Up @@ -739,21 +739,25 @@ def __init__(self, obj, base):
obj.addProperty("App::PropertyIntegerList", "Disabled", "Tag", QtCore.QT_TRANSLATE_NOOP("Path_DressupTag", "IDs of disabled holding tags"))
obj.addProperty("App::PropertyInteger", "SegmentationFactor", "Tag", QtCore.QT_TRANSLATE_NOOP("Path_DressupTag", "Factor determining the # of segments used to approximate rounded tags."))

self.__setstate__(obj)

obj.Proxy = self
obj.Base = base

self.obj = obj
def __getstate__(self):
return None

def __setstate__(self, state):
self.obj = state
self.solids = []
self.tags = []
self.pathData = None
self.toolRadius = None
self.mappers = []

def __getstate__(self):
return None

def __setstate__(self, state):
return None
def onDocumentRestored(self, obj):
self.obj = obj

def supportsTagGeneration(self, obj):
if not self.pathData:
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Path/PathScripts/PathDressupTagGui.py
Expand Up @@ -229,7 +229,7 @@ def addNewTagAt(self, point, obj):
self.Positions.append(FreeCAD.Vector(point.x, point.y, 0))
self.updateTagsView()
else:
print("ignore new tag at %s (obj=%s, on-path=%d" % (point, obj, 0))
PathLog.notice("ignore new tag at %s (obj=%s, on-path=%d" % (point, obj, 0))

def addNewTag(self):
self.tags = self.getTags(True)
Expand Down
6 changes: 0 additions & 6 deletions src/Mod/Path/PathScripts/PathGuiInit.py
Expand Up @@ -68,12 +68,6 @@ def Startup():
from PathScripts import PathSimpleCopy
from PathScripts import PathSimulatorGui
from PathScripts import PathStop
try:
import ocl
from PathScripts import PathSurfaceGui
except ImportError:
import FreeCAD
FreeCAD.Console.PrintError("OpenCamLib is not working!\n")
from PathScripts import PathToolController
from PathScripts import PathToolControllerGui
from PathScripts import PathToolLibraryManager
Expand Down

0 comments on commit b479a4c

Please sign in to comment.