acorn: medium acorn present
[clinton/3d-models.git] / acorn / acorn-threads.scad
index 688ef30..2f28c51 100644 (file)
@@ -35,6 +35,7 @@ module acorn (thread_pitch = 3.0,
              base_height = AUTO_CALCULATE,
              wall_thickness = AUTO_CALCULATE,
              outer_d = AUTO_CALCULATE,
+             dome_h = AUTO_CALCULATE,
 
               keychain = true) {
 
@@ -110,16 +111,18 @@ module acorn (thread_pitch = 3.0,
               }
               if (keychain) cap_keychain_holes ();
 
-              // hollow it out (make parametric later, this is pretty ugly now, but calc seems to be ok for RaleighAcorn)
+              // hollow the cap out (make parametric later, this is pretty ugly now, but calc seems to be ok for RaleighAcorn)
               diam_to_height_ratio = 3.2;
-              dome_h = outer_d / diam_to_height_ratio - thread_height;
+              dome_h = (dome_h == AUTO_CALCULATE) ? outer_d / diam_to_height_ratio - thread_height : dome_h;
               echo ("dome_h = ", dome_h);
               difference () {
                    translate ([0, 0, thread_height-0.01]) dome (d=outer_d, h=dome_h);
               }
 
 
-              translate ([0, 0, -0.01]) acorn_thread (internal = true, ring = false);
+              if (thread_height != 0) {
+                   translate ([0, 0, -0.01]) acorn_thread (internal = true, ring = false);
+              }
          }
      }
 
@@ -146,6 +149,10 @@ acorn_parts = [ "cap"];
 
 //acorn ();
 huge_acorn ();
+module medium_acorn () {
+     // older slightly larger model.
+     acorn (inner_d = 26, base_height=20);
+}
 
 module huge_acorn () {
      acorn (inner_d=100, base_height=80,