summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Patronenhuelle.scad48
1 files changed, 36 insertions, 12 deletions
diff --git a/Patronenhuelle.scad b/Patronenhuelle.scad
index 079cbf6..f990261 100644
--- a/Patronenhuelle.scad
+++ b/Patronenhuelle.scad
@@ -5,8 +5,40 @@ Gewindelaenge = 10;
Gang = 2;
epsilon = 0.01;
+P = Gang;
+H = sqrt(3)/2 * P;
+
+step = 0.01;
+
auszen = 1;
+module einTrapez(n) {
+ rotate([360*n,0,0])
+ translate([Gang*n,Patronendicke/2+Wanddicke*2/3-3*H/8,0])
+ linear_extrude(0.0001)
+ polygon([
+ [-(6+auszen)/16*P,-H/4],
+ [-(P+auszen)/16,3/8*H],
+ [(P+auszen)/16,3/8*H],
+ [(6+auszen)/16*P,-H/4]
+ ]);
+};
+
+module dasGewinde() {
+ difference() {
+ rotate([0,-90,0])
+ for (i = [-1:step:Gewindelaenge/Gang + 1-step])
+ hull() {
+ einTrapez(i);
+ einTrapez(i+step);
+ }
+ translate([0,0,Gewindelaenge])
+ cylinder(h = 3*Gang, r = Patronendicke + 2*Wanddicke);
+ translate([0,0,-3*Gang])
+ cylinder(h = 3*Gang, r = Patronendicke + 2*Wanddicke);
+ };
+}
+
difference() {
union() {
translate([0,0,-Wanddicke])
@@ -14,21 +46,13 @@ difference() {
translate([0,0,Patronenlaenge/2])
cylinder(h = Gewindelaenge, r = Patronendicke/2 + Wanddicke/3, $fn = 100, center = true);
translate([0,0,Patronenlaenge/2 - Gewindelaenge/2]) {
- intersection() {
- difference() {
- linear_extrude(Gewindelaenge, twist = -Gewindelaenge / Gang * 360, slices = Gewindelaenge/Gang * 50, $fn = 100, convexity = 10)
- translate([-Patronendicke,epsilon])
- square(2*Patronendicke);
- cylinder(h = Patronenlaenge, r = Patronendicke/2 + auszen*epsilon, $fn = 100);
- }
- cylinder(h = Gewindelaenge, r = Patronendicke/2 + Wanddicke*2/3 - (1-auszen) * epsilon, $fn=100);
- }
+ dasGewinde();
difference() {
cylinder(h = Gewindelaenge, r = Patronendicke/2 + Wanddicke*auszen, $fn = 100);
cylinder(h = Gewindelaenge, r = Patronendicke/2 + Wanddicke*2/3 + epsilon, $fn = 100);
- }
- }
- }
+ };
+ };
+ };
cylinder(h = Patronenlaenge + Wanddicke, r = Patronendicke/2, $fn = 100);
translate([0,0,(Patronenlaenge-Gewindelaenge)/2])
cylinder(h = Patronenlaenge + Wanddicke, r = Patronendicke/2 + auszen * (Wanddicke/3 + epsilon), $fn = 100);