X-Git-Url: http://git.hcoop.net/clinton/3d-models.git/blobdiff_plain/244fc8f0fd3809dc88f93365d82f23aea05925db..5d6b539aae4f4b8664178ec7198dc978defff625:/acorn/acorn-threads.scad diff --git a/acorn/acorn-threads.scad b/acorn/acorn-threads.scad index 1abc99e..50eb524 100644 --- a/acorn/acorn-threads.scad +++ b/acorn/acorn-threads.scad @@ -5,10 +5,15 @@ use // http://www.thingiverse.com/thing:1686322 AUTO_CALCULATE = -1; +acorn_parts = [ "body", "cap", "gasket" ]; + internal_thread_tolerance = 0.3; external_thread_tolerance = 0.2; thread_angle = 50; + +function contains (x, lst) = len([ for (i = lst) if (x == i) i]) > 0; + module acorn (thread_pitch = 3.0, thread_size = 2.5, thread_height = 3.5, @@ -98,9 +103,12 @@ module acorn (thread_pitch = 3.0, } module nuts () { - translate ([outer_d+10, 0, 0,]) nut (); - cap (); - translate ([-(outer_d+10), 0, 0,]) gasket (); + if (contains ("body", acorn_parts)) + translate ([outer_d+10, 0, 0,]) nut (); + if (contains ("cap", acorn_parts)) + cap (); + if (contains ("gasket", acorn_parts)) + translate ([-(outer_d+10), 0, 0,]) gasket (); } nuts ();