py3: part-design: involute-gear

This commit is contained in:
looooo
2017-04-26 17:46:31 +02:00
committed by Yorik van Havre
parent da483e762f
commit 6db628f398
3 changed files with 27 additions and 23 deletions

View File

@@ -35,30 +35,30 @@ class PartDesignWorkbench ( Workbench ):
self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/PartDesign/Resources/icons/PartDesignWorkbench.svg"
self.__class__.MenuText = "Part Design"
self.__class__.ToolTip = "Part Design 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
def Initialize(self):
# load the module
try:
from WizardShaft import WizardShaft
except ImportError:
print("Wizard shaft module cannot be loaded")
try:
import InvoluteGearFeature
except ImportError:
print("Involute gear module cannot be loaded")
#try:
# from FeatureHole import HoleGui
#except:
# pass
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"
return "PartDesignGui::Workbench"
Gui.addWorkbench(PartDesignWorkbench())

View File

@@ -19,8 +19,7 @@ from math import cos, sin, pi, acos, asin, atan, sqrt
import FreeCAD, Part
from FreeCAD import Base, Console
import involute
reload(involute)
from . import involute
rotate = involute.rotate

View File

@@ -24,6 +24,11 @@
from math import cos, sin, pi, acos, asin, atan, sqrt
import sys
if sys.version_info.major >= 3:
xrange = range
def CreateExternalGear(w, m, Z, phi, split=True):
"""
Create an external gear