4536 |
jacho |
1 |
/* |
|
|
2 |
* polyTests.scad by aubenc @ Thingiverse |
|
|
3 |
* |
|
|
4 |
* This script contains few examples to show how to use the modules |
|
|
5 |
* included in the library script: polyScrewThead.scad |
|
|
6 |
* |
|
|
7 |
* http://www.thingiverse.com/thing:8796 |
|
|
8 |
* |
|
|
9 |
* CC Public Domain |
|
|
10 |
*/ |
|
|
11 |
include <polyScrewThread.scad> |
|
|
12 |
|
|
|
13 |
PI=3.141592; |
|
|
14 |
|
|
|
15 |
/* Example 01. |
|
|
16 |
* Just a 100mm long threaded rod. |
|
|
17 |
* |
|
|
18 |
* screw_thread(15, // Outer diameter of the thread |
|
|
19 |
* 4, // Step, traveling length per turn, also, tooth height, whatever... |
|
|
20 |
* 55, // Degrees for the shape of the tooth |
|
|
21 |
* (XY plane = 0, Z = 90, btw, 0 and 90 will/should not work...) |
|
|
22 |
* 100, // Length (Z) of the tread |
|
|
23 |
* PI/2, // Resolution, one face each "PI/2" mm of the perimeter, |
|
|
24 |
* 0); // Countersink style: |
|
|
25 |
* -2 - Not even flat ends |
|
|
26 |
* -1 - Bottom (countersink'd and top flat) |
|
|
27 |
* 0 - None (top and bottom flat) |
|
|
28 |
* 1 - Top (bottom flat) |
|
|
29 |
* 2 - Both (countersink'd) |
|
|
30 |
*/ |
|
|
31 |
// screw_thread(15,4,55,100,PI/2,2); |
|
|
32 |
|
|
|
33 |
|
|
|
34 |
/* Example 02. |
|
|
35 |
* A nut for the previous example. |
|
|
36 |
* |
|
|
37 |
* hexa_nut(24, // Distance between flats |
|
|
38 |
* 8, // Height |
|
|
39 |
* 4, // Step height (the half will be used to countersink the ends) |
|
|
40 |
* 55, // Degrees (same as used for the screw_thread example) |
|
|
41 |
* 15, // Outer diameter of the thread to match |
|
|
42 |
* 0.5) // Resolution, you may want to set this to small values |
|
|
43 |
* (quite high res) to minimize overhang issues |
|
|
44 |
* |
|
|
45 |
*/ |
|
|
46 |
// hex_nut(24,8,4,55,15,0.5); |
|
|
47 |
|
|
|
48 |
|
|
|
49 |
/* Example 03. |
|
|
50 |
* A screw, threaded all the way, with hex head. |
|
|
51 |
* |
|
|
52 |
* hex_screw(15, // Outer diameter of the thread |
|
|
53 |
* 4, // Thread step |
|
|
54 |
* 55, // Step shape degrees |
|
|
55 |
* 30, // Length of the threaded section of the screw |
|
|
56 |
* 1.5, // Resolution (face at each 2mm of the perimeter) |
|
|
57 |
* 2, // Countersink in both ends |
|
|
58 |
* 24, // Distance between flats for the hex head |
|
|
59 |
* 8, // Height of the hex head (can be zero) |
|
|
60 |
* 0, // Length of the non threaded section of the screw |
|
|
61 |
* 0) // Diameter for the non threaded section of the screw |
|
|
62 |
* -1 - Same as inner diameter of the thread |
|
|
63 |
* 0 - Same as outer diameter of the thread |
|
|
64 |
* value - The given value |
|
|
65 |
* |
|
|
66 |
*/ |
|
|
67 |
// hex_screw(15,4,55,30,1.5,2,24,8,0,0); |
|
|
68 |
|
|
|
69 |
|
|
|
70 |
/* Example 04. |
|
|
71 |
* A screw with a non threaded section and with hex head. |
|
|
72 |
* |
|
|
73 |
* Same module and parameters than for Example 03 but for the length of the non |
|
|
74 |
* threaded section wich is set to 50mm here. |
|
|
75 |
* |
|
|
76 |
*/ |
|
|
77 |
// hex_screw(15,4,55,30,1.5,2,24,8,50,0); |
|
|
78 |
|
|
|
79 |
|
|
|
80 |
/* Example 05. |
|
|
81 |
* |
|
|
82 |
* A rod whith a middle section without thread and, a portion of it, hex shaped. |
|
|
83 |
* One end is threaded in the opposite direction than the other. |
|
|
84 |
* |
|
|
85 |
* So... yes, OpenSCAD mirror feature will change the thread direction. |
|
|
86 |
* |
|
|
87 |
*/ |
|
|
88 |
/* |
|
|
89 |
translate([0,0,32.5+5+7.5]) |
|
|
90 |
union() |
|
|
91 |
{ |
|
|
92 |
hex_screw(15,4,55,32.5,1.5,2,15,5,7.5,0); |
|
|
93 |
mirror([0,0,1]) hex_screw(15,4,55,32.5,1.5,2,15,5,7.5,0); |
|
|
94 |
} |
|
|
95 |
*/ |