added second airfoil
please don't kill me for hotlinking your forum :)
This commit is contained in:
parent
dfec13c0a7
commit
319bc8b1fe
3 changed files with 21 additions and 10 deletions
16
Makefile
16
Makefile
|
@ -1,9 +1,15 @@
|
|||
build/%.scad: e393.selig src/*.rs
|
||||
build/%.scad: e393.dat edgevertical.dat src/*.rs
|
||||
mkdir -p build
|
||||
cargo run
|
||||
|
||||
e393.selig:
|
||||
curl http://airfoiltools.com/airfoil/seligdatfile?airfoil=e393-il > e393.selig
|
||||
e393.dat:
|
||||
curl http://airfoiltools.com/airfoil/seligdatfile?airfoil=e393-il -o e393.dat
|
||||
|
||||
edgevertical.zip:
|
||||
curl "https://www.rcgroups.com/forums/showatt.php?attachmentid=2973018&d=1262752423" -o edgevertical.zip
|
||||
|
||||
edgevertical.dat: edgevertical.zip
|
||||
unzip -p edgevertical.zip Edge-Vertical.dat > edgevertical.dat
|
||||
|
||||
build/%.png: build/%.scad
|
||||
OpenSCAD --colorscheme Metallic -o $@ $<
|
||||
|
@ -20,10 +26,6 @@ build/%.dxf: build/%.scad
|
|||
build/%.dwg: build/%.svg
|
||||
svg2dwg -no-gui -no-dock-icon -o $@ $<
|
||||
|
||||
build/nested.dxf: build/%.dxf
|
||||
svg2dwg
|
||||
dwgnest -o output.dxf -s sheet_layer -p cutting_layer input.dxf
|
||||
|
||||
.PHONY: svgs dxfs clean nest
|
||||
svgs: build/%.scad
|
||||
ls build/part*.scad | sed 's/scad/svg/' | xargs make
|
||||
|
|
|
@ -11,3 +11,5 @@ pub const CARDBOARD_WIDTH: f32 = 2.4;
|
|||
/// length of each side of the triangular spar
|
||||
pub const SPAR_SIDE_WIDTH: f32 = 0.75 * IN2MM;
|
||||
pub const FUSELAGE_GAP: f32 = 10.0 * IN2MM;
|
||||
/// a very large number, used to place unknown objects such that they do not intersect
|
||||
pub const INF: f32 = 1000.0;
|
||||
|
|
13
src/main.rs
13
src/main.rs
|
@ -16,10 +16,10 @@ fn main() {
|
|||
scad_file.set_detail(50);
|
||||
|
||||
// cambered airfoil, used in the wing
|
||||
let e393: Airfoil = selig::parse(include_str!("../e393.selig"));
|
||||
let e393: Airfoil = selig::parse(include_str!("../e393.dat"));
|
||||
|
||||
// symetric airfoil, used in the control surfaces
|
||||
let exxx: Airfoil = selig::parse(include_str!("../e393.selig"));
|
||||
let exxx: Airfoil = selig::parse(include_str!("../edgevertical.dat"));
|
||||
|
||||
let mut wing = scad!(Translate(vec3(0.0,0.0,0.0)));
|
||||
|
||||
|
@ -51,12 +51,19 @@ fn main() {
|
|||
|
||||
scad_file.write_to_file(String::from("build/assembly.scad"));
|
||||
|
||||
for (idx, part) in PARTS.lock().unwrap().to_owned().into_iter().enumerate() {
|
||||
for (idx, part) in PARTS.lock().unwrap().clone().into_iter().enumerate() {
|
||||
let mut file = ScadFile::new();
|
||||
file.set_detail(50);
|
||||
file.add_object(part);
|
||||
file.write_to_file(format!("build/part{idx}.scad"));
|
||||
}
|
||||
|
||||
let mut allparts = ScadFile::new();
|
||||
allparts.set_detail(50);
|
||||
for (idx, part) in PARTS.lock().unwrap().to_owned().into_iter().enumerate() {
|
||||
allparts.add_object(scad!(Translate2d(vec2(0.0, INF * idx as f32)); part));
|
||||
}
|
||||
allparts.write_to_file(format!("build/allparts.scad"));
|
||||
}
|
||||
|
||||
/// returns a extruded airfoil with the given dimensions
|
||||
|
|
Loading…
Reference in a new issue