Hamapumpenflansch/Ansaugflansch.scad
2024-06-04 17:33:04 +02:00

123 lines
4.8 KiB
OpenSCAD

// Flansch für Saugpumpe
$fn = 100; // Auflösung
// Gewinde
type = "rod";//[nut,bolt,rod,washer]
/* [Bolt and Rod Options] */
//Head type - Hex, Socket Cap, Button Socket Cap or Countersunk Socket Cap (ignored for Rod)
head_type = "hex";//[hex,socket,button,countersunk]
//Drive type - Socket, Phillips, Slot (ignored for Hex head type and Rod)
drive_type = "socket";//[socket,phillips,slot]
//Distance between flats for the hex head or diameter for socket or button head (ignored for Rod)
head_diameter = 12;
//Height of the head (ignored for Rod)
head_height = 5;
//Diameter of drive type (ignored for Hex head and Rod)
drive_diameter = 5;
//Width of slot aperture for phillips or slot drive types
slot_width = 1;
//Depth of slot aperture for slot drive type
slot_depth = 2;
//Surface texture (socket head only)
texture = "exclude";//[include,exclude]
//Outer diameter of the thread
thread_outer_diameter = 40.8;
//Thread step or Pitch (2mm works well for most applications ref. ISO262: M3=0.5,M4=0.7,M5=0.8,M6=1,M8=1.25,M10=1.5)
thread_step = 1.9;
//Step shape degrees (45 degrees is optimised for most printers ref. ISO262: 30 degrees)
step_shape_degrees = 45;
//Length of the threaded section
thread_length = 20;
//Countersink in both ends
countersink = 2;
//Length of the non-threaded section
non_thread_length = 0;
//Diameter for the non-threaded section (-1: Same as inner diameter of the thread, 0: Same as outer diameter of the thread, value: The given value)
non_thread_diameter = 0;
/* [Nut Options] */
//Type: Normal or WingNut
nut_type = "normal";//[normal,wingnut]
//Distance between flats for the hex nut
nut_diameter = 12;
//Height of the nut
nut_height = 6;
//Outer diameter of the bolt thread to match (usually set about 1mm larger than bolt diameter to allow easy fit - adjust to personal preferences)
nut_thread_outer_diameter = 9;
//Thread step or Pitch (2mm works well for most applications ref. ISO262: M3=0.5,M4=0.7,M5=0.8,M6=1,M8=1.25,M10=1.5)
nut_thread_step = 2;
//Step shape degrees (45 degrees is optimised for most printers ref. ISO262: 30 degrees)
nut_step_shape_degrees = 45;
//Wing radius ratio. The proportional radius of the wing on the wing nut compared to the nut height value (default = 1)
wing_ratio = 1;
wing_radius=wing_ratio * nut_height;
/* [Washer Options] */
//Inner Diameter (suggest making diameter slightly larger than bolt diameter)
inner_diameter = 8;
//Outer Diameter
outer_diameter = 14;
//Thickness
thickness = 2;
/* [Extended Options] */
//Number of facets for hex head type or nut. Default is 6 for standard hex head and nut
facets = 6;
//Number of facets for hole in socket head. Default is 6 for standard hex socket
socket_facets = 6;
//Depth of hole in socket head. Default is 3.5
socket_depth = 3.5;
//Resolution (lower values for higher resolution, but may slow rendering)
resolution = 0.5;
nut_resolution = resolution;
include <nut_job.scad>
H_base=25;
bord=2;
h_unit=6;
d_high=19;
d_low=18;
epsilon=0.001;
d_int=13;
n_unit=5;
/* Example 01.
* Just a 100mm long threaded rod.
*
* screw_thread(15, // Outer diameter of the thread
* 4, // Step, traveling length per turn, also, tooth height, whatever...
* 55, // Degrees for the shape of the tooth
* (XY plane = 0, Z = 90, btw, 0 and 90 will/should not work...)
* 100, // Length (Z) of the tread
* PI/2, // Resolution, one face each "PI/2" mm of the perimeter,
* 0); // Countersink style:
* -2 - Not even flat ends
* -1 - Bottom (countersink'd and top flat)
* 0 - None (top and bottom flat)
* 1 - Top (bottom flat)
* 2 - Both (countersink'd)
*/
// screw_thread(15,4,55,100,PI/2,2);
difference() {
union() {
hex_screw(thread_outer_diameter,thread_step,step_shape_degrees,thread_length,resolution,countersink,head_diameter,0,non_thread_length,non_thread_diameter);
translate([0,0,19])cylinder(h = 10, r1=20,r2=12, center = false);
// Hose fitting
difference() {
for(i=[1:5]) {
translate([0,0,H_base+1.5*bord+(i-1)*h_unit]) cylinder(r1=d_high/2,r2=d_low/2,h=h_unit);
}
translate([0,0,H_base+1.5*bord-epsilon]) cylinder(r=d_int/2,h=n_unit*h_unit+2*epsilon);
}
}
translate([0,0,-1])cylinder(h = 25, r1 = 17,r2 = 6, center = false);
translate([0,0,-2])cylinder(h = 70, r1 = 6,r2 = 6, center = false);
}