mirror of
https://github.com/kennetek/gridfinity-rebuilt-openscad.git
synced 2024-05-15 20:04:52 +00:00
add functionality for chamfer
This commit is contained in:
parent
e7478a7dc9
commit
e16353c03f
16
gridfinity-rebuilt-utility.scad
Normal file → Executable file
16
gridfinity-rebuilt-utility.scad
Normal file → Executable file
|
@ -181,12 +181,15 @@ module block_base_solid(dbnx, dbny, l, o) {
|
|||
}
|
||||
}
|
||||
|
||||
module block_base_hole(style_hole, o=0) {
|
||||
module block_base_hole(style_hole, o=0, chamfer=true) {
|
||||
r1 = r_hole1-o/2;
|
||||
r2 = r_hole2-o/2;
|
||||
|
||||
hole_h = h_hole-o+(style_hole==3?h_slit:0);
|
||||
|
||||
union() {
|
||||
difference() {
|
||||
cylinder(h = 2*(h_hole-o+(style_hole==3?h_slit:0)), r=r2, center=true);
|
||||
cylinder(h = 2*(hole_h), r=r2, center=true);
|
||||
|
||||
if (style_hole==3)
|
||||
copy_mirror([0,1,0])
|
||||
|
@ -195,10 +198,17 @@ module block_base_hole(style_hole, o=0) {
|
|||
}
|
||||
if (style_hole > 1)
|
||||
cylinder(h = 2*h_base-o, r = r1, center=true);
|
||||
// generate an offset pyramid for a 0.4mm chamfer
|
||||
if (chamfer)
|
||||
translate([0, 0, (hole_h-0.01)])
|
||||
difference() {
|
||||
cylinder(h = 2*(h_hole-o+(style_hole==3?h_slit:0)), r1 = r2 + 0.4, r2 = 0.0001, center=true);
|
||||
translate([0, 0, (hole_h)/2])
|
||||
cylinder(h = hole_h, r=r2,center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
module refined_hole() {
|
||||
/**
|
||||
* Refined hole based on Printables @grizzie17's Gridfinity Refined
|
||||
|
|
Loading…
Reference in a new issue