From a706ce3f8cc2f987814574fb15ef49c2ceb55ca7 Mon Sep 17 00:00:00 2001 From: Peter Ludikovsky Date: Fri, 28 Jun 2024 12:25:58 +0200 Subject: [PATCH] =?UTF-8?q?Can=20Sleeve:=20Name=20&=20Logo=20hinzugef?= =?UTF-8?q?=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Can Sleeve/1A_MainLogo_Cube_2021.svg | 146 +++++++++++++++++++++++++++ Can Sleeve/Can Sleeve.scad | 121 ++++++++++++---------- 2 files changed, 213 insertions(+), 54 deletions(-) create mode 100644 Can Sleeve/1A_MainLogo_Cube_2021.svg diff --git a/Can Sleeve/1A_MainLogo_Cube_2021.svg b/Can Sleeve/1A_MainLogo_Cube_2021.svg new file mode 100644 index 0000000..f2b3a60 --- /dev/null +++ b/Can Sleeve/1A_MainLogo_Cube_2021.svg @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Can Sleeve/Can Sleeve.scad b/Can Sleeve/Can Sleeve.scad index 46ca6db..a537a1b 100644 --- a/Can Sleeve/Can Sleeve.scad +++ b/Can Sleeve/Can Sleeve.scad @@ -1,3 +1,6 @@ +// Name on the can +name = "Peter"; + // Can height can_height = 168;// [115:330mL,168:500mL,135:Energy Drink,180:Energy Drink L,146:Soda Sleek] // Can width @@ -13,68 +16,78 @@ wall = 0.8;//[0.1:0.1:2.4] ribs = 7;// [1:1:9] include <../lib/defaults.scad>; +use <../lib/text_on.scad>; // For the Preview Crosssection intersection() { // To remove unnecessary edges - union() { - // Primary Cylinder, inner & outer wall - translate([0,0,thickness/2]) - union(){ - difference() { - cylinder(h = can_height-lip-2*thickness, r = can_dia / 2 + thickness, center = true); - cylinder(h = can_height-lip-2*thickness + .1, r = can_dia / 2+thickness-wall, center = true); - } - difference() { - cylinder(h = can_height-lip-2*thickness, r = can_dia / 2 +wall, center = true); - cylinder(h = can_height-lip-2*thickness + .1, r = can_dia / 2, center = true); - } - } - // Rounded lip - translate([0,0,(can_height-lip-thickness)/2]) - rotate_extrude() - translate([(can_dia+thickness)/2,0,0]) - intersection() { - circle(thickness/2); - translate([-(thickness+1)/2,0,0]) - square(thickness+1); + difference(){ + union() { + // Primary Cylinder, inner & outer wall + translate([0,0,thickness/2]) + union(){ + difference() { + cylinder(h = can_height-lip-2*thickness, r = can_dia / 2 + thickness, center = true); + cylinder(h = can_height-lip-2*thickness + .1, r = can_dia / 2+thickness-wall, center = true); + } + difference() { + cylinder(h = can_height-lip-2*thickness, r = can_dia / 2 +wall, center = true); + cylinder(h = can_height-lip-2*thickness + .1, r = can_dia / 2, center = true); } - // Bottom - translate([0,0,-(can_height-lip-3*thickness)/2]) - rotate_extrude() - translate([can_dia/2,0,0]) - intersection(){ - union(){ - difference(){ - circle(thickness); - circle(thickness-wall); } - circle(wall); - rotate([0,0,45]) - square([thickness-2*wall,thickness*2-wall],center=true); + // Rounded lip + translate([0,0,(can_height-lip-thickness)/2]) + rotate_extrude() + translate([(can_dia+thickness)/2,0,0]) + intersection() { + circle(thickness/2); + translate([-(thickness+1)/2,0,0]) + square(thickness+1); + } + // Bottom + translate([0,0,-(can_height-lip-3*thickness)/2]) + rotate_extrude() + translate([can_dia/2,0,0]) + intersection(){ + union(){ + difference(){ + circle(thickness); + circle(thickness-wall); + } + circle(wall); + rotate([0,0,45]) + square([thickness-2*wall,thickness*2-wall],center=true); + } + translate([0,-thickness,0]) + square(thickness); } - translate([0,-thickness,0]) - square(thickness); - } - - translate([0,0,-(can_height-lip-2*thickness)/2]) - cylinder(h=thickness, r=can_dia/2, center=true); - - // - // Ribs for structural strengt & grip - for(i = [-((ribs - 1) / 2):((ribs - 1) / 2)]) { - translate([0, 0, i * (can_height-lip) / (ribs + 1)]) - union() { - difference() { - cylinder(h = 2, r = can_dia / 2 + thickness, center = true); - cylinder(h = 2.1, r = can_dia / 2, center = true); - } - rotate_extrude() - translate([can_dia / 2, 0, 0]) - scale([.5, 1, 1]) - circle(r = 1); + + translate([0,0,-(can_height-lip-2*thickness)/2]) + difference(){ + cylinder(h=thickness, r=can_dia/2, center=true); + rotate([180,0,0]) + resize([can_dia*.9,can_dia*.9,0],[true,true,false]) + linear_extrude(height=thickness/2+.1) + import(file="1A_MainLogo_Cube_2021.svg", center=true); + } + + // + // Ribs for structural strengt & grip + for(i = [-((ribs - 1) / 2):((ribs - 1) / 2)]) { + translate([0, 0, i * (can_height-lip) / (ribs + 1)]) + union() { + difference() { + cylinder(h = 2, r = can_dia / 2 + thickness, center = true); + cylinder(h = 2.1, r = can_dia / 2, center = true); + } + rotate_extrude() + translate([can_dia / 2, 0, 0]) + scale([.5, 1, 1]) + circle(r = 1); + } } - } + } + text_on_cylinder(t=name, r=can_dia / 2 + thickness,h=can_height/2,size=10, center=true, cylinder_center=true, extrusion_height=wall, font="Hack Nerd Font"); } if ($preview) { translate([0, 5+can_dia/4, 0])