From d326edb680b6133ec8321a655a101e89d5d3c9a4 Mon Sep 17 00:00:00 2001 From: Remi Rampin Date: Fri, 2 Feb 2024 16:28:20 -0500 Subject: [PATCH] Redesign in OpenSCAD --- phone-stand-keychain.scad | 61 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 phone-stand-keychain.scad diff --git a/phone-stand-keychain.scad b/phone-stand-keychain.scad new file mode 100644 index 0000000..c6a9de3 --- /dev/null +++ b/phone-stand-keychain.scad @@ -0,0 +1,61 @@ +/* [Keychain] */ + +// overall height +height = 10; + +// length, increase if phone falls backwards +length = 60; + +// thickness of the long piece +thickness = 4.3; + +// diameter of the hole for the key ring +hole_diameter = 4; + +/* [Phone] */ + +// angle between the phone and the horizontal, 90=vertical +angle = 65; + +// the thickness of the phone, if this value is too small, it won't fit between the supports +phone_thickness = 11.3; + +/* [Supports] */ + +// the length the supports extend from the long piece +supports_length = 6.6; + +// the thickness of the first support, in front of the phone +support1_thickness = 7; + +// the thickness of the second support, behind the phone +support2_thickness = 4.5; + +module long_piece() { + translate([-thickness, 0, 0]) cube([thickness, length, height]); +} + +module phone() { + translate([0, 0, height]) rotate([angle, 0, 0]) translate([0, -10, -phone_thickness - support1_thickness]) cube([40, 80, phone_thickness]); +} + +big_num = 50; + +module supports() { + cube_length_transverse = support1_thickness + phone_thickness + support2_thickness; + cube_length = cube_length_transverse / sin(angle); + + difference() { + cube([supports_length, cube_length, height]); + // cut out phone slot + phone(); + // cut out back of support2 + translate([0, 0, height]) rotate([angle, 0, 0]) translate([0, -10, -big_num - phone_thickness - support1_thickness - support2_thickness]) cube([big_num, big_num, big_num]); + } +} + +long_piece(); + +supports(); + +%phone();