added parametric magnet-holes
This commit is contained in:
parent
e3574135f9
commit
4ce1560100
@ -7,14 +7,30 @@ base_upper_dia=30; //upper diameter
|
||||
cutout_dia=base_upper_dia-1.6; //adjusted for 2 walls on 0.4 nozzle (0.4*2*2)
|
||||
base_h=4; //overall height
|
||||
mt=1.5; //bottom thickness, suitable for 0.3 and 0.5 layers
|
||||
scale_factor=2; // scaling in y-dimension
|
||||
scale_factor=1.1; // scaling in y-dimension
|
||||
magnet_dia=5.5;
|
||||
magnet_h=1.1;
|
||||
magnet_count=2;
|
||||
|
||||
$fn=150;
|
||||
//
|
||||
// ###
|
||||
// Model
|
||||
scale([1,scale_factor,1]){
|
||||
difference(){
|
||||
cylinder(r1=base_lower_dia/2, r2=base_upper_dia/2, h=base_h);
|
||||
translate([0,0,mt]) #cylinder(r=cutout_dia/2, h=base_h-mt+0.1);
|
||||
|
||||
difference(){
|
||||
scale([1,scale_factor,1]){
|
||||
difference(){
|
||||
cylinder(r1=base_lower_dia/2, r2=base_upper_dia/2, h=base_h);
|
||||
translate([0,0,mt])cylinder(r=cutout_dia/2, h=base_h-mt+0.1);
|
||||
}
|
||||
}
|
||||
if (magnet_count==1){
|
||||
translate([0,0,-0.01])#cylinder(r=magnet_dia/2,h=magnet_h);
|
||||
}
|
||||
else{
|
||||
for (x =[-(base_lower_dia*scale_factor/2-(magnet_dia)):(base_lower_dia*scale_factor-(2*magnet_dia))/(magnet_count-1):(base_lower_dia*scale_factor/2-(magnet_dia))]){
|
||||
translate([0,x,-0.01])#cylinder(r=magnet_dia/2,h=magnet_h);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user