adjust number of teeth drawn
This commit is contained in:
parent
ba38ed036c
commit
160052a23a
|
|
@ -55,7 +55,7 @@ fn main() {
|
||||||
let mut t = 0.0;
|
let mut t = 0.0;
|
||||||
|
|
||||||
let n_rack_teeth = 6;
|
let n_rack_teeth = 6;
|
||||||
let n_crown_teeth = 3;
|
let n_crown_teeth = 4;
|
||||||
|
|
||||||
let n_teeth = 24;
|
let n_teeth = 24;
|
||||||
let n_teeth_sample = n_teeth;
|
let n_teeth_sample = n_teeth;
|
||||||
|
|
@ -131,7 +131,7 @@ fn main() {
|
||||||
|
|
||||||
let make_crown = |profile| {
|
let make_crown = |profile| {
|
||||||
let mut crown_project = Vec::new();
|
let mut crown_project = Vec::new();
|
||||||
for tooth in -n_crown_teeth..=n_crown_teeth {
|
for tooth in -n_crown_teeth..n_crown_teeth {
|
||||||
for k in 0..n_points_per_tooth {
|
for k in 0..n_points_per_tooth {
|
||||||
let tooth_frac = k as f32 / n_points_per_tooth as f32;
|
let tooth_frac = k as f32 / n_points_per_tooth as f32;
|
||||||
let normal_height_at_r =
|
let normal_height_at_r =
|
||||||
|
|
@ -226,7 +226,7 @@ fn main() {
|
||||||
|
|
||||||
let mut pts_rack = Vec::new();
|
let mut pts_rack = Vec::new();
|
||||||
let mut pts_cutter = Vec::new();
|
let mut pts_cutter = Vec::new();
|
||||||
for tooth in -n_rack_teeth..=n_rack_teeth {
|
for tooth in -n_rack_teeth..n_rack_teeth {
|
||||||
for k in 0..n_points_per_tooth {
|
for k in 0..n_points_per_tooth {
|
||||||
let x = (tooth as f32 + k as f32 / n_points_per_tooth as f32 + rack_offset)
|
let x = (tooth as f32 + k as f32 / n_points_per_tooth as f32 + rack_offset)
|
||||||
* PI;
|
* PI;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user