From: Ian Jackson Date: Wed, 11 Feb 2015 22:16:23 +0000 (+0000) Subject: screw-recess-test: mid of new tests X-Git-Tag: filamentspool-v2-release~201 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=commitdiff_plain;h=87ce6b1fa00684122a313255c2c4d50dab2bbada screw-recess-test: mid of new tests --- diff --git a/screw-recess-test.scad b/screw-recess-test.scad index 50bcd5a..e3dab4e 100644 --- a/screw-recess-test.scad +++ b/screw-recess-test.scad @@ -4,7 +4,19 @@ cubez = 12; shaftz = cubez; -tests = [[4 + 0.5, 10 + 1.0]]; +// shaftdia recessdia +tests = [[2 + 0.5, 6 + 1.0, 0, 0 ], + [3 + 0.5, 9 + 1.0, 0, 10 ], + [4 + 0.5, 10 + 1.0, 0, 25 ], + [5 + 0.5, 10 + 1.0, 15, 5 ], + [6 + 0.5, 12 + 1.0, 15, 20 ]]; + +last_test = tests[len(tests)-1]; + +blockminx = -5; +blockminy = -5; +blockmaxx = 25; +blockmaxy = 20; cubexy = 20; @@ -40,18 +52,36 @@ module RecessedScrewCutout(shaftdia, recessdia, shaftlen, } } +module Block(){ + translate([blockminx, blockmaxx, 0]) + cube([blockmaxx-blockminx, blockmaxy-blockminy, cubez]); +} + module Test(){ difference(){ - translate([-cubexy/2, -cubexy/2, 0]) - cube([cubexy,cubexy,cubez]); + Block(); + union(){ + for (t = tests) { + RecessedScrewCutout(t[0],t[1], shaftz+1); + } + } } } -module Hole(){ - RecessedScrewCutout(tests[0][0], - tests[0][1], - shaftz+1); +module Holes(){ + for (t = tests) { + translate([t[2], t[3], 0]) + RecessedScrewCutout(t[0],t[1], shaftz+1); + } +} + +module Demo(){ + Block(); + %Holes(); } +Demo(); + //Test(); -Hole(); +//Hole(); +//Holes();