This commit is contained in:
sasza 2025-07-09 19:40:39 +02:00
parent f5fce15a9c
commit c4979ae44e
8 changed files with 18569 additions and 3 deletions

Binary file not shown.

View file

@ -0,0 +1,164 @@
// The following should be editable within reason to adjust for container and phone size
$fn=50; // number of facets to the cylinders - basically level of detail
drink_rad = 46; // radius of drink container - allow some wiggle room
phone_width = 80/2; // width of phone - allow some wiggle room
phone_depth = 8; // depth of phone - allow some wiggle room
// not intended to be changed
holder_rad = drink_rad + 5;
base_rad = holder_rad + 5;
module cup_holder_base_shape() {
// basic shape for cup holder
union() {
// lower base
cylinder(h=2,r=base_rad,center=true);
// upper base
translate([0,0,2.99])
cylinder(r2=holder_rad,r1=base_rad,h=5,center=true);
// holder
translate([0,0,48.99])
difference() {
cylinder(r=holder_rad,h=90,center=true);
// cut to hollow out cup
cylinder(r=drink_rad,h=91,center=true);
}
}
}
//cup_holder_base_shape();
module cup_holder_finished() {
// cut features from basic cup holder shape
difference() {
cup_holder_base_shape();
// cut side slot for strap
translate([0,drink_rad,54])
rotate([0,10,10])
cube([5,20,95],center=true);
// cut other side slot for strap
translate([0,-drink_rad,54])
rotate([0,-10,10])
cube([5,20,95],center=true);
// cut bottom slot for strap
translate([0,0,6.5])
rotate([90,0,13])
cylinder(r=2.75,h=120,center=true);
// cut drainage holes
translate([0,0,0])
cylinder(r=6,h=40,center=true);
translate([20,5,0])
cylinder(r=4,h=40,center=true);
translate([-20,-5,0])
cylinder(r=4,h=40,center=true);
}
}
//cup_holder_finished();
module cylinder_cube(cr1=4,cr2=4,ch=5,cx=50,cy=10) {
// makes a cube rounded on 4 sides
// can be narrower at top (used this for the beveled section)
// cr1 - bottom corner radius
// cr2 - top corner radius
// ch - height
// cx - length
// cy - width
hull() {
translate([cx-cr1,cy-cr1,0])
cylinder(r1=cr1,r2=cr2,h=ch,center=true);
translate([cx-cr1,-cy+cr1,0])
cylinder(r1=cr1,r2=cr2,h=ch,center=true);
translate([-cx+cr1,cy-cr1,0])
cylinder(r1=cr1,r2=cr2,h=ch,center=true);
translate([-cx+cr1,-cy+cr1,0])
cylinder(r1=cr1,r2=cr2,h=ch,center=true);
}
}
//cylinder_cube();
module phone_holder() {
difference() {
union() {
//lower base
cylinder_cube(cr1=6,cr2=6,ch=2,cx=phone_width+10,cy=phone_depth+10);
// upper base
translate([0,0,2.99])
cylinder_cube(cr1=6,cr2=2,ch=5,cx=phone_width+9,cy=phone_depth+9);
//holder
translate([0,0,34.99])
difference() {
cylinder_cube(cr1=2,cr2=2,ch=61,cx=phone_width+5,cy=phone_depth+5);
translate([1,0,.1])
cylinder_cube(cr1=3,cr2=3,ch=62,cx=phone_width,cy=phone_depth);
}
}
// cut drainage hole
translate([0,0,.1])
cylinder_cube(cr1=2,cr2=2,ch=30,cx=20,cy=3);
}
}
//phone_holder();
module combo_holder() {
// merge the two pieces
union(){
rotate([0,0,-12])
cup_holder_finished();
translate([holder_rad + phone_width,0,0])
phone_holder();
}
}
combo_holder();

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -6,9 +6,27 @@ doniczka_d = 105;
wall_w = doniczka_d+2*t;
dystans=20;
katownik_h = 25 + 1;
katownik_w = 17 + 1;
katownik_t = 2;
union() {
// wall mount
difference() {
translate([-wall_t, -wall_w/2]) cube([wall_t, wall_w, wall_h]);
translate([-wall_t-0.1, -katownik_w/2 - wall_w/3])
union() {
cube([katownik_t, katownik_w, katownik_h]);
rotate([0,45,0]) translate([-1.5,0,0])
cube([katownik_w, katownik_w, katownik_t+2]);
}
translate([-wall_t-0.1, -katownik_w/2 + wall_w/3])
union() {
cube([katownik_t, katownik_w, katownik_h]);
rotate([0,45,0]) translate([-1.5,0,0])
cube([katownik_w, katownik_w, katownik_t+2]);
}
}
difference() {
union() {
translate([0,-wall_w/2,0]) cube([wall_w/2+dystans, wall_w, t]);

View file

@ -1,5 +1,5 @@
szerokosc_szklanki = 45;
grubosc_szkla = 4;
szerokosc_szklanki = 63;
grubosc_szkla = 2.5;
wysokosc_uchwytu = 10;
dlugosc_uchwytu = 15;