Merge pull request #8182 from vespakoen/opencamlib-support
Update opencamlib imports to support latest version
This commit is contained in:
@@ -165,7 +165,10 @@ class PathWorkbench(Workbench):
|
||||
pass
|
||||
|
||||
try:
|
||||
import ocl # pylint: disable=unused-variable
|
||||
try:
|
||||
import ocl # pylint: disable=unused-variable
|
||||
except ImportError:
|
||||
import opencamlib as ocl
|
||||
from Path.Op.Gui import Surface
|
||||
from Path.Op.Gui import Waterline
|
||||
|
||||
|
||||
@@ -35,7 +35,10 @@ translate = FreeCAD.Qt.translate
|
||||
|
||||
# OCL must be installed
|
||||
try:
|
||||
import ocl
|
||||
try:
|
||||
import ocl
|
||||
except ImportError:
|
||||
import opencamlib as ocl
|
||||
except ImportError:
|
||||
msg = translate(
|
||||
"PathSurface", "This operation requires OpenCamLib to be installed."
|
||||
|
||||
@@ -34,7 +34,10 @@ translate = FreeCAD.Qt.translate
|
||||
|
||||
# OCL must be installed
|
||||
try:
|
||||
import ocl
|
||||
try:
|
||||
import ocl
|
||||
except ImportError:
|
||||
import opencamlib as ocl
|
||||
except ImportError:
|
||||
msg = translate(
|
||||
"path_waterline", "This operation requires OpenCamLib to be installed."
|
||||
|
||||
Reference in New Issue
Block a user