Änderungen
Aus Hackerspace Ffm
+ Datei:M6 thumbscrew 002.png
Datei:Foto1793.jpg|Safety first!
</gallery>
== Thumbscrews M6 ==
[[Datei:M6 thumbscrew 002.png|240px|none|thumb|Screenshot]]
* convert a regular M6 nut into a M6 thumbscrew
<nowiki>//
// M6 thumbscrew
//
// 29.12.2011 - 002 - initial
// 30.12.2011 - 004 - better thumbscrew pattern
// 30.12.2011 - 005 - + test mode
// 01.01.2012 - 007 - adjust M6 hole, adjust nut diameter
//
test = 0;
pi = 3.1415926;
R = 10; // main radius (mm)
// "diff" cylinders around main radius
rs = 1.25; // radius cylinders
N = round((R * 2 * pi) / (2.8 * rs)); // number
R2 = R + rs / 4;
// hole M6
rh = 3.25; // radius "hole for M6"
// heights
tt = (test == 0) ? 8.0 : 3.2; // thickness total
tt2 = tt + 1;
// nut
Dn = 10.1; // diameter of the nut (!)
Rn = tan(30) * Dn; // radius of outer circle (from diameter)
tn = (test == 0) ? 4.6 : 2.0; // thickness
// some debug infos
echo ("main Radius R = ", R);
echo ("diff cylinders N = ", N);
difference () {
cylinder(r = R, h = tt, center=true, $fn=N * 12);
cylinder(r = rh, h = tt2, center=true, $fn=50);
translate ([0, 0, 0.01 + ((tt - tn) / 2) ])
cylinder(r = Rn, h = tn, center=true, $fa=60);
for ( i = [1 : 1 : N] )
{
assign (a = 360 / N * i)
translate([R2 * cos(a), R2 * sin(a), 0]) rotate ([0, 0, a]) {
cylinder(r = rs, h = tt2, center=true, $fn=16);
}
}
}</nowiki>
== Ruler for debugging ==
[[Datei:Ruler for debugging.png|100px240px|none|thumb|Screenshot]]
* add a simple ruler to OpenSCAD source code
* optical control - prevent getting lost of orientation and size of the result
* ruler will '''not''' be part of STL output etc. (using the [http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Modifier_Characters % background modifier])
* Source: [[Datei:Ruler for debugging.scad]]
<nowiki>//
// rulers - demo
//
% translate ([0, i, 0]) cube([ruler_thick, ruler_thick, ruler_length], center=true);
% translate ([0, 0, i]) cube([ruler_length, ruler_thick, ruler_thick], center=true);
}</nowiki>
== OpenSCAD Tipps, Tutorials etc. ==