use a crown cutter
it's not exactly correct for a bevel gear though
This commit is contained in:
parent
52baff44c3
commit
e46b68003d
|
|
@ -55,6 +55,8 @@ fn main() {
|
|||
|
||||
let n_rack_teeth = 10;
|
||||
|
||||
let r_crown = 18.0;
|
||||
|
||||
let n_teeth = 36;
|
||||
let n_teeth_sample = n_teeth;
|
||||
let r_pitch = 0.5 * n_teeth as f32;
|
||||
|
|
@ -95,7 +97,11 @@ fn main() {
|
|||
let gear_offset = t * TPS - (n_teeth_sample as f32 + 5.0);
|
||||
let rack_offset = (t * TPS).fract_gl();
|
||||
|
||||
let rack_y_at_x = |x, profile| rack_shape(x - rack_offset * PI, profile);
|
||||
let rack_y_at_x = |x, profile| {
|
||||
let angle = f32::atan2(x, r_crown);
|
||||
let vx = angle * r_crown;
|
||||
rack_shape(vx - rack_offset * PI, profile)
|
||||
};
|
||||
let cutter_y_at_x = |x| rack_y_at_x(x, &cutter_profile);
|
||||
|
||||
let kr_to_xy = |k, r: f32| {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user