Compare commits

..

No commits in common. "129f1890dfe136be2dd9f6fdf5ff303decb5e02c" and "ebde72fab1c7c49549b85838b7b9124c057e7b58" have entirely different histories.

8 changed files with 37 additions and 177 deletions

View File

@ -1,22 +0,0 @@
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,7 +22,13 @@ function use_slideout_backplane() = is_model_strict(MODEL_HARNESS_BOTTOM_PIP) ||
backplane_pip_slideout=10;
use <common.scad>
module cubi(s, fillet=0, edges=EDGES_ALL) {
if ($preview) {
cube(s, center=true);
} else {
cuboid(s, fillet=fillet, edges=edges);
}
}
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);
@ -395,7 +401,7 @@ module phone_harness() {
}
module model() {
up(get_harness_size().z/2) phone_harness();
up(get_platform_size().z + 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,6 +1,4 @@
include <export.scad>
//export=MODEL_PLATFORM_HARNESS;
//export=MODEL_PLATFORM_STRAP;
// dependency: https://github.com/revarbat/BOSL
include <BOSL/constants.scad>
@ -12,9 +10,7 @@ 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;
@ -38,73 +34,24 @@ 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;
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();
}
}
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();
}
}
}
if (base) {
base_platform();
strap_connectors();
} else {
top_platform();
}
}
@ -117,18 +64,7 @@ module model_platform_strap() {
platform(base=true);
}
// Validation:
/*intersection() {
model_platform_harness();
model_platform_strap();
}*/
// Export:
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);
}
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();

View File

@ -1,21 +0,0 @@
// 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,22 +1,8 @@
use <specs_phone.scad>
use <specs_strap.scad>
function get_platform_size() = [
get_phone_size().x - 30,
get_phone_size().x - 5,
get_phone_size().y - 5,
get_platform_wall()*3
5
];
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,25 +1,12 @@
links_count=2; // [1..20]
links_count=3; // [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("===============================");
@ -92,13 +79,7 @@ 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];
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);
translate(joiner_pos) cube(joiner_size, center=true);
}
module model() {
@ -110,7 +91,6 @@ module clip() {
}
right(clip_size.x/2) socket_cutout();
left(clip_size.x/2) socket_cutout();
screw_cutout();
}
}
@ -269,13 +249,11 @@ module clip_ratcheting(ratchet_length=28) {
// === Export ===
if (is_model(MODEL_DEMO)) {
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();
}*/
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();
}
}
} else {

View File

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