diff --git a/src/Mod/Path/PathScripts/PathSurface.py b/src/Mod/Path/PathScripts/PathSurface.py index e7dfbb0f3d..37a5fa914d 100644 --- a/src/Mod/Path/PathScripts/PathSurface.py +++ b/src/Mod/Path/PathScripts/PathSurface.py @@ -98,6 +98,15 @@ class ObjectSurface(PathOp.ObjectOp): def opExecute(self, obj): '''opExecute(obj) ... process surface operation''' PathLog.track() + + # OCL must be installed + try: + import ocl + except: + FreeCAD.Console.PrintError( + translate("Path_Surface", "This operation requires OpenCamLib to be installed.") + "\n") + return + print("StepOver is " + str(obj.StepOver)) if obj.StepOver > 100: obj.StepOver = 100 @@ -116,14 +125,6 @@ class ObjectSurface(PathOp.ObjectOp): print("base object: " + self.baseobject.Name) - if obj.Algorithm in ['OCL Dropcutter', 'OCL Waterline']: - try: - import ocl - except: - FreeCAD.Console.PrintError( - translate("Path_Surface", "This operation requires OpenCamLib to be installed.") + "\n") - return - if self.baseobject.TypeId.startswith('Mesh'): mesh = self.baseobject.Mesh else: