patch to the topwing
This commit is contained in:
parent
2f00aaec57
commit
7e9cd942fb
2 changed files with 11 additions and 5 deletions
|
@ -23,4 +23,4 @@ pub const ELEVATOR_CHORD: f32 = 5.0 *IN2MM;
|
|||
pub const ELEVATOR_TAPER: f32 = 0.7;
|
||||
pub const ELEVATOR_STRUTS: usize = 4;
|
||||
pub const STOCK_HEIGHT: f32 = 25.0 *IN2MM;
|
||||
pub const STOCK_WIDTH: f32 = 36.0 *IN2MM;
|
||||
pub const STOCK_WIDTH: f32 = 37.0 *IN2MM;
|
||||
|
|
14
src/main.rs
14
src/main.rs
|
@ -38,7 +38,13 @@ fn main() {
|
|||
for port in [true,false] {
|
||||
let mut wing = wing(&wing_airfoil, STRUTS/2, WINGSPAN/2.0, CHORD, CHORD * WING_TAPER, SparType::Top);
|
||||
let top_spar = topwing_spar(&wing_airfoil, STRUTS/2, WINGSPAN/2.0, CHORD, CHORD * WING_TAPER);
|
||||
register_part(scad!(Projection(false); top_spar));
|
||||
|
||||
let mut top_spar_neg = scad!(Difference; top_spar);
|
||||
top_spar_neg.add_child(wing.clone());
|
||||
|
||||
wing.add_child(scad!(NamedColor("red".to_string()); top_spar_neg.clone()));
|
||||
|
||||
register_part(scad!(Projection(false); top_spar_neg));
|
||||
wing = scad!(Translate(vec3(0.0, FUSELAGE_GAP,0.0)); wing);
|
||||
if port {
|
||||
wing = scad!(Mirror(vec3(0.0, 1.0, 0.0)); wing);
|
||||
|
@ -64,7 +70,7 @@ fn main() {
|
|||
// elevator
|
||||
let mut elevator = scad!(Translate(vec3(LENGTH-ELEVATOR_CHORD, 0.0,0.0)));
|
||||
for port in [true,false] {
|
||||
let mut wing = wing(&control_airfoil, ELEVATOR_STRUTS, ELEVATOR_HEIGHT, ELEVATOR_CHORD, ELEVATOR_CHORD * ELEVATOR_TAPER, SparType::Top);
|
||||
let mut wing = wing(&wing_airfoil, ELEVATOR_STRUTS, ELEVATOR_HEIGHT, ELEVATOR_CHORD, ELEVATOR_CHORD * ELEVATOR_TAPER, SparType::Top);
|
||||
wing = scad!(Translate(vec3(0.0, FUSELAGE_GAP,0.0)); wing);
|
||||
if port {
|
||||
wing = scad!(Mirror(vec3(0.0, 1.0, 0.0)); wing);
|
||||
|
@ -252,8 +258,8 @@ fn topwing_spar(aerofoil: &Airfoil, struts: usize, length: f32, chord: f32, tape
|
|||
|
||||
let mut last_t = scad!(Translate(vec3(0.0, -gap ,0.0)));
|
||||
last_t.add_child(scad!(LinearExtrude(extrude.clone()); last));
|
||||
hull.add_child(last_t);
|
||||
hull.add_child(scad!(LinearExtrude(extrude); shape.clone()));
|
||||
//hull.add_child(last_t);
|
||||
//hull.add_child(scad!(LinearExtrude(extrude); shape.clone()));
|
||||
|
||||
transform.add_child(hull);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue