added some possibilities to influence the involute-gear profile
This commit is contained in:
@@ -95,8 +95,12 @@ class involute_gear():
|
||||
obj.addProperty(
|
||||
"App::PropertyAngle", "beta", "gear_parameter", "beta ")
|
||||
obj.addProperty(
|
||||
"App::PropertyLength", "backlash", "gear_parameter", "backlash in mm")
|
||||
obj.addProperty("App::PropertyPythonObject", "gear", "test", "test")
|
||||
"App::PropertyLength", "backlash", "tolerance", "backlash")
|
||||
obj.addProperty(
|
||||
"App::PropertyBool", "reversed_backlash", "tolerance", "backlash direction")
|
||||
obj.addProperty(
|
||||
"App::PropertyFloat", "head", "gear_parameter", "head_value * modul_value = additional length of head")
|
||||
obj.addProperty("App::PropertyPythonObject", "gear", "gear_parameter", "test")
|
||||
obj.gear = self.involute_tooth
|
||||
obj.simple = False
|
||||
obj.undercut = False
|
||||
@@ -107,8 +111,10 @@ class involute_gear():
|
||||
obj.beta = '0. deg'
|
||||
obj.height = '5. mm'
|
||||
obj.clearance = 0.25
|
||||
obj.head = 0.
|
||||
obj.numpoints = 6
|
||||
obj.backlash = '0.00 mm'
|
||||
obj.reversed_backlash = False
|
||||
self.obj = obj
|
||||
obj.Proxy = self
|
||||
|
||||
@@ -120,7 +126,8 @@ class involute_gear():
|
||||
fp.gear.pressure_angle = fp.pressure_angle.Value * pi / 180.
|
||||
fp.gear.beta = fp.beta.Value * pi / 180
|
||||
fp.gear.clearance = fp.clearance
|
||||
fp.gear.backlash = fp.backlash.Value
|
||||
fp.gear.backlash = fp.backlash.Value * (-fp.reversed_backlash + 0.5) * 2.
|
||||
fp.gear.head = fp.head
|
||||
fp.gear._update()
|
||||
pts = fp.gear.points(num=fp.numpoints)
|
||||
rotated_pts = pts
|
||||
@@ -223,7 +230,7 @@ class cycloide_gear():
|
||||
obj.addProperty("App::PropertyAngle", "beta", "gear_parameter", "beta")
|
||||
obj.addProperty(
|
||||
"App::PropertyLength", "backlash", "gear_parameter", "backlash in mm")
|
||||
obj.addProperty("App::PropertyPythonObject", "gear", "test", "test")
|
||||
obj.addProperty("App::PropertyPythonObject", "gear", "gear_parameter", "test")
|
||||
obj.gear = self.cycloide_tooth
|
||||
obj.teeth = 15
|
||||
obj.module = '1. mm'
|
||||
@@ -298,7 +305,7 @@ class bevel_gear():
|
||||
"gear_parameter", "number of points for spline")
|
||||
obj.addProperty(
|
||||
"App::PropertyLength", "backlash", "gear_parameter", "backlash in mm")
|
||||
obj.addProperty("App::PropertyPythonObject", "gear", "test", "test")
|
||||
obj.addProperty("App::PropertyPythonObject", "gear", "gear_paramenter", "test")
|
||||
obj.gear = self.bevel_tooth
|
||||
obj.m = '1. mm'
|
||||
obj.teeth = 15
|
||||
|
||||
@@ -25,7 +25,8 @@ from ._functions import nearestpts, rotation, reflection, trimfunc, norm, transl
|
||||
import numpy as np
|
||||
|
||||
class involute_tooth():
|
||||
def __init__(self, m=5, z=15, pressure_angle=20 * pi / 180., clearance=0.12, shift=0.5, beta=0., undercut=False, backlash=0.00):
|
||||
def __init__(self, m=5, z=15, pressure_angle=20 * pi / 180., clearance=0.12, shift=0.5, beta=0.,
|
||||
undercut=False, backlash=0.00, head=0.00):
|
||||
self.pressure_angle = pressure_angle
|
||||
self.beta = beta
|
||||
self.m_n = m
|
||||
@@ -34,16 +35,18 @@ class involute_tooth():
|
||||
self.shift = shift
|
||||
self.clearance = clearance
|
||||
self.backlash = backlash
|
||||
self.head = head # factor, rename!!!
|
||||
self._calc_gear_factors()
|
||||
|
||||
def _calc_gear_factors(self):
|
||||
print(self.head)
|
||||
self.pressure_angle_t = arctan(tan(self.pressure_angle) / cos(self.beta))
|
||||
self.m = self.m_n / cos(self.beta)
|
||||
self.c = self.clearance * self.m_n
|
||||
self.midpoint = [0., 0.]
|
||||
self.d = self.z * self.m
|
||||
self.dw = self.m * self.z
|
||||
self.da = self.dw + 2. * self.m_n + 2. * self.shift * self.m_n
|
||||
self.da = self.dw + 2. * self.m_n + 2. * (self.shift + self.head) * self.m_n
|
||||
self.df = self.dw - 2. * self.m_n - \
|
||||
2 * self.c + 2. * self.shift * self.m_n
|
||||
self.dg = self.d * cos(self.pressure_angle_t)
|
||||
@@ -146,7 +149,7 @@ class involute_tooth():
|
||||
def _update(self):
|
||||
self.__init__(m = self.m_n, z = self.z,
|
||||
pressure_angle = self.pressure_angle, clearance = self.clearance, shift = self.shift,
|
||||
beta = self.beta, undercut = self.undercut, backlash = self.backlash)
|
||||
beta = self.beta, undercut = self.undercut, backlash = self.backlash, head = self.head)
|
||||
|
||||
|
||||
class involute_rack(object):
|
||||
|
||||
Reference in New Issue
Block a user