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";
|
||||
LOGO_FILE = ""; // empty string is catear model
|
||||
RENDER_COLOR_ONE = true;
|
||||
RENDER_COLOR_CLIP = true;
|
||||
RENDER_COLOR_TEXT = true;
|
||||
RENDER_COLOR_LOGO = true;
|
||||
USE_TINY_EARS = true;
|
||||
|
|
@ -74,13 +74,13 @@ scale([0.2, 0.2, 0.2]) {
|
|||
rotate(-80, [0, 1, 0])
|
||||
catear();
|
||||
}
|
||||
if (RENDER_COLOR_TWO) {
|
||||
if (RENDER_COLOR_TEXT) {
|
||||
color("orange")
|
||||
translate([ 15*5, 0*5, 18*5])
|
||||
rotate(80, [0, 1, 0])
|
||||
catear();
|
||||
}
|
||||
if (RENDER_COLOR_THREE) {
|
||||
if (RENDER_COLOR_LOGO) {
|
||||
color("yellow")
|
||||
translate([-15*5, 0*5, 18*5])
|
||||
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
|
||||
rotate([0, 0, -45]) {
|
||||
// main cylinder
|
||||
if (RENDER_COLOR_ONE) {
|
||||
if (RENDER_COLOR_CLIP) {
|
||||
color("black") difference() {
|
||||
cylinder(r1=rl+width, r2=ru+width, h=ht);
|
||||
difference() {
|
||||
|
|
@ -175,7 +175,7 @@ module bottle_clip(ru=13, rl=17.5, ht=26, width=2.5, name="c3cat", font="write/o
|
|||
}
|
||||
}
|
||||
// text
|
||||
if (RENDER_COLOR_TWO) {
|
||||
if (RENDER_COLOR_TEXT) {
|
||||
color("orange") difference() {
|
||||
name(name=name, font=font, rl=rl, ht=ht, ru=ru);
|
||||
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
|
||||
if (RENDER_COLOR_THREE) {
|
||||
if (RENDER_COLOR_LOGO) {
|
||||
color("yellow") difference() {
|
||||
logo(logo=logo, rl=rl, ht=ht, ru=ru, width=2*width);
|
||||
cylinder(r1=rl+width/2, r2=ru+width/2, h=ht);
|
||||
|
|
|
|||
|
|
@ -15,19 +15,19 @@ NAME="\"$1\""
|
|||
render() {
|
||||
case "$2" in
|
||||
body)
|
||||
ONE=true
|
||||
TWO=false
|
||||
THREE=false
|
||||
CLIP=true
|
||||
TEXT=false
|
||||
LOGO=false
|
||||
;;
|
||||
name)
|
||||
ONE=false
|
||||
TWO=true
|
||||
THREE=false
|
||||
CLIP=false
|
||||
TEXT=true
|
||||
LOGO=false
|
||||
;;
|
||||
logo)
|
||||
ONE=false
|
||||
TWO=false
|
||||
THREE=true
|
||||
CLIP=false
|
||||
TEXT=false
|
||||
LOGO=true
|
||||
;;
|
||||
*)
|
||||
echo 'fatal: invalid part' >&2
|
||||
|
|
@ -41,9 +41,9 @@ render() {
|
|||
-D "USE_TINY_EARS=${TINY_EARS}" \
|
||||
-D "LOGO_FILE=${LOGO_FILE}" \
|
||||
-D "NAME=${NAME}" \
|
||||
-D "RENDER_COLOR_ONE=${ONE}" \
|
||||
-D "RENDER_COLOR_TWO=${TWO}" \
|
||||
-D "RENDER_COLOR_THREE=${THREE}" \
|
||||
-D "RENDER_COLOR_CLIP=${CLIP}" \
|
||||
-D "RENDER_COLOR_TEXT=${TEXT}" \
|
||||
-D "RENDER_COLOR_LOGO=${LOGO}" \
|
||||
-o "stls/c3cat-bottle-clip-v${VERSION}_${NAME}_${PART}.stl" \
|
||||
c3cat-bottle-clip/c3cat-bottle-clip.scad
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue