@@ 1,223 @@
+/* [Phone slot dimensions] */
+// Dovetail width
+width=20;
+
+// Dovetail height
+height=3;
+
+// Dovetail length
+length=12;
+
+// Dovetail stop length
+stop_length=2;
+
+// Distance between dovetails
+mount_spacing=80;
+
+// Height of the dovetail support
+guide_height=1;
+
+/* [Multicomp case frame] */
+// Frame width
+mc_w=127.5;
+// Frame height
+mc_h=127.5;
+// Frame thickness
+mc_height=1;
+// Support frame width
+mc_support_w=5;
+// Screw support height
+mc_screw_h=4.2;
+// Screw support thickness
+mc_screw_w=2;
+// Screw hole diameter
+mc_screw_d=7.7;
+// Case pole ring outer diameter
+mc_pole_outer=14;
+// Case pole ring inner diameter
+mc_pole_inner=9.2;
+// Case pole offset
+mc_pole_offset=48;
+
+/* [Phone mount] */
+// Thickness of the dovetail sides
+pm_thick=2;
+// Top thickness of the dovetail
+pm_height=2;
+// Dovetail margin
+pm_dm=0.2;
+// Dovetail clamp holder length
+pm_cl=2;
+
+// Variables for the include
+pm_width=width+(2*pm_thick)+(2*pm_dm);
+pm_floor_height=height;
+
+/* Uncomment to generate the tray STL for printing */
+//multicomp_mount();
+
+/* Test mounting frames
+translate([0, mc_w, 0])
+ multicomp_mount();
+translate([0, mc_w*2, 0])
+ multicomp_mount();
+*/
+
+/* Test phone
+translate([-32, 18, height+pm_height+0.1])
+ cube([156, 8, 75]);
+
+translate([0, 9.2, height+pm_height+0.1])
+ phonetray_margins();
+*/
+
+module multicomp_mount() {
+ multicomp_hstrip();
+
+ translate([mc_h, 0, 0])
+ multicomp_hstrip();
+
+ difference() {
+ translate([mc_support_w/2, 0, 0])
+ cube([mc_w-mc_support_w, mc_support_w, mc_height]);
+
+ translate([0,0 ,-mc_screw_h/2])
+ cylinder(h=mc_screw_h*2, r=(mc_screw_d)/2, $fn=100);
+ translate([mc_w,0 ,-mc_screw_h/2])
+ cylinder(h=mc_screw_h*2, r=(mc_screw_d)/2, $fn=100);
+ }
+
+ difference() {
+ translate([mc_support_w/2, mc_w-mc_support_w, 0])
+ cube([mc_w-mc_support_w, mc_support_w, mc_height]);
+
+ translate([0, mc_w,-mc_screw_h/2])
+ cylinder(h=mc_screw_h*2, r=(mc_screw_d)/2, $fn=100);
+ translate([mc_w, mc_w,-mc_screw_h/2])
+ cylinder(h=mc_screw_h*2, r=(mc_screw_d)/2, $fn=100);
+ }
+
+ translate([mc_support_w/2, mc_w/6, 0])
+ slot();
+
+ translate([mc_support_w/2, (mc_w/2), 0])
+ slot();
+
+ translate([mc_support_w/2, mc_w/6*5, 0])
+ slot();
+}
+
+module multicomp_hstrip() {
+ difference() {
+ union () {
+ translate([-1*mc_support_w/2, 0, 0])
+ cube([mc_support_w, mc_w, mc_height]);
+
+ cylinder(h=mc_screw_h, r=(mc_screw_w+mc_screw_d)/2, $fn=100);
+ translate([0, mc_w, 0])
+ cylinder(h=mc_screw_h, r=(mc_screw_w+mc_screw_d)/2, $fn=100);
+
+ translate([0, mc_pole_offset, 0])
+ cylinder(h=mc_height, r=mc_pole_outer/2, $fn=100);
+
+ translate([0, mc_w - mc_pole_offset, 0])
+ cylinder(h=mc_height, r=mc_pole_outer/2, $fn=100);
+ }
+
+ translate([-mc_support_w, -mc_support_w*2, -mc_screw_h/2])
+ cube([mc_support_w*2, mc_support_w*2, mc_screw_h*2]);
+
+ translate([0, 0, -1])
+ cylinder(h=mc_screw_h+2, r=mc_screw_d/2, $fn=100);
+
+ translate([-mc_support_w, mc_w, -mc_screw_h/2])
+ cube([mc_support_w*2, mc_support_w*2, mc_screw_h*2]);
+
+ translate([0, mc_w, -1])
+ cylinder(h=mc_screw_h+2, r=mc_screw_d/2, $fn=100);
+
+ translate([0, mc_pole_offset, -1])
+ cylinder(h=mc_height+2, r=mc_pole_inner/2, $fn=100);
+
+ translate([0, mc_w-mc_pole_offset, -1])
+ cylinder(h=mc_height+2, r=mc_pole_inner/2, $fn=100);
+
+ }
+}
+
+module slot() {
+ translate ([0, -1*(width/2), 0])
+ union() {
+ // Front dovetail
+ translate([mount_spacing, 0, height]) {
+ dovetail();
+ }
+
+ // Back dovetail
+ translate([5, 0, height]) {
+ dovetail();
+ }
+
+ // Connecting bit
+ translate([0, height, 0]) {
+ cube([
+ mc_h,
+ width-(2*height),
+ guide_height
+ ]);
+ }
+ }
+}
+
+module dovetail() {
+ union () {
+ rotate ([0, 90,0]) {
+ linear_extrude(length) {
+ polygon([
+ [0, 0],
+ [0, width],
+ [height, width-height],
+ [height, height]
+ ]);
+ }
+ }
+ translate ([-stop_length, 0, -height]) {
+ cube([stop_length, width, height]);
+ }
+ }
+}
+
+module dovetail_rev() {
+ rotate ([0, 90,0]) {
+ linear_extrude(length) {
+ polygon([
+ [0, 0],
+ [0, width+(2*(pm_thick+pm_dm))],
+ [pm_height+height, width+(2*(pm_thick+pm_dm))],
+ [pm_height+height, width+(2*(pm_thick+pm_dm))-height-pm_thick],
+ [pm_height, width+(pm_thick+(2*pm_dm))],
+ [pm_height, pm_thick-pm_dm],
+ [pm_height+height, pm_thick+height-pm_dm],
+ [pm_height+height, pm_dm],
+ [pm_height, 0],
+ ]);
+ }
+ }
+}
+
+// The dovetail mounts to attach a phone
+module phonetray() {
+ dovetail_rev();
+ translate([mount_spacing, 0, 0])
+ dovetail_rev();
+}
+
+// The dovetail but with with the safety margins added
+module phonetray_margins() {
+ phonetray();
+ translate([-34, -7, 0])
+ #cube([mc_h+34, 36, 1]);
+
+ translate([mc_h, 7, -5])
+ #cube([34, 10, 80]);
+}<
\ No newline at end of file
@@ 1,87 @@
+include <phone-clamp-base.scad>
+
+support_width=1.8;
+support_space=0;
+
+pc_thick=2.5;
+pc_width=12;
+pc_height=30;
+
+pc_space_end=7.13;
+pc_space_middle=9.50;
+
+difference() {
+ phonetray_supported();
+ translate([-1, 6, 2])
+
+ // Circular indent to lower the phone
+ rotate([0, 90, 0])
+ cylinder(h=mount_spacing+length+2, r=2.5, $fn=50);
+
+ // Cutout for the volume button
+ translate([-2, 6, -0.5])
+ rotate([0, 90, 0])
+ cylinder(h=length, r=0.5, $fn=50);
+}
+
+phone_clamp(pc_space_middle);
+translate([mount_spacing, 0, 0])
+ phone_clamp(pc_space_end);
+translate([0, pc_space_middle + 6.5, 0])
+rotate([90,0,0])
+ pico_holder();
+translate([50.8-14, pc_space_middle + 4.5, -2])
+ cube([14, pc_space_middle, 2]);
+translate([4,22,2.4])
+ cable_ring(7.5/2, 4.5/2, 1.2);
+
+module phonetray_supported() {
+ union() {
+ phonetray();
+ translate([length, 0,-pm_height])
+ support_beam(mount_spacing-length);
+ translate([length, pm_width-support_width,-pm_height])
+ support_beam(mount_spacing-length);
+ }
+}
+
+module support_beam(length) {
+ cube([length, support_width, pm_height]);
+
+ for (i = [0:support_space+support_width:length-1]) {
+ translate([i, 0, -pm_floor_height])
+ cube([support_width, support_width, pm_floor_height]);
+ }
+}
+
+module phone_clamp(space) {
+ cube([pc_width, pc_thick, pc_height]);
+ translate([0, space+pc_thick, 0])
+ cube([pc_width, pc_thick, pc_height]);
+}
+
+module pico_holder() {
+ difference() {
+ cube([50.8, 21, 2]);
+
+ translate([2, 4.7, -3])
+ cylinder(h=10, r=1.1/2, $fn=20);
+ translate([2, 4.7+11.6, -3])
+ cylinder(h=10, r=1.1/2, $fn=20);
+
+ translate([2+47, 4.7, -3])
+ cylinder(h=10, r=1.1/2, $fn=20);
+ translate([2+47, 4.7+11.6, -3])
+ cylinder(h=10, r=1.1/2, $fn=20);
+
+ }
+}
+
+module cable_ring(r, ri, thick) {
+ rotate([0, 90, 0])
+ difference() {
+ cylinder(h=thick, r=r, $fn=50);
+ translate([0, 0, -(thick/2)])
+ cylinder(h=thick*2, r=ri, $fn=50);
+ }
+}