bring in height to sonar binder clip holder
authordaniel watson <ozzloy@gmail.com>
Sat, 4 Jun 2016 22:17:40 +0000 (15:17 -0700)
committerdaniel watson <ozzloy@gmail.com>
Sat, 4 Jun 2016 22:17:40 +0000 (15:17 -0700)
3d-printables/sonar-binder-clip-holder-data.scad
3d-printables/sonar-binder-clip-holder.scad

index f944906ba8dc684442c6f8a91076655055ea2a0a..94ba32471e88e4f631baf3c5dc4cda83ce5c4dd4 100644 (file)
@@ -36,6 +36,8 @@ screw_radius_measured = 2.8;
 screw_radius_print_fudge = 0.3;
 screw_radius = screw_radius_measured + screw_radius_print_fudge;
 
+sonar_binder_clip_holder_height = 2;
+
 module sonar_sensors_2d(sonar_radius,
                         between_sonar_centers,
                         between_sonar_centers_variation) {
@@ -57,10 +59,10 @@ module sonar_holder_outline_2d(sonar_radius,
                -holder_radius]) {
       square(holder_diameter); } } }
 
-module sonar_holder(sonar_radius,
-                    between_sonar_centers,
-                    between_sonar_centers_variation,
-                    wall_thickness) {
+module sonar_holder_2d(sonar_radius,
+                       between_sonar_centers,
+                       between_sonar_centers_variation,
+                       wall_thickness) {
   difference() {
     sonar_holder_outline_2d(sonar_radius,
                             between_sonar_centers,
@@ -69,29 +71,49 @@ module sonar_holder(sonar_radius,
                      between_sonar_centers,
                      between_sonar_centers_variation); } }
 
-module binder_clip_holder(binder_clip_holder_length,
-                          screw_radius,
-                          holder_radius){
+module binder_clip_holder_2d(binder_clip_holder_length,
+                             screw_radius,
+                             holder_radius){
   difference() {
   square([binder_clip_holder_length, holder_radius * 2]);
   translate([binder_clip_holder_length - holder_radius, holder_radius]) {
     circle(screw_radius); } } }
 
-module sonar_binder_clip_holder(sonar_radius,
-                                between_sonar_centers,
-                                between_sonar_centers_variation,
-                                wall_thickness) {
-  sonar_holder(sonar_radius,
-               between_sonar_centers,
-               between_sonar_centers_variation,
-               wall_thickness);
+module sonar_binder_clip_holder_2d(sonar_radius,
+                                   between_sonar_centers,
+                                   between_sonar_centers_variation,
+                                   wall_thickness) {
+  sonar_holder_2d(sonar_radius,
+                  between_sonar_centers,
+                  between_sonar_centers_variation,
+                  wall_thickness);
   holder_radius = sonar_radius + wall_thickness;
   binder_clip_holder_length = 2 * holder_radius;
   translate([between_sonar_centers + holder_radius, -holder_radius]){
-    binder_clip_holder(binder_clip_holder_length,
+    binder_clip_holder_2d(binder_clip_holder_length,
                        screw_radius,
                        holder_radius); } }
 
+module sonar_binder_clip_holder(sonar_radius,
+                                between_sonar_centers,
+                                between_sonar_centers_variation,
+                                wall_thickness,
+                                sonar_binder_clip_holder_height) {
+  linear_extrude(height = sonar_binder_clip_holder_height) {
+    sonar_binder_clip_holder_2d(sonar_radius,
+                                between_sonar_centers,
+                                between_sonar_centers_variation,
+                                wall_thickness); } }
+
+module binder_clip_holder(binder_clip_holder_length,
+                          screw_radius,
+                          holder_radius,
+                          binder_clip_holder_height) {
+     linear_extrude(height = binder_clip_holder_height) {
+          binder_clip_holder_2d(binder_clip_holder_length,
+                                screw_radius,
+                                holder_radius); } }
+
 /*
   This file is part of challenge-bot.
 
index bd79585eea5f578528a33d0f09d113ea5fc2d23f..387334e0043f9e75daea0422f8f2c125300adcb8 100644 (file)
@@ -21,14 +21,16 @@ include <sonar-binder-clip-holder-data.scad>
 sonar_binder_clip_holder(sonar_radius,
                          between_sonar_centers,
                          between_sonar_centers_variation,
-                         wall_thickness);
+                         wall_thickness,
+                         sonar_binder_clip_holder_height);
 
 holder_radius = sonar_radius + wall_thickness;
 binder_clip_holder_length = 2 * holder_radius;
 translate([0, holder_radius + 2]) {
   binder_clip_holder(binder_clip_holder_length,
                      screw_radius,
-                     holder_radius); }
+                     holder_radius,
+                     sonar_binder_clip_holder_height); }
 
 /*
   This file is part of challenge-bot.