From fbf1dda6b571e518e42e53186edc06760836b76e Mon Sep 17 00:00:00 2001 From: looooo Date: Wed, 27 Jan 2016 17:09:02 +0100 Subject: [PATCH] python3 updates --- InitGui.py | 2 +- gear_rc.py | 6 +++--- gearfunc/_Classes.py | 8 ++++---- gearfunc/__init__.py | 2 +- gearfunc/_bevel_tooth.py | 2 +- gearfunc/_cycloide_tooth.py | 4 ++-- gearfunc/_involute_tooth.py | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/InitGui.py b/InitGui.py index 8c02c16..f9a3267 100644 --- a/InitGui.py +++ b/InitGui.py @@ -21,7 +21,7 @@ import FreeCADGui as Gui import FreeCAD import gear_rc - +import gearfunc class gearWorkbench(Gui.Workbench): """glider workbench""" diff --git a/gear_rc.py b/gear_rc.py index 715e630..a7d0f1f 100644 --- a/gear_rc.py +++ b/gear_rc.py @@ -9,7 +9,7 @@ from PySide import QtCore -qt_resource_data = "\ +qt_resource_data = b"\ \x00\x00\xb1\x46\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ @@ -12845,7 +12845,7 @@ qt_resource_data = "\ \x3f\x0b\x78\x4d\x15\xb1\x37\xcf\xfe\x07\xb9\x28\x0f\xf8\ " -qt_resource_name = "\ +qt_resource_name = b"\ \x00\x05\ \x00\x6f\xa6\x53\ \x00\x69\ @@ -12873,7 +12873,7 @@ qt_resource_name = "\ \x00\x79\x00\x63\x00\x6c\x00\x6f\x00\x69\x00\x64\x00\x65\x00\x67\x00\x65\x00\x61\x00\x72\x00\x2e\x00\x73\x00\x76\x00\x67\ " -qt_resource_struct = "\ +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\x05\x00\x00\x00\x02\ \x00\x00\x00\x58\x00\x01\x00\x00\x00\x01\x00\x02\xf6\x2f\ diff --git a/gearfunc/_Classes.py b/gearfunc/_Classes.py index 72f3e58..7876070 100644 --- a/gearfunc/_Classes.py +++ b/gearfunc/_Classes.py @@ -22,14 +22,14 @@ from __future__ import division import os import FreeCAD as App -from _involute_tooth import involute_tooth, involute_rack -from _cycloide_tooth import cycloide_tooth -from _bevel_tooth import bevel_tooth +from ._involute_tooth import involute_tooth, involute_rack +from ._cycloide_tooth import cycloide_tooth +from ._bevel_tooth import bevel_tooth from Part import BSplineCurve, Shape, Wire, Face, makePolygon, \ BRepOffsetAPI, Shell, makeLoft, Solid, Line, BSplineSurface, Compound,\ show, makePolygon, makeLoft, makeHelix import Part -from _functions import rotation3D +from ._functions import rotation3D from numpy import pi, cos, sin, tan import numpy diff --git a/gearfunc/__init__.py b/gearfunc/__init__.py index 3fe07f3..55c4005 100644 --- a/gearfunc/__init__.py +++ b/gearfunc/__init__.py @@ -21,7 +21,7 @@ import FreeCAD import FreeCADGui as Gui -from _Classes import * +from ._Classes import * class CreateInvoluteGear(): diff --git a/gearfunc/_bevel_tooth.py b/gearfunc/_bevel_tooth.py index 34addae..f0ae963 100644 --- a/gearfunc/_bevel_tooth.py +++ b/gearfunc/_bevel_tooth.py @@ -23,7 +23,7 @@ from __future__ import division from __future__ import division from numpy import cos, sin, tan, arccos, arctan, pi, array, linspace, transpose, vstack, sqrt import numpy as np -from _functions import rotation3D, reflection3D, intersection_line_circle +from ._functions import rotation3D, reflection3D, intersection_line_circle diff --git a/gearfunc/_cycloide_tooth.py b/gearfunc/_cycloide_tooth.py index 87de48d..872573f 100644 --- a/gearfunc/_cycloide_tooth.py +++ b/gearfunc/_cycloide_tooth.py @@ -22,7 +22,7 @@ from __future__ import division from __future__ import division from numpy import cos, sin, arccos, pi, array, linspace, transpose, vstack -from _functions import rotation, reflection +from ._functions import rotation, reflection class cycloide_tooth(): def __init__(self, z1 = 5, z2 = 5, z = 14, m = 5, clearance = 0.12, backlash = 0.00): @@ -35,7 +35,7 @@ class cycloide_tooth(): self._calc_gear_factors() def _calc_gear_factors(self): - self.d1 = self.z1 * self.m + self.d1 = self.z1 * self.m self.d2 = self.z2 * self.m self.phi = self.m * pi self.d = self.z * self.m diff --git a/gearfunc/_involute_tooth.py b/gearfunc/_involute_tooth.py index 4560492..06f3fc5 100644 --- a/gearfunc/_involute_tooth.py +++ b/gearfunc/_involute_tooth.py @@ -21,7 +21,7 @@ from __future__ import division from numpy import tan, cos, sin, sqrt, arctan, pi, array, linspace, transpose, vstack, ndarray -from _functions import nearestpts, rotation, reflection, trimfunc, norm, translation +from ._functions import nearestpts, rotation, reflection, trimfunc, norm, translation import numpy as np class involute_tooth():