dos2unix, decrease thickness, code clean up

This commit is contained in:
Felix Pankratz 2025-04-25 18:49:59 +02:00
parent 24fbf922fa
commit a6270a26d2

View File

@ -4,7 +4,7 @@ $fs = 0.4;
outer_radius = 30; outer_radius = 30;
height_total = 35; height_total = 35;
thickness = 3; thickness = 2;
cap_height = 10; cap_height = 10;
@ -21,42 +21,28 @@ difference() {
cylinder(h=height_base, r = inner_radius); cylinder(h=height_base, r = inner_radius);
} }
// divider // divider
//translate([-outer_radius + (thickness/2), 0, 0])
// cube([outer_radius*2 - thickness, thickness, height_base ]);
translate([0, 0, height_base/2 - 0.01]) translate([0, 0, height_base/2 - 0.01])
cube([outer_radius*2 - thickness * 2, thickness, height_base+0.01], center=true); cube([outer_radius*2 - thickness * 2, thickness, height_base+0.01], center=true);
// divider stage 2 // divider stage 2
translate([0, 0, height_base + (height_thread/2) - 0.01]) translate([0, 0, height_base + (height_thread/2) - 0.01])
cube([inner_radius*2 - thickness * 2, thickness, height_thread+0.01], center=true); cube([inner_radius*2 - (thickness * 3), thickness, height_thread+0.01], center=true);
// thread (neck)
//translate([0, 0, height_base - 0.01]) {
// difference(){
// cylinder(h=height_thread + 0.01, r=outer_radius - (thickness / 2));
// translate([0,0,-0.01])
// cylinder(h=height_thread + 1, r=inner_radius);
// }
//}
// thread and neck
translate([0, 0, height_base - 1]) { translate([0, 0, height_base - 1]) {
difference() { difference() {
union() { union() {
ScrewThread( thread_radius*2, height_thread + 1, pitch=4); ScrewThread( thread_radius*2, height_thread + 1, pitch=4);
cylinder(h = 1, r=outer_radius); cylinder(h = 1, r=outer_radius);
} }
translate([0, 0, -0.01]) translate([0, 0, -0.01])
cylinder(h=height_thread+2, r=thread_radius - thickness*2); cylinder(h=height_thread+2, r=thread_radius - thickness*2);
} }
} }
// cap // cap
translate([70, 0, cap_height]) rotate([180, 0,0]) { translate([70, 0, cap_height]) rotate([180, 0,0]) {
ScrewHole(thread_radius * 2, cap_height - thickness, pitch=4) ScrewHole(thread_radius * 2, cap_height - thickness, pitch=4)
cylinder(h=cap_height, r=outer_radius); cylinder(h=cap_height, r=outer_radius);
} }
//module ScrewHole(outer_diam, height, position=[0,0,0], rotation=[0,0,0], pitch=0, tooth_angle=30, tolerance=0.4, tooth_height=0) {