chiark / gitweb /
topeak-mtx-tortec-expeditionrack-adapter: break out
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 5 Nov 2022 13:18:52 +0000 (13:18 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 5 Nov 2022 13:18:52 +0000 (13:18 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
topeak-mtx-tortec-expeditionrack-adapter.scad

index 6bc0aeb4ff2119bb378675bcf1f57b0a73784a01..bf969850edd60b3277c7281ae3ed6c7814165281 100644 (file)
@@ -94,6 +94,9 @@ brk_bolt_nut_r = brk_bolt_nut_across_flats/2 / cos(360/12);
 function elevation_of_bolt_for(z) = rear_elevation_nominal
   - (z - brk_block_z/2) * rack_shear_ratio;
 
+function rack_rail_y_of_elevation(elevation_nominal) =
+  brk_bottom_y - elevation_nominal - general_gap_y  - rack_rail_dia/2;
+
 echo(rack_shear_ratio);
 
 module GraspElevation(){
@@ -213,8 +216,7 @@ module AsForeAftMaint(){
 
 module Principal(){
   // calculated
-  $rack_rail_y = brk_bottom_y - $elevation_nominal
-    - general_gap_y  - rack_rail_dia/2;
+  $rack_rail_y = rack_rail_y_of_elevation($elevation_nominal);
 
   $strap_barrel_y = $rack_rail_y + rack_rail_dia/2 + strap_barrel_dia/2;