chiark / gitweb /
thread-internal-test-multi: many master
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 27 Apr 2025 22:29:34 +0000 (23:29 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 27 Apr 2025 22:29:39 +0000 (23:29 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
thread-internal-test-multi.scad

index a37b7097ad655d2ac2f6de5df4682e8bafd3ca46..c2ac5a23c41f7e47670cf633d75861cc5285cef7 100644 (file)
@@ -20,6 +20,9 @@ $test = false;
 
 base_dia = head_size / cos(30);
 
+pos_z_min = -base_th;
+pos_z_max = thread_len - 0.1;
+
 module ScrewThread(){
   translate([0, 0, -0.1])
     render()
@@ -31,10 +34,8 @@ module ScrewThread(){
 module TestThread(){
   difference(){
     union(){
-      linextr(-base_th, 0)
-       square(center=true, base_sz);
-
-      linextr(-base_th, thread_len - 0.1)
+      linextr(pos_z_min, pos_z_max)
+        rotate([0,0,30])
        circle(r= base_dia/2, $fn=6);
     }
 
@@ -42,4 +43,13 @@ module TestThread(){
   }
 }
 
-TestThread($thread_slop = 0.375);
+module Test() {
+  translate([-24 -1, 4, 0]) linextr(pos_z_min, pos_z_max) square([2, 3]);
+  translate([-24, 0, 0]) TestThread($thread_slop = 0.000);
+  translate([-16, 0, 0]) TestThread($thread_slop = 0.125);
+  translate([ -8, 0, 0]) TestThread($thread_slop = 0.250);
+  translate([  0, 0, 0]) TestThread($thread_slop = 0.375);
+  translate([  8, 0, 0]) TestThread($thread_slop = 0.500);
+}
+
+Test();