Skip to content

Commit

Permalink
added script to render all presets
Browse files Browse the repository at this point in the history
  • Loading branch information
moucha19 committed Apr 18, 2021
1 parent 0aadcc2 commit 0c8c565
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
24 changes: 24 additions & 0 deletions render.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

MAIN=./scad/main.scad
PRESETS=./scad/main.json
OUT_DIR=./stl
FN=100

#bases and lids
openscad $MAIN -p $PRESETS -P "6 mm - straight" -D "part_select_cmd=1" -D "\$fn=$FN" -o ${OUT_DIR}/6.0_base.stl
openscad $MAIN -p $PRESETS -P "8 mm - straight" -D "part_select_cmd=1" -D "\$fn=$FN" -o ${OUT_DIR}/8.0_base.stl
openscad $MAIN -p $PRESETS -P "6 mm - straight" -D "part_select_cmd=3" -D "\$fn=$FN" -o ${OUT_DIR}/6.0_lid.stl
openscad $MAIN -p $PRESETS -P "8 mm - straight" -D "part_select_cmd=3" -D "\$fn=$FN" -o ${OUT_DIR}/8.0_lid.stl

#different arms
openscad $MAIN -p $PRESETS -P "6 mm - straight" -D "part_select_cmd=2" -D "\$fn=$FN" -o ${OUT_DIR}/6.0_arm_straight.stl
openscad $MAIN -p $PRESETS -P "8 mm - straight" -D "part_select_cmd=2" -D "\$fn=$FN" -o ${OUT_DIR}/8.0_arm_straight.stl
openscad $MAIN -p $PRESETS -P "6 mm - helical/right/3.5" -D "part_select_cmd=2" -D "\$fn=$FN" -o ${OUT_DIR}/6.0_arm_helical-right-3.5.stl
openscad $MAIN -p $PRESETS -P "8 mm - helical/right/3.5" -D "part_select_cmd=2" -D "\$fn=$FN" -o ${OUT_DIR}/8.0_arm_helical-right-3.5.stl

#full jigs
openscad $MAIN -p $PRESETS -P "6 mm - straight" -D "part_select_cmd=0" -D "\$fn=$FN" -o ${OUT_DIR}/jig_6.0_straight.stl
openscad $MAIN -p $PRESETS -P "8 mm - straight" -D "part_select_cmd=0" -D "\$fn=$FN" -o ${OUT_DIR}/jig_8.0_straight.stl
openscad $MAIN -p $PRESETS -P "6 mm - helical/right/3.5" -D "part_select_cmd=0" -D "\$fn=$FN" -o ${OUT_DIR}/jig_6.0_helical-right-3.5.stl
openscad $MAIN -p $PRESETS -P "8 mm - helical/right/3.5" -D "part_select_cmd=0" -D "\$fn=$FN" -o ${OUT_DIR}/jig_8.0_helical-right-3.5.stl
15 changes: 14 additions & 1 deletion scad/main.scad
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ use <fletching_jig.scad>

// Quality of the generated round elements of the jig. Higher values will generate more polygons, smoother surfaces and slow down the computations.
$fn=30; // [10:10:100]
part_select = 0; //[0:All, 1:Base only, 2:Arm only, 3:Lid only]
// Select which part of the jig you want to show
part_select_gui = 0; //[0:All, 1:Base only, 2:Arm only, 3:Lid only]

/* [Hidden] */
part_select_cmd = -1;
part_select = part_select_cmd < 0 ? part_select_gui : part_select_cmd;

/* [Jig settings] */

Expand Down Expand Up @@ -60,6 +65,14 @@ helical_adjust = 3.5; //[0:0.1:30]
// Direction of the helical fletching and thus the arrow spin direction.
helical_direction = 1;//[1:left, -1:right]

// Verbose info for command line rendering
if (part_select_cmd != -1)
{
echo(str("Selected part = ", part_select));
echo(str("Arrow diameter = ", arrow_diameter));
echo(str("Vane turn style = ", helical == 1 ? "Helical" : "Offset"));
}

jig (
part_select,
arrow_diameter,
Expand Down

0 comments on commit 0c8c565

Please sign in to comment.