mirror of
https://github.com/kennetek/gridfinity-rebuilt-openscad.git
synced 2024-11-29 11:33:56 +00:00
use cut_indent() for depth of cylindrical compartments
This commit is contained in:
parent
22350f5818
commit
548f3d011e
2 changed files with 14 additions and 16 deletions
|
@ -54,6 +54,8 @@ cd = 10;
|
|||
ch = 1;
|
||||
// spacing to lid
|
||||
c_depth = 1;
|
||||
// fillet between indentation and walls
|
||||
c_fillet = false;
|
||||
// chamfer around the top rim of the holes
|
||||
c_chamfer = 0.5;
|
||||
|
||||
|
@ -95,7 +97,7 @@ gridfinityInit(gridx, gridy, height(gridz, gridz_define, style_lip, enable_zsnap
|
|||
|
||||
} else if (cdivx > 0 && cdivy > 0) {
|
||||
|
||||
cutCylinders(n_divx=cdivx, n_divy=cdivy, cylinder_diameter=cd, cylinder_height=ch, coutout_depth=c_depth, orientation=c_orientation, chamfer=c_chamfer);
|
||||
cutCylinders(n_divx=cdivx, n_divy=cdivy, cylinder_diameter=cd, cylinder_height=ch, cutout_depth=c_depth, orientation=c_orientation, chamfer=c_chamfer,cutout_fillet=c_fillet);
|
||||
}
|
||||
}
|
||||
gridfinityBase(gridx, gridy, l_grid, div_base_x, div_base_y, style_hole, only_corners=only_corners);
|
||||
|
|
|
@ -85,10 +85,10 @@ module cutEqual(n_divx=1, n_divy=1, style_tab=1, scoop_weight=1) {
|
|||
// set n_div values to 0 for a solid bin
|
||||
// cylinder_diameter: diameter of cutouts
|
||||
// cylinder_height: height of cutouts
|
||||
// coutout_depth: offset from top to solid part of container
|
||||
// cutout_depth: offset from top to solid part of container
|
||||
// orientation: orientation of cylinder cutouts (0 = x direction, 1 = y direction, 2 = z direction)
|
||||
// chamfer: chamfer around the top rim of the holes
|
||||
module cutCylinders(n_divx=1, n_divy=1, cylinder_diameter=1, cylinder_height=1, coutout_depth=0, orientation=0, chamfer=0.5) {
|
||||
module cutCylinders(n_divx=1, n_divy=1, cylinder_diameter=1, cylinder_height=1, cutout_depth=0, orientation=0, chamfer=0.5, cutout_fillet=false) {
|
||||
rotation = (orientation == 0)
|
||||
? [0,90,0]
|
||||
: (orientation == 1)
|
||||
|
@ -101,10 +101,7 @@ module cutCylinders(n_divx=1, n_divy=1, cylinder_diameter=1, cylinder_height=1,
|
|||
cutout_x = gridx_mm - d_wall*2;
|
||||
cutout_y = gridy_mm - d_wall*2;
|
||||
|
||||
cut_move(x=0, y=0, w=$gxx, h=$gyy) {
|
||||
translate([0,0,-coutout_depth]) {
|
||||
rounded_rectangle(cutout_x, cutout_y, coutout_depth*2, r_base);
|
||||
|
||||
cut_indent(cutout_depth,x=0, y=0, w=$gxx, h=$gyy, enable_fillet=cutout_fillet) {
|
||||
pattern_linear(x=n_divx, y=n_divy, sx=(gridx_mm - padding)/n_divx, sy=(gridy_mm - padding)/n_divy)
|
||||
rotate(rotation)
|
||||
union() {
|
||||
|
@ -115,7 +112,6 @@ module cutCylinders(n_divx=1, n_divy=1, cylinder_diameter=1, cylinder_height=1,
|
|||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// initialize gridfinity
|
||||
// sl: lip style of this bin.
|
||||
|
|
Loading…
Reference in a new issue