def involute_points(self, num=10): pts = linspace(self.involute_start, self.involute_end, num=num) fx = self.involute_function_x() x = array(map(fx, pts)) fy = self.involute_function_y() y = array(map(fy, pts)) rot = rotation(self.involute_rot - self.backlash / 4) xy = rot(transpose(array([x, y]))) return(xy)
def undercut_points(self, num=10): pts = linspace(0, self.undercut_end, num=num) fx = self.undercut_function_x() x = array(map(fx, pts)) fy = self.undercut_function_y() y = array(map(fy, pts)) xy = transpose([x, y]) rotate = rotation( self.undercut_rot + self.phipart / 2 - self.backlash / 4) xy = rotate(xy) return(array(xy))
def points(self, num = 10): inner_x = self.hypocycloide_x() inner_y = self.hypocycloide_y() outer_x = self.epicycloide_x() outer_y = self.epicycloide_y() t_inner_end = self.inner_end() t_outer_end = self.outer_end() t_vals_outer = linspace(0, t_outer_end, num) t_vals_inner = linspace(t_inner_end,0,num) pts_outer_x = map(outer_x, t_vals_outer) pts_outer_y = map(outer_y, t_vals_outer) pts_inner_x = map(inner_x, t_vals_inner) pts_inner_y = map(inner_y, t_vals_inner) pts_outer = transpose([pts_outer_x, pts_outer_y]) pts_inner = transpose([pts_inner_x, pts_inner_y]) pts1 = vstack([pts_inner[:-2],pts_outer]) rot =rotation(self.phipart / 4 - self.backlash) pts1 = rot(pts1) ref = reflection(0.) pts2 = ref(pts1)[::-1] one_tooth = [pts1,array([pts1[-1],pts2[0]]), pts2] return(one_tooth)
def gearfunc(self, x): rot = rotation(2 * x / self.dw, self.midpoint) return(rot)