diff --git a/src/platform.scad b/src/platform.scad index 59d2a81..9324a19 100644 --- a/src/platform.scad +++ b/src/platform.scad @@ -40,12 +40,12 @@ module platform(base) { cube(size, center=true); module strap_connectors() { + offset=get_platform_strap_connector_offset(); 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(); + translate([((i%2*(-2)+1) * offset.x), -((round(i/2)%2*(-2)+1) * offset.y), offset.z]) + zrot(90 + (round(i/2)%2*180)) + link_connector_pin(); } } } diff --git a/src/specs_platform.scad b/src/specs_platform.scad index e031dbf..51b9b15 100644 --- a/src/specs_platform.scad +++ b/src/specs_platform.scad @@ -1,4 +1,5 @@ use +use function get_platform_size() = [ get_phone_size().x - 5, @@ -6,3 +7,8 @@ function get_platform_size() = [ 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 + ];