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([0, 5*5, 0]) catear();
rotate(180) translate([0, 5*5, 0]) catear();
if (RENDER_COLOR_TWO) {
color("orange")
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) {
@ -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="") {
e=100; // should be big enough, used for the outer boundary of the text/logo
difference() {
rotate([0,0,-45]) union() {
rotate([0,0,-45]) {
// main cylinder
if (RENDER_COLOR_ONE) {
color("black")
difference() {
color("black") difference() {
cylinder(r1=rl+width, r2=ru+width, h=ht);
name(name=name, font=font, rl=rl, ht=ht, ru=ru);
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
if (RENDER_COLOR_TWO) {
color("orange")
color("orange") difference() {
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
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
// somewhere on the outside ;-)
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
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() {