added more spars
This commit is contained in:
parent
bb17e29e10
commit
7606de7bad
2 changed files with 12 additions and 5 deletions
|
@ -4,13 +4,13 @@
|
||||||
const IN2MM: f32 = 25.4;
|
const IN2MM: f32 = 25.4;
|
||||||
pub const CHORD: f32 = 11.2 * IN2MM;
|
pub const CHORD: f32 = 11.2 * IN2MM;
|
||||||
pub const WINGSPAN: f32 = 45.0 * IN2MM;
|
pub const WINGSPAN: f32 = 45.0 * IN2MM;
|
||||||
pub const LENGTH: f32 = 0.0;
|
pub const LENGTH: f32 = 30.0*IN2MM;
|
||||||
/// strut count in the main wing
|
/// strut count in the main wing
|
||||||
pub const STRUTS: usize = 20;
|
pub const STRUTS: usize = 20;
|
||||||
pub const CARDBOARD_WIDTH: f32 = 2.4;
|
pub const CARDBOARD_WIDTH: f32 = 2.4;
|
||||||
/// length of each side of the triangular spar
|
/// length of each side of the triangular spar
|
||||||
pub const SPAR_SIDE_WIDTH: f32 = 0.75 * IN2MM;
|
pub const SPAR_SIDE_WIDTH: f32 = 0.75 * IN2MM;
|
||||||
pub const FUSELAGE_GAP: f32 = 10.0 * IN2MM;
|
pub const FUSELAGE_GAP: f32 = 2.0 * IN2MM;
|
||||||
/// a very large number, used to place unknown objects such that they do not intersect
|
/// a very large number, used to place unknown objects such that they do not intersect
|
||||||
pub const INF: f32 = 1000.0;
|
pub const INF: f32 = 1000.0;
|
||||||
pub const RUDDER_HEIGHT: f32 = 5.0 *IN2MM;
|
pub const RUDDER_HEIGHT: f32 = 5.0 *IN2MM;
|
||||||
|
|
13
src/main.rs
13
src/main.rs
|
@ -26,7 +26,7 @@ fn main() {
|
||||||
// struts
|
// struts
|
||||||
for port in [true,false] {
|
for port in [true,false] {
|
||||||
let mut wing = wing(&wing_airfoil, STRUTS/2, WINGSPAN/2.0, CHORD, CHORD * 0.8);
|
let mut wing = wing(&wing_airfoil, STRUTS/2, WINGSPAN/2.0, CHORD, CHORD * 0.8);
|
||||||
wing = scad!(Translate(vec3(0.0, 10.0,0.0)); wing);
|
wing = scad!(Translate(vec3(0.0, FUSELAGE_GAP,0.0)); wing);
|
||||||
if port {
|
if port {
|
||||||
wing = scad!(Mirror(vec3(0.0, 1.0, 0.0)); wing);
|
wing = scad!(Mirror(vec3(0.0, 1.0, 0.0)); wing);
|
||||||
}
|
}
|
||||||
|
@ -34,12 +34,19 @@ fn main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// spars
|
// spars
|
||||||
scad_file.add_object(spar(WINGSPAN, true));
|
// main wing
|
||||||
|
scad_file.add_object(spar(WINGSPAN+FUSELAGE_GAP*2.0, true));
|
||||||
|
|
||||||
|
// "fuselage"
|
||||||
|
scad_file.add_object(scad!(Rotate(-90.0, vec3(0.0, 0.0, 1.0));
|
||||||
|
spar(LENGTH, false))
|
||||||
|
);
|
||||||
|
|
||||||
// rudder
|
// rudder
|
||||||
let mut rudder = scad!(Rotate(90.0, vec3(1.0, 0.0, 0.0)));
|
let mut rudder = scad!(Rotate(90.0, vec3(1.0, 0.0, 0.0)));
|
||||||
rudder.add_child(wing(&control_airfoil, RUDDER_STRUTS, RUDDER_HEIGHT, RUDDER_CHORD, RUDDER_CHORD * RUDDER_TAPER));
|
rudder.add_child(wing(&control_airfoil, RUDDER_STRUTS, RUDDER_HEIGHT, RUDDER_CHORD, RUDDER_CHORD * RUDDER_TAPER));
|
||||||
|
rudder.add_child(spar(RUDDER_HEIGHT, false));
|
||||||
|
rudder = scad!(Translate(vec3(LENGTH-RUDDER_CHORD, 0.0, 0.0)); rudder);
|
||||||
scad_file.add_object(rudder);
|
scad_file.add_object(rudder);
|
||||||
|
|
||||||
let cardboard = vec3(0.38, 0.26, 0.26);
|
let cardboard = vec3(0.38, 0.26, 0.26);
|
||||||
|
|
Loading…
Reference in a new issue