some fixes

This commit is contained in:
jriegel 2014-11-08 20:29:38 +01:00 committed by Stefan Tröger
parent dc4fdc2c53
commit d59904fd37
5 changed files with 21 additions and 18 deletions

View File

@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (c) Jürgen Riegel (juergen.riegel@web.de) 2014 *
* Copyright (c) Juergen Riegel (juergen.riegel@web.de) 2014 *
* *
* This file is part of the FreeCAD CAx development system. *
* *
@ -31,7 +31,7 @@
#include "GeoFeatureGroupPy.h"
#include "FeaturePythonPyImp.h"
// #define new DEBUG_CLIENTBLOCK
using namespace App;

View File

@ -32,7 +32,7 @@
#include "Part.h"
#include "PartPy.h"
//#define new DEBUG_CLIENTBLOCK
using namespace App;

View File

@ -115,8 +115,8 @@ struct PyMethodDef Assembly_methods[] = {
{"setActiveBody" ,setActiveBody ,METH_VARARGS,
"setActiveBody(BodyObject) -- Set the PartBody object in work."},
{"setActiveBody" ,getActiveBody ,METH_NOARGS,
"setActiveBody() -- Get the PartBody object in work."},
{"getActiveBody" ,getActiveBody ,METH_NOARGS,
"getActiveBody() -- Get the PartBody object in work."},
{"setUpPart" ,setUpPart ,METH_VARARGS,
"setUpPart(Part) -- Sets a empty part object up for usage in PartDesign."},

View File

@ -52,6 +52,11 @@ class PartDesignWorkbench ( Workbench ):
import InvoluteGearFeature
except ImportError:
print "Involute gear module cannot be loaded"
try:
from FeatureHole import HoleGui
except:
pass
def GetClassName(self):
return "PartDesignGui::Workbench"

View File

@ -36,14 +36,17 @@ class PartDesignWorkbench ( Workbench ):
self.__class__.MenuText = "Part Design"
self.__class__.ToolTip = "Part Design workbench"
<<<<<<< ae478b98ed61389183af93a610e1a07448918eb5
def Initialize(self):
# load the module
try:
from WizardShaft import WizardShaft
except ImportError:
print "Wizard shaft module cannot be loaded"
from FeatureHole import HoleGui
try:
from FeatureHole import HoleGui
except:
pass
<<<<<<< 1cdecc120fcdcd3447f72fdd734cf6c4f78b056b
import PartDesignGui
import PartDesign
try:
@ -53,24 +56,19 @@ class PartDesignWorkbench ( Workbench ):
def GetClassName(self):
return "PartDesignGui::Workbench"
=======
def Initialize(self):
# load the module
try:
from WizardShaft import WizardShaft
except ImportError:
print "Wizard shaft module cannot be loaded"
try:
from FeatureHole import HoleGui
except:
pass
import PartDesignGui
import PartDesign
try:
import InvoluteGearFeature
except ImportError:
print "Involute gear module cannot be loaded"
try:
from FeatureHole import HoleGui
except:
pass
def GetClassName(self):
return "PartDesignGui::Workbench"
>>>>>>> Error handling if NumPy is not there
>>>>>>> some fixes
Gui.addWorkbench(PartDesignWorkbench())