Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
py3: part-design: involute-gear
  • Loading branch information
looooo authored and yorikvanhavre committed Apr 27, 2017
1 parent ead0061 commit 84f8644
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 22 deletions.
40 changes: 20 additions & 20 deletions src/Mod/PartDesign/InitGui.py
Expand Up @@ -35,30 +35,30 @@ def __init__(self):
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
# load the module
try:
from WizardShaft import WizardShaft
except ImportError:
print("Wizard shaft module cannot be loaded")
try:
from WizardShaft import WizardShaft
except ImportError:
print("Wizard shaft 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
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())
3 changes: 1 addition & 2 deletions src/Mod/PartDesign/fcgear/fcgear.py
Expand Up @@ -19,8 +19,7 @@

import FreeCAD, Part
from FreeCAD import Base, Console
import involute
reload(involute)
from . import involute
rotate = involute.rotate


Expand Down
5 changes: 5 additions & 0 deletions src/Mod/PartDesign/fcgear/involute.py
Expand Up @@ -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
Expand Down

0 comments on commit 84f8644

Please sign in to comment.