From da69bf747e38b10ce75e7348771b2209ec216508 Mon Sep 17 00:00:00 2001 From: mattmcw Date: Tue, 23 May 2023 11:50:15 -0400 Subject: [PATCH] Build and canonicalize all stl files from scad file. Autogenerate list of models from scad if statement at end of script --- build.sh | 8 +++++++- models.txt | 31 +++++++++++++++++++++++++++++-- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 6f41a5f..0d5407f 100644 --- a/build.sh +++ b/build.sh @@ -6,8 +6,14 @@ reset=`tput sgr0` echo "Building ${green}contact_printer${reset} project..." #build OpenSCAD models +mkdir -p stl + +cat scad/contact_printer.scad | grep "PART ==" | awk -F'==' '{print $2}' | awk -F'"' '{print $2}' | awk -F'"' '{print $1}' | sort > models.txt + while read m; do - echo $m + echo "Rendering $m..." + openscad -o "stl/contact_printer_$m.stl" -D "PART=\"$m\"" scad/contact_printer.scad + python scad/common/c14n_stl.py "stl/contact_printer_$m.stl" done < models.txt #run client tests? diff --git a/models.txt b/models.txt index 43bd5e3..b208df1 100644 --- a/models.txt +++ b/models.txt @@ -1,2 +1,29 @@ -light_housing -lamp_plate \ No newline at end of file +2020_tslot_insert +bearing_post_nut +corner_foot +daylight_spool_insert_reinforced +daylight_spool_insert_reinforced_nut +feed_panel_motor_mount +feed_panel_picture +feed_panel_stock +full_gate +gate_holder +idle_roller_half_a +idle_roller_half_b +lamp_LEDs +lamp_cover +lamp_dual +lamp_single +magnetic_coupling +motor_controller_panel +panel +picture_gate +slip_coupling +sound_gate +sprocketed_roller +sprocketed_roller_invert +super_gate +takeup_panel_picture +takeup_panel_picture_motor_mount +takeup_panel_stock +takeup_panel_stock_motor_mount