Moved baseplates to seperate file

This commit is contained in:
Ruud Swinkels 2022-10-11 10:09:58 +02:00
parent 4e26896f5c
commit 0ec8fff90a
2 changed files with 59 additions and 34 deletions

View file

@ -0,0 +1,46 @@
include <gridfinity-rebuilt-utility.scad>
// ===== Info ===== //
/*
IMPORTANT: rendering will be better for analyzing the model if fast-csg is enabled. As of writing, this feature is only available in the development builds and not the official release of OpenSCAD, but it makes rendering only take a couple seconds, even for comically large bins. Enable it in Edit > Preferences > Features > fast-csg
https://github.com/kennetek/gridfinity-rebuilt-openscad
*/
/* [Setup Parameters] */
$fa = 8;
$fs = 0.25;
/* [General Settings] */
// number of bases along x-axis
gridx = 2;
// number of bases along y-axis
gridy = 2;
// bin height. See bin height information and "gridz_define" below.
gridz = 6;
// base unit
length = 42;
/* [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, 4: magnet and countersunk screw holes]
// 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;
/* [Togglles] */
// weigthed baseplate with possibility for magnet / screw holes
weigthed = true;
// cutout in the bottom for weigthed baseplate only
bottom_cutout = true;
// ===== Commands ===== //
color("tomato") {
baseplate(gridx, gridy, length, div_base_x, div_base_y, style_hole, weigthed, bottom_cutout);
}

View file

@ -25,16 +25,7 @@ https://github.com/kennetek/gridfinity-rebuilt-openscad
$fa = 8;
$fs = 0.25;
/* [Objects to generate] */
// Generate a gridfinity bin
generate_bin = true;
// Generate a gridfinity baseplate
generate_baseplate = false;
/* [General Settings (All Objects)] */
/* [General Settings] */
// number of bases along x-axis
gridx = 2;
// number of bases along y-axis
@ -44,20 +35,13 @@ gridz = 6;
// base unit
length = 42;
/* [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)] */
/* [Compartments] */
// number of X Divisions
divx = 1;
// number of y Divisions
divy = 1;
/* [Toggles (Bin)] */
/* [Toggles] */
// internal fillet for easy part removal
enable_scoop = true;
// snap gridz height to nearest 7mm increment
@ -65,7 +49,7 @@ enable_zsnap = false;
// enable upper lip for stacking other bins
enable_lip = true;
/* [Other (Bin)] */
/* [Other] */
// 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
@ -74,29 +58,24 @@ 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 Plate (Baseplate)] */
/* [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;
weigthed = true;
bottom_cutout = true;
// ===== Commands ===== //
color("tomato") {
//bin
if (generate_bin) {
gridfinityInit(gridx, gridy, height(gridz, gridz_define, enable_lip, enable_zsnap), height_internal, length) {
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);
}
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);
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);
}