Update to the new scad.sh method, remove the old Makefile
This commit is contained in:
parent
ab075b93c2
commit
c785f0c002
|
@ -1,3 +1,3 @@
|
||||||
[submodule "common"]
|
[submodule "scad/common"]
|
||||||
path = scad/common
|
path = scad/common
|
||||||
url = https://git.sixteenmillimeter.com/modules/common.git
|
url = https://git.sixteenmillimeter.com/modules/common.git
|
||||||
|
|
26
Makefile
26
Makefile
|
@ -1,26 +0,0 @@
|
||||||
|
|
||||||
SRC=scad/bolex_rewind_key.scad
|
|
||||||
IM=convert
|
|
||||||
OPENSCAD=openscad
|
|
||||||
OPENSCAD_OPTIONS=--enable manifold -D VERBOSE=false --export-format=asciistl
|
|
||||||
THEME=DeepOcean
|
|
||||||
OPENSCAD_IMAGE=--enable manifold --viewall --render --imgsize=512,512 --colorscheme=$(THEME)
|
|
||||||
ORDER_STL=python3 scad/common/c14n_stl.py
|
|
||||||
|
|
||||||
all: bolex_rewind_key bolex_rewind_key_handle
|
|
||||||
|
|
||||||
bolex_rewind_key : $(SRC)
|
|
||||||
echo "Generating $@.stl from $(SRC)..."
|
|
||||||
$(OPENSCAD) $(OPENSCAD_OPTIONS) -o stl/$@.stl -D PART=\"$@\" $(SRC)
|
|
||||||
$(ORDER_STL) stl/$@.stl
|
|
||||||
$(OPENSCAD) $(OPENSCAD_IMAGE) -o img/$@.png -D PART=\"$@\" $(SRC)
|
|
||||||
$(IM) img/$@.png img/$@.jpg
|
|
||||||
rm img/$@.png
|
|
||||||
|
|
||||||
bolex_rewind_key_handle : $(SRC)
|
|
||||||
echo "Generating $@.stl from $(SRC)..."
|
|
||||||
$(OPENSCAD) $(OPENSCAD_OPTIONS) -o stl/$@.stl -D PART=\"$@\" $(SRC)
|
|
||||||
$(ORDER_STL) stl/$@.stl
|
|
||||||
$(OPENSCAD) $(OPENSCAD_IMAGE) -o img/$@.png -D PART=\"$@\" $(SRC)
|
|
||||||
$(IM) img/$@.png img/$@.jpg
|
|
||||||
rm img/$@.png
|
|
Binary file not shown.
After ![]() (image error) Size: 24 KiB |
Binary file not shown.
After ![]() (image error) Size: 24 KiB |
|
@ -22,9 +22,10 @@
|
||||||
"src" : [
|
"src" : [
|
||||||
"README.md",
|
"README.md",
|
||||||
"LICENSE",
|
"LICENSE",
|
||||||
"Makefile",
|
"scad.sh",
|
||||||
"scad/bolex_rewind_key.scad",
|
"scad/bolex_rewind_key.scad",
|
||||||
"scad/common/knurledFinishLib_v2.scad",
|
"scad/common/knurledFinishLib_v2.scad",
|
||||||
|
"scad/common/scad.sh",
|
||||||
"scad/common/c14n_stl.py"
|
"scad/common/c14n_stl.py"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
bash scad/common/scad.sh scad/bolex_rewind_key.scad
|
|
@ -1,14 +1,15 @@
|
||||||
include <./common/knurledFinishLib_v2.scad>;
|
use <./common/common.scad>;
|
||||||
|
use <./common/knurledFinishLib_v2.scad>;
|
||||||
|
|
||||||
$fn = 90;
|
$fn = 90;
|
||||||
|
|
||||||
module key () {
|
module key () {
|
||||||
difference () {
|
difference () {
|
||||||
cylinder(r = 6.7 / 2, h = 5, center = true);
|
cylinder(r = R(6.7), h = 5, center = true);
|
||||||
cylinder(r = 4.76 / 2, h = 5, center = true);
|
cylinder(r = R(4.76), h = 5, center = true);
|
||||||
}
|
}
|
||||||
translate ([0, 0, -7.5]) {
|
translate ([0, 0, -7.5]) {
|
||||||
cylinder(r = 6.7 / 2, h = 10, center = true);
|
cylinder(r = R(6.7), h = 10, center = true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,12 +21,12 @@ module keyHole () {
|
||||||
|
|
||||||
module body () {
|
module body () {
|
||||||
translate([0, 0, -13.5]){
|
translate([0, 0, -13.5]){
|
||||||
cylinder(r = 5, h = 2, center = true);
|
cylinder(r = R(10), h = 2, center = true);
|
||||||
}
|
}
|
||||||
translate([0, 0, -16]) {
|
translate([0, 0, -16]) {
|
||||||
cylinder(r = 5, h = 3, center = true);
|
cylinder(r = R(10), h = 3, center = true);
|
||||||
translate([20, 0, 0]) {
|
translate([20, 0, 0]) {
|
||||||
cylinder(r = 5, h = 3, center = true);
|
cylinder(r = R(10), h = 3, center = true);
|
||||||
}
|
}
|
||||||
translate([10, 0, 0]){
|
translate([10, 0, 0]){
|
||||||
cube([20, 10, 3], center = true);
|
cube([20, 10, 3], center = true);
|
||||||
|
@ -36,7 +37,7 @@ module body () {
|
||||||
module pinHole () {
|
module pinHole () {
|
||||||
pin_d = 5.34;
|
pin_d = 5.34;
|
||||||
translate([20, 0, -16.5]) {
|
translate([20, 0, -16.5]) {
|
||||||
cylinder(r = pin_d / 2, h = 4, center = true);
|
cylinder(r = R(pin_d), h = 4, center = true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,9 +47,9 @@ module pin () {
|
||||||
pin_d = 5.34 - 0.015;
|
pin_d = 5.34 - 0.015;
|
||||||
pin_h = 17.3;
|
pin_h = 17.3;
|
||||||
notch = 3;
|
notch = 3;
|
||||||
cylinder(r = base_d / 2, h = base_h, center = true); //base
|
cylinder(r = R(base_d), h = base_h, center = true); //base
|
||||||
difference () {
|
difference () {
|
||||||
translate([0, 0, (pin_h/2) + (base_h/2)]) cylinder(r = pin_d / 2, h = pin_h, center = true); //pin
|
translate([0, 0, (pin_h/2) + (base_h/2)]) cylinder(r = R(pin_d), h = pin_h, center = true); //pin
|
||||||
translate([0, 0, pin_h - (notch/2) + (base_h/2)]) cube([notch, notch, notch], center = true);
|
translate([0, 0, pin_h - (notch/2) + (base_h/2)]) cube([notch, notch, notch], center = true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +60,7 @@ module pinTop () {
|
||||||
base_h = 2;
|
base_h = 2;
|
||||||
notch = 3 - 0.02;
|
notch = 3 - 0.02;
|
||||||
|
|
||||||
cylinder(r = base_d / 2, h = base_h, center = true); //base
|
cylinder(r = R(base_d), h = base_h, center = true); //base
|
||||||
translate([0, 0, (notch / 2) + (base_h / 2)]) cube([notch, notch, notch], center = true);
|
translate([0, 0, (notch / 2) + (base_h / 2)]) cube([notch, notch, notch], center = true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,14 +68,14 @@ module handle () {
|
||||||
pin_d = 5.34 +.3;
|
pin_d = 5.34 +.3;
|
||||||
handle_d = 10.5;
|
handle_d = 10.5;
|
||||||
difference () {
|
difference () {
|
||||||
cylinder(r = handle_d/2, h = 13.75, center = true);
|
cylinder(r = R(handle_d), h = 13.75, center = true);
|
||||||
cylinder(r = pin_d/2, h = 15, center = true);
|
cylinder(r = R(pin_d), h = 15, center = true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module helper () {
|
module helper () {
|
||||||
translate([0, 15, -7.5]) {
|
translate([0, 15, -7.5]) {
|
||||||
cylinder(r = 6, h = 20, center = true);
|
cylinder(r = R(12), h = 20, center = true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,8 +84,8 @@ module bolex_rewind_key ( DECOYS = false) {
|
||||||
body();
|
body();
|
||||||
//pinHole();
|
//pinHole();
|
||||||
}
|
}
|
||||||
translate([20, 0, -24.5 - 8.5]) cylinder(r = 5.2 / 2, h = 18);
|
translate([20, 0, -24.5 - 8.5]) cylinder(r = R(5.2), h = 18);
|
||||||
translate([20, 0, -24.5 - 8.5]) cylinder(r = 8 / 2, h = 1.5);
|
translate([20, 0, -24.5 - 8.5]) cylinder(r = R(8), h = 1.5);
|
||||||
|
|
||||||
difference () {
|
difference () {
|
||||||
key();
|
key();
|
||||||
|
@ -102,7 +103,7 @@ module bolex_rewind_key ( DECOYS = false) {
|
||||||
module bolex_rewind_knurled_handle () {
|
module bolex_rewind_knurled_handle () {
|
||||||
difference () {
|
difference () {
|
||||||
knurled_cyl(13, 13, 2, 2, .3, 0, 0);
|
knurled_cyl(13, 13, 2, 2, .3, 0, 0);
|
||||||
cylinder(r = 5.6 / 2, h = 40, center = true);
|
cylinder(r = R(5.6), h = 40, center = true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit cba7a3051ef0729eaa1d5c5da6205464185734e0
|
Subproject commit 6c223d0fc67c1888429aee60cf68915b9bbaa1ca
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue