add baseplate to UI

This commit is contained in:
Ruud Swinkels 2022-10-04 22:25:46 +02:00
parent 354705620e
commit 4e26896f5c

View file

@ -25,7 +25,16 @@ https://github.com/kennetek/gridfinity-rebuilt-openscad
$fa = 8;
$fs = 0.25;
/* [General Settings] */
/* [Objects to generate] */
// Generate a gridfinity bin
generate_bin = true;
// Generate a gridfinity baseplate
generate_baseplate = false;
/* [General Settings (All Objects)] */
// number of bases along x-axis
gridx = 2;
// number of bases along y-axis
@ -35,13 +44,20 @@ gridz = 6;
// base unit
length = 42;
/* [Compartments] */
/* [Base (All Objects)] */
style_hole = 1; // [0:no holes, 1:magnet holes only, 2: magnet and screw holes - no printable slit, 3: magnet and screw holes - printable slit, 4: magnet and countersunk screw holes - (baseplate only)]
// number of divisions per 1 unit of base along the X axis. (default 1, only use integers. 0 means automatically guess the right division)
div_base_x = 0;
// number of divisions per 1 unit of base along the Y axis. (default 1, only use integers. 0 means automatically guess the right division)
div_base_y = 0;
/* [Compartments (Bin)] */
// number of X Divisions
divx = 1;
// number of y Divisions
divy = 1;
/* [Toggles] */
/* [Toggles (Bin)] */
// internal fillet for easy part removal
enable_scoop = true;
// snap gridz height to nearest 7mm increment
@ -49,7 +65,7 @@ enable_zsnap = false;
// enable upper lip for stacking other bins
enable_lip = true;
/* [Other] */
/* [Other (Bin)] */
// determine what the variable "gridz" applies to based on your use case
gridz_define = 0; // [0:gridz is the height of bins in units of 7mm increments - Zack's method,1:gridz is the internal height in millimeters, 2:gridz is the overall external height of the bin in millimeters]
// the type of tabs
@ -58,24 +74,29 @@ style_tab = 1; //[0:Full,1:Auto,2:Left,3:Center,4:Right,5:None]
// overrides internal block height of bin (for solid containers). Leave zero for default height. Units: mm
height_internal = 0;
/* [Base] */
style_hole = 1; // [0:no holes, 1:magnet holes only, 2: magnet and screw holes - no printable slit, 3: magnet and screw holes - printable slit]
// number of divisions per 1 unit of base along the X axis. (default 1, only use integers. 0 means automatically guess the right division)
div_base_x = 0;
// number of divisions per 1 unit of base along the Y axis. (default 1, only use integers. 0 means automatically guess the right division)
div_base_y = 0;
/* [Base Plate (Baseplate)] */
weigthed = true;
bottom_cutout = true;
// ===== Commands ===== //
color("tomato") {
gridfinityInit(gridx, gridy, height(gridz, gridz_define, enable_lip, enable_zsnap), height_internal, length) {
//bin
if (generate_bin) {
gridfinityInit(gridx, gridy, height(gridz, gridz_define, enable_lip, enable_zsnap), height_internal, length) {
cutEqual(n_divx = divx, n_divy = divy, style_tab = style_tab, enable_scoop = enable_scoop);
cutEqual(n_divx = divx, n_divy = divy, style_tab = style_tab, enable_scoop = enable_scoop);
}
gridfinityBase(gridx, gridy, length, div_base_x, div_base_y, style_hole);
}
//baseplate
if (generate_baseplate) {
baseplate(gridx, gridy, length, div_base_x, div_base_y, style_hole, weigthed, bottom_cutout);
}
gridfinityBase(gridx, gridy, length, div_base_x, div_base_y, style_hole);
}