diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..475c35b
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1 @@
+recursive-include freecad/gears/icons *
\ No newline at end of file
diff --git a/Resources/gear.qrc b/Resources/gear.qrc
deleted file mode 100644
index 2e590cc..0000000
--- a/Resources/gear.qrc
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- icons/gearworkbench.svg
- icons/involutegear.svg
- icons/cycloidegear.svg
- icons/involuterack.svg
- icons/crowngear.svg
- icons/bevelgear.svg
-
-
diff --git a/Resources/gear.qrc~ b/Resources/gear.qrc~
deleted file mode 100644
index 143161c..0000000
--- a/Resources/gear.qrc~
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
- icons/gearworkbench.svg
- icons/involutegear.svg
- icons/cycloidegear.svg
-
-
diff --git a/Resources/qrc_command.sh b/Resources/qrc_command.sh
deleted file mode 100644
index 95a9e8e..0000000
--- a/Resources/qrc_command.sh
+++ /dev/null
@@ -1 +0,0 @@
-pyside-rcc gear.qrc -o ../gear_rc.py -py3
\ No newline at end of file
diff --git a/__init__.py b/__init__.py
deleted file mode 100644
index 6604249..0000000
--- a/__init__.py
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/lib/python
-
-from gearfunc._involute_tooth import involute_rack, involute_tooth
-from gearfunc._cycloide_tooth import cycloide_tooth
-from gearfunc._bevel_tooth import bevel_tooth
-from gearfunc import CreateInvoluteRack, CreateCycloideGear, CreateInvoluteGear, CreateBevelGear
-
-__All__ = [
- "CreateInvoluteRack",
- "CreateCycloideGear",
- "CreateInvoluteGear",
- "CreateBevelGear",
- "involute_rack",
- "involute_tooth",
- "bevel_tooth"
-]
-
diff --git a/freecad/__init__.py b/freecad/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/freecad/gears/__init__.py b/freecad/gears/__init__.py
new file mode 100644
index 0000000..73872cf
--- /dev/null
+++ b/freecad/gears/__init__.py
@@ -0,0 +1,2 @@
+import pygears
+__version__ = pygears.__version__
diff --git a/gearfunc/__init__.py b/freecad/gears/commands.py
similarity index 76%
rename from gearfunc/__init__.py
rename to freecad/gears/commands.py
index a318ee9..e47fdf1 100644
--- a/gearfunc/__init__.py
+++ b/freecad/gears/commands.py
@@ -18,11 +18,11 @@
#* *
#***************************************************************************
-
+import os
import FreeCAD
import FreeCADGui as Gui
-from ._Classes import ViewProviderGear, involute_gear, involute_gear_rack
-from ._Classes import cycloide_gear, bevel_gear, crown_gear
+from .features import ViewProviderGear, involute_gear, involute_gear_rack
+from .features import cycloide_gear, bevel_gear, crown_gear
class BaseCommand(object):
@@ -39,7 +39,9 @@ class CreateInvoluteGear(BaseCommand):
"""create an involute gear"""
def GetResources(self):
- return {'Pixmap': 'involutegear.svg', 'MenuText': 'involute gear', 'ToolTip': 'involute gear'}
+ return {'Pixmap': os.path.join(os.path.dirname(__file__), 'icons', 'involutegear.svg'),
+ 'MenuText': 'involute gear',
+ 'ToolTip': 'involute gear'}
def Activated(self):
a = FreeCAD.ActiveDocument.addObject("Part::FeaturePython", "InvoluteGear")
@@ -51,7 +53,9 @@ class CreateInvoluteGear(BaseCommand):
class CreateInvoluteRack(BaseCommand):
def GetResources(self):
- return {'Pixmap': 'involuterack.svg', 'MenuText': 'involute rack', 'ToolTip': 'involute rack'}
+ return {'Pixmap': os.path.join(os.path.dirname(__file__), 'icons', 'involuterack.svg'),
+ 'MenuText': 'involute rack',
+ 'ToolTip': 'involute rack'}
def Activated(self):
@@ -64,7 +68,9 @@ class CreateInvoluteRack(BaseCommand):
class CreateCrownGear(BaseCommand):
def GetResources(self):
- return {'Pixmap': 'crowngear.svg', 'MenuText': 'crown gear', 'ToolTip': 'not working yet!!!'}
+ return {'Pixmap': os.path.join(os.path.dirname(__file__), 'icons', 'crowngear.svg'),
+ 'MenuText': 'crown gear',
+ 'ToolTip': 'crown gear'}
def Activated(self):
a = FreeCAD.ActiveDocument.addObject("Part::FeaturePython", "CrownGear")
@@ -76,7 +82,9 @@ class CreateCrownGear(BaseCommand):
class CreateCycloideGear(BaseCommand):
def GetResources(self):
- return {'Pixmap': 'cycloidegear.svg', 'MenuText': 'cycloide gear', 'ToolTip': 'cycloide gear'}
+ return {'Pixmap': os.path.join(os.path.dirname(__file__), 'icons', 'cycloidegear.svg'),
+ 'MenuText': 'cycloide gear',
+ 'ToolTip': 'cycloide gear'}
def Activated(self):
a = FreeCAD.ActiveDocument.addObject("Part::FeaturePython", "CycloideGear")
@@ -88,7 +96,9 @@ class CreateCycloideGear(BaseCommand):
class CreateBevelGear(BaseCommand):
def GetResources(self):
- return {'Pixmap': 'bevelgear.svg', 'MenuText': 'bevel gear', 'ToolTip': 'bevel gear'}
+ return {'Pixmap': os.path.join(os.path.dirname(__file__), 'icons', 'bevelgear.svg'),
+ 'MenuText': 'bevel gear',
+ 'ToolTip': 'bevel gear'}
def Activated(self):
a = FreeCAD.ActiveDocument.addObject("Part::FeaturePython", "BevelGear")
diff --git a/gearfunc/_Classes.py b/freecad/gears/features.py
similarity index 88%
rename from gearfunc/_Classes.py
rename to freecad/gears/features.py
index f62ebfe..7540aa7 100644
--- a/gearfunc/_Classes.py
+++ b/freecad/gears/features.py
@@ -21,19 +21,20 @@
from __future__ import division
import os
+
+import numpy as np
+from pygears.involute_tooth import involute_tooth, involute_rack
+from pygears.cycloide_tooth import cycloide_tooth
+from pygears.bevel_tooth import bevel_tooth
+from pygears._functions import rotation3D, rotation
+
+
import FreeCAD as App
-from ._involute_tooth import involute_tooth, involute_rack
-from ._cycloide_tooth import cycloide_tooth
-from ._bevel_tooth import bevel_tooth
+import Part
from Part import BSplineCurve, Shape, Wire, Face, makePolygon, \
BRepOffsetAPI, Shell, makeLoft, Solid, Line, BSplineSurface, makeCompound,\
show, makePolygon, makeHelix, makeSweepSurface, makeShell, makeSolid
-import Part
-from ._functions import rotation3D, rotation
-from numpy import pi, cos, sin, tan
-import numpy as np
-import numpy
@@ -43,8 +44,6 @@ __all__=["involute_gear",
"involute_gear_rack",
"ViewProviderGear"]
-
-
def fcvec(x):
if len(x) == 2:
return(App.Vector(x[0], x[1], 0))
@@ -60,8 +59,8 @@ class ViewProviderGear:
self.vobj = vobj
def getIcon(self):
- _dir = os.path.dirname(os.path.realpath(__file__))
- return(_dir + "/../Resources/icons/involutegear.svg")
+ __dirname__ = os.path.dirname(__file__)
+ return(os.path.join(__dirname__, "icons", "involutegear.svg"))
def __getstate__(self):
return None
@@ -128,8 +127,8 @@ class involute_gear(object):
fp.gear.z = fp.teeth
fp.gear.undercut = fp.undercut
fp.gear.shift = fp.shift
- fp.gear.pressure_angle = fp.pressure_angle.Value * pi / 180.
- fp.gear.beta = fp.beta.Value * pi / 180
+ fp.gear.pressure_angle = fp.pressure_angle.Value * np.pi / 180.
+ fp.gear.beta = fp.beta.Value * np.pi / 180
fp.gear.clearance = fp.clearance
fp.gear.backlash = fp.backlash.Value * (-fp.reversed_backlash + 0.5) * 2.
fp.gear.head = fp.head
@@ -139,9 +138,9 @@ class involute_gear(object):
rot = rotation(-fp.gear.phipart)
for i in range(fp.gear.z - 1):
rotated_pts = list(map(rot, rotated_pts))
- pts.append(numpy.array([pts[-1][-1], rotated_pts[0][0]]))
+ pts.append(np.array([pts[-1][-1], rotated_pts[0][0]]))
pts += rotated_pts
- pts.append(numpy.array([pts[-1][-1], pts[0][0]]))
+ pts.append(np.array([pts[-1][-1], pts[0][0]]))
if not fp.simple:
wi = []
for i in pts:
@@ -154,7 +153,7 @@ class involute_gear(object):
fp.Shape = sh.extrude(App.Vector(0, 0, fp.height.Value))
else:
fp.Shape = helicalextrusion(
- wi, fp.height.Value, fp.height.Value * tan(fp.gear.beta) * 2 / fp.gear.d, fp.double_helix)
+ wi, fp.height.Value, fp.height.Value * np.tan(fp.gear.beta) * 2 / fp.gear.d, fp.double_helix)
else:
rw = fp.gear.dw / 2
circle = Part.Circle(App.Vector(0, 0, 0), App.Vector(0, 0, 1), rw)
@@ -205,9 +204,9 @@ class involute_gear_rack(object):
def execute(self, fp):
fp.rack.m = fp.module.Value
fp.rack.z = fp.teeth
- fp.rack.pressure_angle = fp.pressure_angle.Value * pi / 180.
+ fp.rack.pressure_angle = fp.pressure_angle.Value * np.pi / 180.
fp.rack.thickness = fp.thickness.Value
- fp.rack.beta = fp.beta.Value * pi / 180.
+ fp.rack.beta = fp.beta.Value * np.pi / 180.
fp.rack.head = fp.head
fp.rack._update()
pts = fp.rack.points()
@@ -216,16 +215,16 @@ class involute_gear_rack(object):
face = Face(Wire(pol))
fp.Shape = face.extrude(fcvec([0., 0., fp.height.Value]))
elif fp.double_helix:
- beta = fp.beta.Value * pi / 180.
+ beta = fp.beta.Value * np.pi / 180.
pol2 = Part.Wire(pol)
- pol2.translate(fcvec([0., tan(beta) * fp.height.Value / 2, fp.height.Value / 2]))
+ pol2.translate(fcvec([0., np.tan(beta) * fp.height.Value / 2, fp.height.Value / 2]))
pol3 = Part.Wire(pol)
pol3.translate(fcvec([0., 0., fp.height.Value]))
fp.Shape = makeLoft([pol, pol2, pol3], True, True)
else:
- beta = fp.beta.Value * pi / 180.
+ beta = fp.beta.Value * np.pi / 180.
pol2 = Part.Wire(pol)
- pol2.translate(fcvec([0., tan(beta) * fp.height.Value, fp.height.Value]))
+ pol2.translate(fcvec([0., np.tan(beta) * fp.height.Value, fp.height.Value]))
fp.Shape = makeLoft([pol, pol2], True)
def __getstate__(self):
@@ -288,12 +287,9 @@ class crown_gear(object):
# 6: unterer Punkt
d = y2 + dy
- c = tan(alpha) * d
+ c = np.tan(alpha) * d
x2 = x_c - c
- print("alpha_w: ", np.rad2deg(alpha_w))
- print("alpha: ", np.rad2deg(alpha))
- print("phi: ", np.rad2deg(phi))
r *= np.cos(phi)
pts = [
[-x1, r, y0],
@@ -343,7 +339,6 @@ class crown_gear(object):
for i in range(t):
loft = loft.transformGeometry(rot)
solid = solid.cut(loft)
- print(str(i / t) + "%")
fp.Shape = solid
@@ -404,9 +399,9 @@ class cycloide_gear(object):
rot = rotation(-fp.gear.phipart)
for i in range(fp.gear.z - 1):
rotated_pts = list(map(rot, rotated_pts))
- pts.append(numpy.array([pts[-1][-1], rotated_pts[0][0]]))
+ pts.append(np.array([pts[-1][-1], rotated_pts[0][0]]))
pts += rotated_pts
- pts.append(numpy.array([pts[-1][-1], pts[0][0]]))
+ pts.append(np.array([pts[-1][-1], pts[0][0]]))
wi = []
for i in pts:
out = BSplineCurve()
@@ -419,7 +414,7 @@ class cycloide_gear(object):
else:
pass
fp.Shape = helicalextrusion(
- wi, fp.height.Value, fp.height.Value * tan(fp.beta.Value * pi / 180) * 2 / fp.gear.d, fp.double_helix)
+ wi, fp.height.Value, fp.height.Value * np.tan(fp.beta.Value * np.pi / 180) * 2 / fp.gear.d, fp.double_helix)
def __getstate__(self):
return None
@@ -469,15 +464,15 @@ class bevel_gear():
def execute1(self, fp):
fp.gear.z = fp.teeth
- fp.gear.pressure_angle = fp.pressure_angle.Value * pi / 180.
- fp.gear.pitch_angle = fp.pitch_angle.Value * pi / 180
+ fp.gear.pressure_angle = fp.pressure_angle.Value * np.pi / 180.
+ fp.gear.pitch_angle = fp.pitch_angle.Value * np.pi / 180
fp.gear.backlash = fp.backlash
fp.gear._update()
pts = fp.gear.points(num=fp.numpoints)
tooth = self.create_tooth()
teeth = [tooth]
rot = App.Matrix()
- rot.rotateZ(2 * pi / fp.teeth)
+ rot.rotateZ(2 * np.pi / fp.teeth)
top_cap = [i.Edges[0] for i in tooth.Faces]
bottom_cap = [i.Edges[3] for i in tooth.Faces]
for i in range(fp.teeth - 1):
@@ -506,27 +501,26 @@ class bevel_gear():
def execute(self, fp):
fp.gear.z = fp.teeth
fp.gear.module = fp.m.Value
- fp.gear.pressure_angle = (90 - fp.pressure_angle.Value) * pi / 180.
- fp.gear.pitch_angle = fp.pitch_angle.Value * pi / 180
+ fp.gear.pressure_angle = (90 - fp.pressure_angle.Value) * np.pi / 180.
+ fp.gear.pitch_angle = fp.pitch_angle.Value * np.pi / 180
fp.gear.backlash = fp.backlash.Value
- scale = fp.m.Value * fp.gear.z / 2 / tan(fp.pitch_angle.Value * pi / 180)
+ scale = fp.m.Value * fp.gear.z / 2 / np.tan(fp.pitch_angle.Value * np.pi / 180)
fp.gear.clearance = fp.clearance / scale
fp.gear._update()
pts = list(fp.gear.points(num=fp.numpoints))
- rot = rotation3D(2 * pi / fp.teeth)
+ rot = rotation3D(2 * np.pi / fp.teeth)
if fp.beta != 0:
- pts = [np.array([self.spherical_rot(j, fp.beta.Value * pi / 180.) for j in i]) for i in pts]
+ pts = [np.array([self.spherical_rot(j, fp.beta.Value * np.pi / 180.) for j in i]) for i in pts]
rotated_pts = pts
for i in range(fp.gear.z - 1):
rotated_pts = list(map(rot, rotated_pts))
- pts.append(numpy.array([pts[-1][-1], rotated_pts[0][0]]))
+ pts.append(np.array([pts[-1][-1], rotated_pts[0][0]]))
pts += rotated_pts
- pts.append(numpy.array([pts[-1][-1], pts[0][0]]))
+ pts.append(np.array([pts[-1][-1], pts[0][0]]))
wires = []
for scale_i in np.linspace(scale - fp.height.Value / 2, scale + fp.height.Value / 2, 10):
- print(scale_i)
- beta_i = (scale_i / scale / np.cos(fp.gear.pitch_angle) - 1) * fp.beta.Value * pi / 180
+ beta_i = (scale_i / scale / np.cos(fp.gear.pitch_angle) - 1) * fp.beta.Value * np.pi / 180
rot = rotation3D(beta_i)
wires.append(makeBSplineWire([rot(pt) * scale_i for pt in pts]))
fp.Shape = makeLoft(wires, True)
@@ -535,10 +529,10 @@ class bevel_gear():
def create_tooth(self):
w = []
- scal1 = self.obj.m.Value * self.obj.gear.z / 2 / tan(
- self.obj.pitch_angle.Value * pi / 180) - self.obj.height.Value / 2
- scal2 = self.obj.m.Value * self.obj.gear.z / 2 / tan(
- self.obj.pitch_angle.Value * pi / 180) + self.obj.height.Value / 2
+ scal1 = self.obj.m.Value * self.obj.gear.z / 2 / np.tan(
+ self.obj.pitch_angle.Value * np.pi / 180) - self.obj.height.Value / 2
+ scal2 = self.obj.m.Value * self.obj.gear.z / 2 / np.tan(
+ self.obj.pitch_angle.Value * np.pi / 180) + self.obj.height.Value / 2
s = [scal1, scal2]
pts = self.obj.gear.points(num=self.obj.numpoints)
for j, pos in enumerate(s):
@@ -557,7 +551,6 @@ class bevel_gear():
return Shape(surfs)
def spherical_rot(self, point, phi):
- print(point)
new_phi = (np.linalg.norm(point) -1) * phi
return rotation3D(new_phi)(point)
@@ -565,16 +558,16 @@ class bevel_gear():
w1 = []
pts = [pt * pos for pt in pts]
rotated_pts = scaled_points
- rot = rotation3D(- 2 * i * pi / teeth)
+ rot = rotation3D(- 2 * i * np.pi / teeth)
for i in range(teeth - 1):
rotated_pts = map(rot, rotated_pts)
- pts.append(numpy.array([pts[-1][-1], rotated_pts[0][0]]))
+ pts.append(np.array([pts[-1][-1], rotated_pts[0][0]]))
pts += rotated_pts
s = Wire(Shape(w1).Edges)
wi = []
for i in range(teeth):
rot = App.Matrix()
- rot.rotateZ(2 * i * pi / teeth)
+ rot.rotateZ(2 * i * np.pi / teeth)
tooth_rot = s.transformGeometry(rot)
if i != 0:
pt_0 = wi[-1].Edges[-1].Vertexes[0].Point
@@ -596,7 +589,7 @@ class bevel_gear():
def helicalextrusion(wire, height, angle, double_helix = False):
direction = bool(angle < 0)
if double_helix:
- first_spine = makeHelix(height * 2. * pi / abs(angle), 0.5 * height, 10., 0, direction)
+ first_spine = makeHelix(height * 2. * np.pi / abs(angle), 0.5 * height, 10., 0, direction)
first_solid = first_spine.makePipeShell([wire], True, True)
second_solid = first_solid.mirror(fcvec([0.,0.,0.]), fcvec([0,0,1]))
faces = first_solid.Faces + second_solid.Faces
@@ -606,7 +599,7 @@ def helicalextrusion(wire, height, angle, double_helix = False):
mat.move(fcvec([0, 0, 0.5 * height]))
return solid.transformGeometry(mat)
else:
- first_spine = makeHelix(height * 2 * pi / abs(angle), height, 10., 0, direction)
+ first_spine = makeHelix(height * 2 * np.pi / abs(angle), height, 10., 0, direction)
first_solid = first_spine.makePipeShell([wire], True, True)
return first_solid
diff --git a/Resources/icons/bevelgear.svg b/freecad/gears/icons/bevelgear.svg
similarity index 100%
rename from Resources/icons/bevelgear.svg
rename to freecad/gears/icons/bevelgear.svg
diff --git a/Resources/icons/crowngear.svg b/freecad/gears/icons/crowngear.svg
similarity index 100%
rename from Resources/icons/crowngear.svg
rename to freecad/gears/icons/crowngear.svg
diff --git a/Resources/icons/cycloidegear.svg b/freecad/gears/icons/cycloidegear.svg
similarity index 100%
rename from Resources/icons/cycloidegear.svg
rename to freecad/gears/icons/cycloidegear.svg
diff --git a/Resources/icons/gearworkbench.svg b/freecad/gears/icons/gearworkbench.svg
similarity index 100%
rename from Resources/icons/gearworkbench.svg
rename to freecad/gears/icons/gearworkbench.svg
diff --git a/Resources/icons/involutegear.svg b/freecad/gears/icons/involutegear.svg
similarity index 100%
rename from Resources/icons/involutegear.svg
rename to freecad/gears/icons/involutegear.svg
diff --git a/Resources/icons/involuterack.svg b/freecad/gears/icons/involuterack.svg
similarity index 100%
rename from Resources/icons/involuterack.svg
rename to freecad/gears/icons/involuterack.svg
diff --git a/InitGui.py b/freecad/gears/init_gui.py
similarity index 91%
rename from InitGui.py
rename to freecad/gears/init_gui.py
index 217b758..7ec4bac 100644
--- a/InitGui.py
+++ b/freecad/gears/init_gui.py
@@ -18,10 +18,10 @@
#* *
#***************************************************************************
+import os
import FreeCADGui as Gui
import FreeCAD as App
-import gear_rc
-import gearfunc
+__dirname__ = os.path.dirname(__file__)
try:
from FreeCADGui import Workbench
@@ -33,7 +33,7 @@ class gearWorkbench(Workbench):
"""glider workbench"""
MenuText = "Gear"
ToolTip = "Gear Workbench"
- Icon = "gearworkbench.svg"
+ Icon = os.path.join(__dirname__, 'icons', 'gearworkbench.svg')
commands = [
"CreateInvoluteGear",
"CreateInvoluteRack",
@@ -45,8 +45,8 @@ class gearWorkbench(Workbench):
return "Gui::PythonWorkbench"
def Initialize(self):
- from gearfunc import CreateCycloideGear, CreateInvoluteGear
- from gearfunc import CreateBevelGear, CreateInvoluteRack, CreateCrownGear
+ from .commands import CreateCycloideGear, CreateInvoluteGear
+ from .commands import CreateBevelGear, CreateInvoluteRack, CreateCrownGear
self.appendToolbar("Gear", self.commands)
self.appendMenu("Gear", self.commands)
Gui.addIconPath(App.getHomePath()+"Mod/gear/icons/")
diff --git a/gear_rc.py b/gear_rc.py
deleted file mode 100644
index e357e89..0000000
--- a/gear_rc.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Resource object code
-#
-# Created: Di. Aug 29 11:35:58 2017
-# by: The Resource Compiler for PySide (Qt v4.8.4)
-#
-# WARNING! All changes made in this file will be lost!
-
-from PySide import QtCore
-
-qt_resource_data = b"\x00\x00SA\x0a\x0a\x0a\x0a\x00\x00;|\x0a\x0a\x0a\x0a\x00\x02D\xe1\x0a\x0a\x0a\x0a\x00\x009\xaf\x0a\x0a\x0a\x0a\x00\x00Sy\x0a\x0a\x0a\x0a\x00\x00< \x0a\x0a\x0a\x0a"
-qt_resource_name = b"\x00\x05\x00o\xa6S\x00i\x00c\x00o\x00n\x00s\x00\x0d\x0e\xa8\x92\xc7\x00c\x00r\x00o\x00w\x00n\x00g\x00e\x00a\x00r\x00.\x00s\x00v\x00g\x00\x0d\x0a\x1c\xde\xc7\x00b\x00e\x00v\x00e\x00l\x00g\x00e\x00a\x00r\x00.\x00s\x00v\x00g\x00\x11\x09\xff\x89\xa7\x00g\x00e\x00a\x00r\x00w\x00o\x00r\x00k\x00b\x00e\x00n\x00c\x00h\x00.\x00s\x00v\x00g\x00\x10\x07\xe0\x1a'\x00i\x00n\x00v\x00o\x00l\x00u\x00t\x00e\x00g\x00e\x00a\x00r\x00.\x00s\x00v\x00g\x00\x10\x0b\xfb\x14\x87\x00i\x00n\x00v\x00o\x00l\x00u\x00t\x00e\x00r\x00a\x00c\x00k\x00.\x00s\x00v\x00g\x00\x10\x0d \xb3\xe7\x00c\x00y\x00c\x00l\x00o\x00i\x00d\x00e\x00g\x00e\x00a\x00r\x00.\x00s\x00v\x00g"
-qt_resource_struct = b"\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x02\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00x\x00\x00\x00\x00\x00\x01\x00\x02\xd3\xaa\x00\x00\x00P\x00\x00\x00\x00\x00\x01\x00\x00\x8e\xc5\x00\x00\x000\x00\x00\x00\x00\x00\x01\x00\x00SE\x00\x00\x00\x9e\x00\x00\x00\x00\x00\x01\x00\x03\x0d]\x00\x00\x00\xc4\x00\x00\x00\x00\x00\x01\x00\x03`\xda\x00\x00\x00\x10\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00"
-def qInitResources():
- QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
-
-def qCleanupResources():
- QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
-
-qInitResources()
diff --git a/pygears/__init__.py b/pygears/__init__.py
new file mode 100644
index 0000000..bbca881
--- /dev/null
+++ b/pygears/__init__.py
@@ -0,0 +1 @@
+__version__ = "0.01"
\ No newline at end of file
diff --git a/gearfunc/_functions.py b/pygears/_functions.py
similarity index 100%
rename from gearfunc/_functions.py
rename to pygears/_functions.py
diff --git a/gearfunc/_bevel_tooth.py b/pygears/bevel_tooth.py
similarity index 100%
rename from gearfunc/_bevel_tooth.py
rename to pygears/bevel_tooth.py
diff --git a/gearfunc/computation.py b/pygears/computation.py
similarity index 100%
rename from gearfunc/computation.py
rename to pygears/computation.py
diff --git a/gearfunc/_cycloide_tooth.py b/pygears/cycloide_tooth.py
similarity index 100%
rename from gearfunc/_cycloide_tooth.py
rename to pygears/cycloide_tooth.py
diff --git a/gearfunc/_involute_tooth.py b/pygears/involute_tooth.py
similarity index 100%
rename from gearfunc/_involute_tooth.py
rename to pygears/involute_tooth.py
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..d68caa4
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,14 @@
+from setuptools import setup
+from pygears import __version__
+
+setup(name='gears',
+ version=str(__version__),
+ packages=['freecad',
+ 'freecad.gears',
+ 'pygears'],
+ maintainer="looooo",
+ maintainer_email="sppedflyer@gmail.com",
+ url="https://github.com/looooo/FCGear",
+ description="gears for FreeCAD",
+ install_requires=['numpy'],
+include_package_data=True)