-
Notifications
You must be signed in to change notification settings - Fork 305
Expand file tree
/
Copy pathgridfinity-rebuilt-lite.scad
More file actions
93 lines (78 loc) · 2.84 KB
/
gridfinity-rebuilt-lite.scad
File metadata and controls
93 lines (78 loc) · 2.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// ===== INFORMATION ===== //
/*
IMPORTANT: rendering will be better in development builds and not the official release of OpenSCAD, but it makes rendering only take a couple seconds, even for comically large bins.
https://github.com/kennetek/gridfinity-rebuilt-openscad
*/
include <src/core/standard.scad>
use <src/core/gridfinity-rebuilt-utility.scad>
use <src/core/gridfinity-rebuilt-holes.scad>
use <src/core/bin.scad>
use <src/core/cutouts.scad>
// ===== PARAMETERS ===== //
/* [Setup Parameters] */
$fa = 8;
$fs = 0.25;
/* [General Settings] */
// number of bases along x-axis
gridx = 3;
// number of bases along y-axis
gridy = 3;
// bin height. See bin height information and "gridz_define" below.
gridz = 6;
// Half grid sized bins. Implies "only corners".
half_grid = false;
/* [Compartments] */
// number of X Divisions
divx = 2;
// number of y Divisions
divy = 2;
/* [Toggles] */
// snap gridz height to nearest 7mm increment
enable_zsnap = false;
// how should the top lip act
style_lip = 0; //[0: Regular lip, 1:remove lip subtractively, 2: remove lip and retain height]
/* [Other] */
// How "gridz" is used to calculate height. Some exclude 7mm/1U base, others exclude ~3.5mm (4.4mm nominal) stacking lip.
gridz_define = 0; // [0:7mm increments - Excludes Stacking Lip, 1:Internal mm - Excludes Base & Stacking Lip, 2:External mm - Excludes Stacking Lip, 3:External mm]
// the type of tabs
style_tab = 1; //[0:Full,1:Auto,2:Left,3:Center,4:Right,5:None]
// which divisions have tabs
place_tab = 1; // [0:Everywhere-Normal,1:Top-Left Division]
/* [Base] */
// thickness of bottom layer
bottom_layer = 1;
/* [Base Hole Options] */
// only cut magnet/screw holes at the corners of the bin to save uneccesary print time
only_corners = false;
//Use gridfinity refined hole style. Not compatible with magnet_holes!
refined_holes = false;
// Base will have holes for 6mm Diameter x 2mm high magnets.
magnet_holes = true;
// Base will have holes for M3 screws.
screw_holes = true;
// Magnet holes will have crush ribs to hold the magnet.
crush_ribs = true;
// Magnet/Screw holes will have a chamfer to ease insertion.
chamfer_holes = true;
// Magnet/Screw holes will be printed so supports are not needed.
printable_hole_top = true;
hole_options = bundle_hole_options(refined_holes, magnet_holes, screw_holes, crush_ribs, chamfer_holes, printable_hole_top);
// ===== IMPLEMENTATION ===== //
binL = new_bin(
grid_size = [gridx, gridy],
height_mm = height(gridz, gridz_define, enable_zsnap),
include_lip = style_lip == 0,
hole_options = hole_options,
only_corners = only_corners || half_grid,
grid_dimensions = GRID_DIMENSIONS_MM / (half_grid ? 2 : 1),
base_thickness = bottom_layer
);
bin_render(binL){
bin_subdivide(binL, [divx, divy]) {
cut_compartment_auto(
cgs(),
style_tab,
place_tab != 0
);
}
}