Compare commits

..

No commits in common. "wip/b" and "trunk" have entirely different histories.

View file

@ -32,9 +32,6 @@ $fn = 360;
NAME = "c3cat"; NAME = "c3cat";
LOGO_FILE = ""; // empty string is catear model LOGO_FILE = ""; // empty string is catear model
LOGO_PARTS = 1;
LOGO_HEIGHT = 64;
LOGO_WIDTH = 64;
RENDER_COLOR_ONE = true; RENDER_COLOR_ONE = true;
RENDER_COLOR_TWO = true; RENDER_COLOR_TWO = true;
RENDER_COLOR_THREE = true; RENDER_COLOR_THREE = true;
@ -117,33 +114,36 @@ module logo(logo, rl, ht, ru, width) {
with_rake=false with_rake=false
); );
} else { } else {
/* split wide logos into parts by using LOGO_PARTS>1. // The logo has been split in 3 parts. // well was... TODO
* /*
* each part is projected onto the cylinder separately. rotate([0,0,-48]) translate([0,0,ht*3/4-0.1])
* selecting too few parts will stretch the outer logo parts. rotate([90,0,0])
* selecting too many may mangle the logo as the cylinder is scale([0.9,0.9,1])
* thinner at the top but the logo will not be adjusted for it. scale([ht/100,ht/100,1])
*/ translate([-25,-29,0.5])
for (i=[0:LOGO_PARTS-1]) { linear_extrude(height=max(ru,rl)*2)
j=(LOGO_PARTS-1)/2; import("logo_1.dxf");
part_offset=LOGO_WIDTH/LOGO_PARTS; */
rotate([0, 0, (i-j)*(45/j)])
translate([0,0,ht*3/4-0.1]) translate([0,0,ht*3/4-0.1])
rotate([90,0,0]) rotate([90,0,0])
scale([0.8,0.8,1]) scale([0.8,0.8,1])
scale([ht/100,ht/100,1]) scale([ht/100,ht/100,1])
translate([-part_offset/2,-LOGO_HEIGHT/2-1,0.5]) translate([-18,-22,0.5])
linear_extrude(height=max(ru,rl)*2) linear_extrude(height=max(ru,rl)*2)
intersection () { import(logo);
translate([-i*part_offset, 0]) /*
import(logo); rotate([0,0,44]) translate([0,0,ht*3/4-0.1])
square([part_offset, LOGO_HEIGHT]); rotate([90,0,0])
} scale([0.7,0.7,1])
} scale([ht/100,ht/100,1])
translate([-25,-26,0.5])
linear_extrude(height=max(ru,rl)*2)
import("logo_3.dxf");
*/
} }
} }
module bottle_clip(ru=13, rl=17.5, ht=26, width=2.5, name="c3cat", font="write/orbitron.dxf", logo=LOGO_FILE) { 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]) { rotate([0,0,-45]) {
// main cylinder // main cylinder
@ -210,7 +210,7 @@ module catear() {
* bottles (like fritz cola, etc.). All parameters are passed to the module * bottles (like fritz cola, etc.). All parameters are passed to the module
* bottle_clip(), see there for their documentation. * bottle_clip(), see there for their documentation.
*/ */
module bottle_clip_longneck(name="c3cat", width=2.5, font="write/orbitron.dxf", logo=LOGO_FILE) { module bottle_clip_longneck(name="c3cat", width=2.5, font="write/orbitron.dxf") {
bottle_clip(name=name, ru=13, rl=15, ht=26, width=width, font=font, logo=""); bottle_clip(name=name, ru=13, rl=15, ht=26, width=width, font=font, logo="");
} }