made top spar fit in tiny case
This commit is contained in:
parent
22b3ff0b7f
commit
96f9134f24
1 changed files with 5 additions and 3 deletions
|
@ -84,7 +84,7 @@ fn main() {
|
|||
|
||||
let mut test = ScadFile::new();
|
||||
let test_airfoil = SeligFile::parse(include_str!("../m1-il.dat"));
|
||||
let wing = wing(&test_airfoil, &RUDDER, SparType::Center);
|
||||
let wing = wing(&test_airfoil, &RUDDER, SparType::Top);
|
||||
test.add_object(scad!(NamedColor("clear-blue".to_string()); wing.0.visualization));
|
||||
test.add_object(scad!(NamedColor("clear-red".to_string()); wing.1.visualization));
|
||||
test.write_to_file(String::from("build/testwing.scad"));
|
||||
|
@ -248,7 +248,8 @@ fn strut(airfoil: &SeligFile, chord: f32, width: f32, spar: &SparType) -> Constr
|
|||
let scaled = scad!(Scale(unit * chord); shape);
|
||||
parts.push(scaled.clone());
|
||||
let mut strut = scad!(LinearExtrude(extrude); scaled);
|
||||
strut = scad!(Rotate(-90.0, vec3(1.0, 0.0, 0.0)); strut);
|
||||
strut = scad!(Translate(vec3(0.0,0.0,-width)); strut);
|
||||
strut = scad!(Rotate(90.0, vec3(1.0, 0.0, 0.0)); strut);
|
||||
Construct {
|
||||
visualization: strut,
|
||||
parts,
|
||||
|
@ -276,6 +277,7 @@ fn extrude_strut(
|
|||
let unit: Vector3<f32> = Vector3::new(1.0, 1.0, 1.0);
|
||||
let scaled = scad!(Scale(unit * chord); shape);
|
||||
let strut = scad!(LinearExtrude(extrude); scaled);
|
||||
let strut = scad!(Translate(vec3(0.0, 0.0, -width/2.0)); strut);
|
||||
let rotated = scad!(Rotate(90.0, vec3(1.0, 0.0, 0.0)); strut);
|
||||
rotated
|
||||
}
|
||||
|
@ -374,7 +376,7 @@ fn topwing_spar(
|
|||
|
||||
let spacing = strut_idx as f32 * gap;
|
||||
|
||||
let shape = topspar_negative(aerofoil, chord, 0.1..0.6);
|
||||
let shape = topspar_negative(aerofoil, chord, TOPSPAR_RANGE);
|
||||
let extruded = extrude_strut(shape.clone(), scad!(Union), CARDBOARD_WIDTH, chord);
|
||||
|
||||
let mut transform = scad!(Translate(vec3(0.0, spacing, 0.0)));
|
||||
|
|
Loading…
Reference in a new issue