c3cat_bottle_tag v2.1

This commit is contained in:
djerun 2024-11-21 21:19:54 +01:00
parent 69e8b09fa7
commit 90521c426a

View file

@ -65,9 +65,18 @@ scale([0.2, 0.2, 0.2]) {
translate([ 15*5, 0*5, 18*5]) rotate(80, [0, 1, 0]) catear(); translate([ 15*5, 0*5, 18*5]) rotate(80, [0, 1, 0]) catear();
translate([-15*5, 0*5, 18*5]) rotate(-80, [0, 1, 0]) catear(); translate([-15*5, 0*5, 18*5]) rotate(-80, [0, 1, 0]) catear();
} }
if (RENDER_COLOR_TWO) {
translate([0, 5*5, 0]) catear(); color("orange")
rotate(180) translate([0, 5*5, 0]) catear(); translate([ 15*5, 0*5, 18*5])
rotate(80, [0, 1, 0])
catear();
}
if (RENDER_COLOR_THREE) {
color("yellow")
translate([-15*5, 0*5, 18*5])
rotate(-80, [0, 1, 0])
catear();
}
} }
module name(name, font, rl, ht, ru) { module name(name, font, rl, ht, ru) {
@ -135,33 +144,42 @@ module logo(logo, rl, ht, ru, width) {
} }
module bottle_clip(ru=13, rl=17.5, ht=26, width=2.5, name="c3cat", font="write/orbitron.dxf", logo="") { module bottle_clip(ru=13, rl=17.5, ht=26, width=2.5, name="c3cat", font="write/orbitron.dxf", logo="") {
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]) {
difference() {
rotate([0,0,-45]) union() {
// main cylinder // main cylinder
if (RENDER_COLOR_ONE) { if (RENDER_COLOR_ONE) {
color("black") color("black") difference() {
difference() {
cylinder(r1=rl+width, r2=ru+width, h=ht); cylinder(r1=rl+width, r2=ru+width, h=ht);
name(name=name, font=font, rl=rl, ht=ht, ru=ru); name(name=name, font=font, rl=rl, ht=ht, ru=ru);
logo(logo=logo, rl=rl, ht=ht, ru=ru, width=width); logo(logo=logo, rl=rl, ht=ht, ru=ru, width=width);
translate([0,0,-1])
cylinder(r1=rl, r2=ru, h=ht+2);
// finally, substract a cube as a gap so we can clip it to the bottle
rotate([0, 0, 45])
translate([0,0,-1])
cube([50,50,50]);
} }
} }
// text // text
if (RENDER_COLOR_TWO) { if (RENDER_COLOR_TWO) {
color("orange") 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, r2=ru+width, h=ht);
outer_cutoff(rl, e, ru, ht, width);
}
} }
// logo // logo
if (RENDER_COLOR_THREE) { if (RENDER_COLOR_THREE) {
color("yellow") logo(logo=logo, rl=rl, ht=ht, ru=ru, width=2*width); color("yellow") difference() {
logo(logo=logo, rl=rl, ht=ht, ru=ru, width=2*width);
cylinder(r1=rl+width, r2=ru+width, h=ht);
outer_cutoff(rl, e, ru, ht, width);
} }
} }
// inner cylinder which is substracted }
translate([0,0,-1]) }
cylinder(r1=rl, r2=ru, h=ht+2);
module outer_cutoff(rl, e, ru, ht, width) {
// outer cylinder which is substracted, so the text and the logo end // outer cylinder which is substracted, so the text and the logo end
// somewhere on the outside ;-) // somewhere on the outside ;-)
difference () { difference () {
@ -171,9 +189,6 @@ module bottle_clip(ru=13, rl=17.5, ht=26, width=2.5, name="c3cat", font="write/o
// depth is > 0.7 // depth is > 0.7
cylinder(r1=rl+width+0.7, r2=ru+width+0.7, h=ht+2); cylinder(r1=rl+width+0.7, r2=ru+width+0.7, h=ht+2);
} }
// finally, substract a cube as a gap so we can clip it to the bottle
translate([0,0,-1]) cube([50,50,50]);
}
} }
module catear() { module catear() {