Compare commits

...

6 Commits

Author SHA1 Message Date
Dejvino
129f1890df Replaced platform locking with screws 2021-01-22 07:49:19 +01:00
Dejvino
5a274cdb03 Add screwhole to strap clip 2021-01-21 22:06:48 +01:00
Dejvino
3e5afb4ebd Fix clearances after first platform print 2021-01-21 21:14:44 +01:00
Dejvino
09336f1d0d Platform with a locking mechanism 2021-01-21 09:59:55 +01:00
Dejvino
58fc149bbe Extracted common code out 2021-01-20 15:55:17 +01:00
Dejvino
659c75c628 Platform with strap connectors 2021-01-20 15:24:25 +01:00
8 changed files with 173 additions and 33 deletions

22
src/common.scad Normal file
View File

@ -0,0 +1,22 @@
use <BOSL/shapes.scad>
include <BOSL/constants.scad>
module cubi(s, fillet=0, edges=EDGES_ALL) {
if ($preview) {
cube(s, center=true);
} else {
cuboid(s, fillet=fillet, edges=edges);
}
}
module screwhole(d, h, head=true) {
$fn=$preview ? 5 : 20;
translate([0, 0, h]) cylinder(d=d*1.5, h=d*0.5);
split=h*0.5;
translate([0, 0, split]) cylinder(d=d, h=(h-split));
cylinder(d2=d, d1=d*0.1, h=split);
cylinder(d2=d*0.6, d1=d*0.6, h=split/2);
}
function vec_sum(v, w) = [v.x + w.x, v.y + w.y, v.z + w.z];

View File

@ -22,13 +22,7 @@ function use_slideout_backplane() = is_model_strict(MODEL_HARNESS_BOTTOM_PIP) ||
backplane_pip_slideout=10;
module cubi(s, fillet=0, edges=EDGES_ALL) {
if ($preview) {
cube(s, center=true);
} else {
cuboid(s, fillet=fillet, edges=edges);
}
}
use <common.scad>
module dotted_grill_cutout(vents_area, vents_x=10, vents_y=10, mesh=1.5, cut_corners=false) {
function is_corner(x, y, xm, ym) = (x == 0 || x == xm) && (y == 0 || y == ym);
@ -401,7 +395,7 @@ module phone_harness() {
}
module model() {
up(get_platform_size().z + get_harness_size().z/2) phone_harness();
up(get_harness_size().z/2) phone_harness();
}
if (!is_undef(validation)) {

View File

@ -3,4 +3,4 @@ include <export.scad>
include <harness.scad>
include <platform.scad>
//include <strap.scad>
include <strap.scad>

View File

@ -1,4 +1,6 @@
include <export.scad>
//export=MODEL_PLATFORM_HARNESS;
//export=MODEL_PLATFORM_STRAP;
// dependency: https://github.com/revarbat/BOSL
include <BOSL/constants.scad>
@ -10,7 +12,9 @@ use <BOSL/sliders.scad>
use <specs_platform.scad>
use <specs_strap.scad>
use <common.scad>
use <strap_common.scad>
use <platform_common.scad>
// DEBUG:
//validation = 1;
@ -34,24 +38,73 @@ module model_prop_arm() {
// Blocks:
module platform(base) {
size=get_platform_size();
base_size=size;
wall=get_platform_wall();
top_size=get_platform_top_size();
top=!base;
up(top?size.z:0)
color(top?"Olive":"YellowGreen")
cube(size, center=true);
module strap_connectors() {
down(size.z/2) {
for (i=[0:3]) {
left((i%2*(-2)+1) * (size.x/2 - get_link_segment_size().y/2))
fwd((round(i/2)%2*(-2)+1) * size.y/2)
down(get_link_segment_size().z/2)
zrot(90 + (round(i/2)%2*180)) link_connector_pin();
module platform_screwholes() {
module screwhole_one() {
fwd(base_size.y/2) xrot(90) down(get_platform_screwhole_h()) screwhole(d=get_platform_screwhole_d(), h=get_platform_screwhole_h());
}
module screwhole_sided() {
offset=16;
left(offset) screwhole_one();
right(offset) screwhole_one();
}
up(top_size.z/5) {
screwhole_sided();
scale([1,-1,1]) screwhole_sided();
}
}
module base_platform_cutout_for_top() {
base_top_diff=[base_size.x-top_size.x, base_size.y-top_size.y];
guiding=1;
top_slack=[0.2, 0.2, 0];
translate(get_platform_top_pos()) {
cube(vec_sum(top_size, top_slack), center=true);
down(top_size.z/2 - 2)
prismoid(size1=[top_size.x,top_size.y], size2=[top_size.x+base_top_diff.x*guiding,top_size.y+base_top_diff.y*guiding], h=top_size.z);
}
}
module base_platform() {
module base_platform_core() {
braced_thinning_wall(h=size.y, l=size.x, thick=size.z, wall=0, strut=wall, orient=ORIENT_X_90);
}
difference() {
base_platform_core();
base_platform_cutout_for_top();
platform_screwholes();
}
}
module top_platform() {
difference() {
up((base_size.z-top_size.z)/2)
up(top_size.z/2) intersection() {
scale([1,1,4]) braced_thinning_wall(h=top_size.y, l=top_size.x, thick=top_size.z, wall=0, strut=wall/4, orient=ORIENT_X_90);
down(top_size.z/2) scale([2,2,1]) cube(top_size, center=true);
}
platform_screwholes();
}
}
module strap_connectors() {
//down(size.z/2)
difference() {
foreach_platform_strap_connector() {
link_connector_pin();
}
base_platform_cutout_for_top();
}
}
color(top?"Olive":"YellowGreen")
if (base) {
base_platform();
strap_connectors();
} else {
top_platform();
}
}
@ -64,7 +117,18 @@ module model_platform_strap() {
platform(base=true);
}
// Validation:
/*intersection() {
model_platform_harness();
model_platform_strap();
}*/
// Export:
if (is_model(MODEL_PLATFORM_HARNESS)) model_platform_harness();
if (is_model(MODEL_PLATFORM_STRAP)) model_platform_strap();
if (is_model(MODEL_DEMO)) model_prop_arm();
difference() {
union() {
if (is_model(MODEL_PLATFORM_HARNESS)) model_platform_harness();
if (is_model(MODEL_PLATFORM_STRAP)) model_platform_strap();
//if (is_model(MODEL_DEMO)) model_prop_arm();
}
// xray:
//left(500+5) cube([1000, 1000, 1000], center=true);
}

21
src/platform_common.scad Normal file
View File

@ -0,0 +1,21 @@
// dependency: https://github.com/revarbat/BOSL
include <BOSL/constants.scad>
use <BOSL/transforms.scad>
use <BOSL/shapes.scad>
use <BOSL/masks.scad>
use <BOSL/sliders.scad>
use <specs_platform.scad>
use <specs_strap.scad>
use <strap_common.scad>
module foreach_platform_strap_connector() {
offset=get_platform_strap_connector_offset();
for (i=[0:3]) {
translate([((i%2*(-2)+1) * offset.x), -((round(i/2)%2*(-2)+1) * offset.y), offset.z])
zrot(90 + (round(i/2)%2*180))
children();
}
}

View File

@ -1,8 +1,22 @@
use <specs_phone.scad>
use <specs_strap.scad>
function get_platform_size() = [
get_phone_size().x - 5,
get_phone_size().x - 30,
get_phone_size().y - 5,
5
get_platform_wall()*3
];
function get_platform_top_size() = [
get_platform_size().x - 2*get_platform_wall(),
get_platform_size().y - 2*get_platform_wall(),
get_platform_size().z - get_platform_wall()];
function get_platform_top_pos() = [0, 0, (get_platform_size().z-get_platform_top_size().z)/2];
function get_platform_wall() = 3;
function get_platform_strap_connector_offset() = [
(get_platform_size().x/2 - get_link_segment_size().y/2) - 3,
get_platform_size().y/2 + 4,
-get_link_segment_size().z/2 + 0.5
];
function get_platform_screwhole_d() = 3.2;
function get_platform_screwhole_h() = 10;

View File

@ -1,12 +1,25 @@
links_count=3; // [1..20]
links_count=2; // [1..20]
include_terminal=true; // [true,false]
include_screwhole=true; // [true,false]
clip_screwhole=2;
include <export.scad>
//export=MODEL_LINKS;
//export=MODEL_CLIP_A;
//export=MODEL_CLIP_B;
//export=MODEL_CLIP_RATCHETING_A;
//export=MODEL_CLIP_RATCHETING_B;
use <BOSL/transforms.scad>
use <BOSL/shapes.scad>
include <BOSL/constants.scad>
use <specs_strap.scad>
use <specs_platform.scad>
use <common.scad>
use <strap_common.scad>
use <platform_common.scad>
if (is_model_strict(MODEL_LINKS)) {
echo("===============================");
@ -79,7 +92,13 @@ module clip() {
slack=groove?0.2:0;
joiner_size=[entry_size.x-6+slack, entry_size.y-6+slack, entry_size.z-3+slack];
joiner_pos=[entry_pos.x, entry_pos.y, entry_pos.z - entry_size.z/2 + joiner_size.z/2];
translate(joiner_pos) cube(joiner_size, center=true);
difference() {
translate(joiner_pos) cube(joiner_size, center=true);
screw_cutout();
}
}
module screw_cutout() {
if (include_screwhole) down(clip_size.z/2) screwhole(d=clip_screwhole, h=clip_size.z);
}
module model() {
@ -91,6 +110,7 @@ module clip() {
}
right(clip_size.x/2) socket_cutout();
left(clip_size.x/2) socket_cutout();
screw_cutout();
}
}
@ -249,11 +269,13 @@ module clip_ratcheting(ratchet_length=28) {
// === Export ===
if (is_model(MODEL_DEMO)) {
translate([-20, -40, -10]) zrot(-90) {
link_chain(links_count, include_terminal=include_terminal);
right(links_count * get_link_segment_size().x + get_link_clip_size().x) {
clip();
right(get_link_clip_size().x) clip_ratcheting();
foreach_platform_strap_connector() {
zrot(180) down(get_link_segment_size().z/2) {
link_chain(links_count, include_terminal=include_terminal);
/*right(links_count * get_link_segment_size().x + get_link_clip_size().x) {
clip();
right(get_link_clip_size().x) clip_ratcheting();
}*/
}
}
} else {

View File

@ -6,6 +6,8 @@ include <BOSL/constants.scad>
use <specs_strap.scad>
use <common.scad>
module pin() {
segment_size=get_link_segment_size();
h=segment_size.y;
@ -33,7 +35,7 @@ module pin_socket() {
module arm() {
segment_size=get_link_segment_size();
arm_size=get_link_joiner_arm_size();
fwd(segment_size.y/2 + arm_size.y/2 - 1) right(arm_size.x/2 - 1) cuboid(arm_size, fillet=1, edges=EDGES_FRONT + EDGES_Y_ALL);
fwd(segment_size.y/2 + arm_size.y/2 - 1) right(arm_size.x/2 - 1) cubi(arm_size, fillet=1, edges=EDGES_FRONT + EDGES_Y_ALL);
}
module armFront() {
arm();
@ -46,9 +48,10 @@ module armJoiner() {
arm_size=get_link_joiner_arm_size();
segment_size=get_link_segment_size();
joiner_size=[arm_size.x-get_link_socket_size().x, segment_size.y, segment_size.z];
right(joiner_size.x/2 + get_link_socket_size().x/2 + gap) cuboid(joiner_size, fillet=1, edges=EDGES_Z_ALL + EDGES_BOTTOM);
right(joiner_size.x/2 + get_link_socket_size().x/2 + gap) cubi(joiner_size, fillet=1, edges=EDGES_Z_ALL + EDGES_BOTTOM);
}
module link_arms() {
$fn=$preview?4:20;
armFront();
armBack();
armJoiner();