1
Fork 0

extract range

This commit is contained in:
Andy Killorin 2023-11-05 15:51:18 -06:00
parent e43d30dbc3
commit 61d9fc0579
Signed by: ank
GPG key ID: B6241CA3B552BCA4
2 changed files with 2 additions and 1 deletions

View file

@ -44,6 +44,7 @@ pub const ELEVATOR: WingConfig = WingConfig {
taper: ELEVATOR_TAPER, taper: ELEVATOR_TAPER,
struts: ELEVATOR_STRUTS, struts: ELEVATOR_STRUTS,
}; };
pub const TOPSPAR_RANGE: Range<f32> = 0.1..0.6;
pub const MIDSPAR_RANGE: Range<f32> = 0.1..0.4; pub const MIDSPAR_RANGE: Range<f32> = 0.1..0.4;
pub const STOCK_HEIGHT: f32 = 25.0 * IN2MM; pub const STOCK_HEIGHT: f32 = 25.0 * IN2MM;
pub const STOCK_WIDTH: f32 = 37.0 * IN2MM; pub const STOCK_WIDTH: f32 = 37.0 * IN2MM;

View file

@ -214,7 +214,7 @@ fn strut(airfoil: &SeligFile, chord: f32, width: f32, spar: &SparType) -> Constr
let strut_hole = { let strut_hole = {
match spar { match spar {
SparType::Top => topspar_negative(airfoil, chord, 0.1..0.6), SparType::Top => topspar_negative(airfoil, chord, TOPSPAR_RANGE),
SparType::Center => { SparType::Center => {
scad!(Translate2d(vec2(MIDSPAR_RANGE.start, 0.0)); scad!(Translate2d(vec2(MIDSPAR_RANGE.start, 0.0));
centered_square(vec2(MIDSPAR_RANGE.end - MIDSPAR_RANGE.start, CARDBOARD_WIDTH/ chord), (false,true)) centered_square(vec2(MIDSPAR_RANGE.end - MIDSPAR_RANGE.start, CARDBOARD_WIDTH/ chord), (false,true))