Platform with strap connectors

This commit is contained in:
Dejvino 2021-01-20 15:24:25 +01:00
parent ebde72fab1
commit 659c75c628
2 changed files with 10 additions and 4 deletions

View File

@ -40,12 +40,12 @@ module platform(base) {
cube(size, center=true); cube(size, center=true);
module strap_connectors() { module strap_connectors() {
offset=get_platform_strap_connector_offset();
down(size.z/2) { down(size.z/2) {
for (i=[0:3]) { for (i=[0:3]) {
left((i%2*(-2)+1) * (size.x/2 - get_link_segment_size().y/2)) translate([((i%2*(-2)+1) * offset.x), -((round(i/2)%2*(-2)+1) * offset.y), offset.z])
fwd((round(i/2)%2*(-2)+1) * size.y/2) zrot(90 + (round(i/2)%2*180))
down(get_link_segment_size().z/2) link_connector_pin();
zrot(90 + (round(i/2)%2*180)) link_connector_pin();
} }
} }
} }

View File

@ -1,4 +1,5 @@
use <specs_phone.scad> use <specs_phone.scad>
use <specs_strap.scad>
function get_platform_size() = [ function get_platform_size() = [
get_phone_size().x - 5, get_phone_size().x - 5,
@ -6,3 +7,8 @@ function get_platform_size() = [
5 5
]; ];
function get_platform_strap_connector_offset() = [
(get_platform_size().x/2 - get_link_segment_size().y/2),
get_platform_size().y/2,
-get_link_segment_size().z/2
];