mirror of
https://github.com/kennetek/gridfinity-rebuilt-openscad.git
synced 2024-12-23 07:09:37 +00:00
Moved baseplates to seperate file
This commit is contained in:
parent
4e26896f5c
commit
0ec8fff90a
2 changed files with 59 additions and 34 deletions
46
gridfinity-rebuild-baseplate.scad
Normal file
46
gridfinity-rebuild-baseplate.scad
Normal 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);
|
||||||
|
|
||||||
|
}
|
|
@ -25,16 +25,7 @@ https://github.com/kennetek/gridfinity-rebuilt-openscad
|
||||||
$fa = 8;
|
$fa = 8;
|
||||||
$fs = 0.25;
|
$fs = 0.25;
|
||||||
|
|
||||||
/* [Objects to generate] */
|
/* [General Settings] */
|
||||||
|
|
||||||
// Generate a gridfinity bin
|
|
||||||
generate_bin = true;
|
|
||||||
|
|
||||||
// Generate a gridfinity baseplate
|
|
||||||
generate_baseplate = false;
|
|
||||||
|
|
||||||
|
|
||||||
/* [General Settings (All Objects)] */
|
|
||||||
// number of bases along x-axis
|
// number of bases along x-axis
|
||||||
gridx = 2;
|
gridx = 2;
|
||||||
// number of bases along y-axis
|
// number of bases along y-axis
|
||||||
|
@ -44,20 +35,13 @@ gridz = 6;
|
||||||
// base unit
|
// base unit
|
||||||
length = 42;
|
length = 42;
|
||||||
|
|
||||||
/* [Base (All Objects)] */
|
/* [Compartments] */
|
||||||
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
|
// number of X Divisions
|
||||||
divx = 1;
|
divx = 1;
|
||||||
// number of y Divisions
|
// number of y Divisions
|
||||||
divy = 1;
|
divy = 1;
|
||||||
|
|
||||||
/* [Toggles (Bin)] */
|
/* [Toggles] */
|
||||||
// internal fillet for easy part removal
|
// internal fillet for easy part removal
|
||||||
enable_scoop = true;
|
enable_scoop = true;
|
||||||
// snap gridz height to nearest 7mm increment
|
// snap gridz height to nearest 7mm increment
|
||||||
|
@ -65,7 +49,7 @@ enable_zsnap = false;
|
||||||
// enable upper lip for stacking other bins
|
// enable upper lip for stacking other bins
|
||||||
enable_lip = true;
|
enable_lip = true;
|
||||||
|
|
||||||
/* [Other (Bin)] */
|
/* [Other] */
|
||||||
// determine what the variable "gridz" applies to based on your use case
|
// 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]
|
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
|
// 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
|
// overrides internal block height of bin (for solid containers). Leave zero for default height. Units: mm
|
||||||
height_internal = 0;
|
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 ===== //
|
// ===== Commands ===== //
|
||||||
|
|
||||||
color("tomato") {
|
color("tomato") {
|
||||||
|
|
||||||
//bin
|
gridfinityInit(gridx, gridy, height(gridz, gridz_define, enable_lip, enable_zsnap), height_internal, length) {
|
||||||
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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue