Code cleaning + add ears to the bottle clip! #22
2 changed files with 18 additions and 18 deletions
Renamed variables for more clarity
RENDER_COLOR_ONE -> RENDER_COLOR_CLIP RENDER_COLOR_TWO -> RENDER_COLOR_TEXT RENDER_COLOR_THREE -> RENDER_COLOR_LOGO
commit
aaf497d736
|
|
@ -32,7 +32,7 @@ $fn = 360;
|
||||||
|
|
||||||
NAME = "c3cat";
|
NAME = "c3cat";
|
||||||
LOGO_FILE = ""; // empty string is catear model
|
LOGO_FILE = ""; // empty string is catear model
|
||||||
RENDER_COLOR_ONE = true;
|
RENDER_COLOR_CLIP = true;
|
||||||
RENDER_COLOR_TEXT = true;
|
RENDER_COLOR_TEXT = true;
|
||||||
RENDER_COLOR_LOGO = true;
|
RENDER_COLOR_LOGO = true;
|
||||||
USE_TINY_EARS = true;
|
USE_TINY_EARS = true;
|
||||||
|
|
@ -74,13 +74,13 @@ scale([0.2, 0.2, 0.2]) {
|
||||||
rotate(-80, [0, 1, 0])
|
rotate(-80, [0, 1, 0])
|
||||||
catear();
|
catear();
|
||||||
}
|
}
|
||||||
if (RENDER_COLOR_TWO) {
|
if (RENDER_COLOR_TEXT) {
|
||||||
color("orange")
|
color("orange")
|
||||||
translate([ 15*5, 0*5, 18*5])
|
translate([ 15*5, 0*5, 18*5])
|
||||||
rotate(80, [0, 1, 0])
|
rotate(80, [0, 1, 0])
|
||||||
catear();
|
catear();
|
||||||
}
|
}
|
||||||
if (RENDER_COLOR_THREE) {
|
if (RENDER_COLOR_LOGO) {
|
||||||
color("yellow")
|
color("yellow")
|
||||||
translate([-15*5, 0*5, 18*5])
|
translate([-15*5, 0*5, 18*5])
|
||||||
rotate(-80, [0, 1, 0])
|
rotate(-80, [0, 1, 0])
|
||||||
|
|
@ -156,7 +156,7 @@ module bottle_clip(ru=13, rl=17.5, ht=26, width=2.5, name="c3cat", font="write/o
|
||||||
e = 100; // should be big enough, used for the outer boundary of the text/logo
|
e = 100; // should be big enough, used for the outer boundary of the text/logo
|
||||||
rotate([0, 0, -45]) {
|
rotate([0, 0, -45]) {
|
||||||
// main cylinder
|
// main cylinder
|
||||||
if (RENDER_COLOR_ONE) {
|
if (RENDER_COLOR_CLIP) {
|
||||||
color("black") difference() {
|
color("black") difference() {
|
||||||
cylinder(r1=rl+width, r2=ru+width, h=ht);
|
cylinder(r1=rl+width, r2=ru+width, h=ht);
|
||||||
difference() {
|
difference() {
|
||||||
|
|
@ -175,7 +175,7 @@ module bottle_clip(ru=13, rl=17.5, ht=26, width=2.5, name="c3cat", font="write/o
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// text
|
// text
|
||||||
if (RENDER_COLOR_TWO) {
|
if (RENDER_COLOR_TEXT) {
|
||||||
color("orange") difference() {
|
color("orange") difference() {
|
||||||
name(name=name, font=font, rl=rl, ht=ht, ru=ru);
|
name(name=name, font=font, rl=rl, ht=ht, ru=ru);
|
||||||
cylinder(r1=rl+width/2, r2=ru+width/2, h=ht);
|
cylinder(r1=rl+width/2, r2=ru+width/2, h=ht);
|
||||||
|
|
@ -183,7 +183,7 @@ module bottle_clip(ru=13, rl=17.5, ht=26, width=2.5, name="c3cat", font="write/o
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// logo
|
// logo
|
||||||
if (RENDER_COLOR_THREE) {
|
if (RENDER_COLOR_LOGO) {
|
||||||
color("yellow") difference() {
|
color("yellow") difference() {
|
||||||
logo(logo=logo, rl=rl, ht=ht, ru=ru, width=2*width);
|
logo(logo=logo, rl=rl, ht=ht, ru=ru, width=2*width);
|
||||||
cylinder(r1=rl+width/2, r2=ru+width/2, h=ht);
|
cylinder(r1=rl+width/2, r2=ru+width/2, h=ht);
|
||||||
|
|
|
||||||
|
|
@ -15,19 +15,19 @@ NAME="\"$1\""
|
||||||
render() {
|
render() {
|
||||||
case "$2" in
|
case "$2" in
|
||||||
body)
|
body)
|
||||||
ONE=true
|
CLIP=true
|
||||||
TWO=false
|
TEXT=false
|
||||||
THREE=false
|
LOGO=false
|
||||||
;;
|
;;
|
||||||
name)
|
name)
|
||||||
ONE=false
|
CLIP=false
|
||||||
TWO=true
|
TEXT=true
|
||||||
THREE=false
|
LOGO=false
|
||||||
;;
|
;;
|
||||||
logo)
|
logo)
|
||||||
ONE=false
|
CLIP=false
|
||||||
TWO=false
|
TEXT=false
|
||||||
THREE=true
|
LOGO=true
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo 'fatal: invalid part' >&2
|
echo 'fatal: invalid part' >&2
|
||||||
|
|
@ -41,9 +41,9 @@ render() {
|
||||||
-D "USE_TINY_EARS=${TINY_EARS}" \
|
-D "USE_TINY_EARS=${TINY_EARS}" \
|
||||||
-D "LOGO_FILE=${LOGO_FILE}" \
|
-D "LOGO_FILE=${LOGO_FILE}" \
|
||||||
-D "NAME=${NAME}" \
|
-D "NAME=${NAME}" \
|
||||||
-D "RENDER_COLOR_ONE=${ONE}" \
|
-D "RENDER_COLOR_CLIP=${CLIP}" \
|
||||||
-D "RENDER_COLOR_TWO=${TWO}" \
|
-D "RENDER_COLOR_TEXT=${TEXT}" \
|
||||||
-D "RENDER_COLOR_THREE=${THREE}" \
|
-D "RENDER_COLOR_LOGO=${LOGO}" \
|
||||||
-o "stls/c3cat-bottle-clip-v${VERSION}_${NAME}_${PART}.stl" \
|
-o "stls/c3cat-bottle-clip-v${VERSION}_${NAME}_${PART}.stl" \
|
||||||
c3cat-bottle-clip/c3cat-bottle-clip.scad
|
c3cat-bottle-clip/c3cat-bottle-clip.scad
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue