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