-
-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathgridfinity_basic_cup.scad
361 lines (343 loc) · 14.8 KB
/
gridfinity_basic_cup.scad
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
// Gridfinity extended basic cup
// version 2024-02-17
//
// Source
// https://www.printables.com/model/630057-gridfinity-extended-openscad
//
// Documentation
// https://docs.ostat.com/docs/openscad/gridfinity-extended/basic-cup.html
include <modules/gridfinity_constants.scad>
use <modules/module_gridfinity_cup.scad>
use <modules/module_gridfinity.scad>
/*<!!start gridfinity_basic_cup!!>*/
/* [General Cup] */
// X dimension. grid units (multiples of 42mm) or mm.
width = [2, 0]; //0.1
// Y dimension. grid units (multiples of 42mm) or mm.
depth = [1, 0]; //0.1
// Z dimension excluding. grid units (multiples of 7mm) or mm.
height = [3, 0]; //0.1
// Fill in solid block (overrides all following options)
filled_in = "disabled"; //[disabled, enabled, enabledfilllip:"Fill cup and lip"]
// Wall thickness of outer walls. default, height < 8 0.95, height < 16 1.2, height > 16 1.6 (Zack's design is 0.95 mm)
wall_thickness = 0; // .01
// Remove some or all of lip
lip_style = "normal"; // [ normal, reduced, minimum, none:not stackable ]
//under size the bin top by this amount to allow for better stacking
zClearance = 0; // 0.1
/* [Subdivisions] */
chamber_wall_thickness = 1.2;
//Reduce the wall height by this amount
chamber_wall_zClearance = 0;//0.1
// X dimension subdivisions
vertical_chambers = 1;
vertical_separator_bend_position = 0;
vertical_separator_bend_angle = 0;
vertical_separator_bend_separation = 0;
vertical_separator_cut_depth=0;
horizontal_chambers = 1;
horizontal_separator_bend_position = 0;
horizontal_separator_bend_angle = 0;
horizontal_separator_bend_separation = 0;
horizontal_separator_cut_depth=0;
// Enable irregular subdivisions
vertical_irregular_subdivisions = false;
// Separator positions are defined in terms of grid units from the left end
vertical_separator_config = "10.5|21|42|50|60";
// Enable irregular subdivisions
horizontal_irregular_subdivisions = false;
// Separator positions are defined in terms of grid units from the left end
horizontal_separator_config = "10.5|21|42|50|60";
/* [Base] */
// Enable magnets
enable_magnets = true;
// Enable screws
enable_screws = true;
//size of magnet, diameter and height. Zack's original used 6.5 and 2.4
magnet_size = [6.5, 2.4]; // .1
//create relief for magnet removal
magnet_easy_release = "auto";//["off","auto","inner","outer"]
//size of screw, diameter and height. Zack's original used 3 and 6
screw_size = [3, 6]; // .1
//size of center magnet, diameter and height.
center_magnet_size = [0,0];
// Sequential Bridging hole overhang remedy is active only when both screws and magnets are nonzero (and this option is selected)
hole_overhang_remedy = 2;
//Only add attachments (magnets and screw) to box corners (prints faster).
box_corner_attachments_only = true;
// Minimum thickness above cutouts in base (Zack's design is effectively 1.2)
floor_thickness = 0.7;
cavity_floor_radius = -1;// .1
// Efficient floor option saves material and time, but the internal floor is not flat
efficient_floor = "off";//[off,on,rounded,smooth]
// Enable to subdivide bottom pads to allow half-cell offsets
half_pitch = false;
// Removes the internal grid from base the shape
flat_base = "off"; // [off, gridfinity:gridfinity stackable, rounded]
// Remove floor to create a vertical spacer
spacer = false;
//Pads smaller than this will not be rendered as it interferes with the baseplate. Ensure appropriate support is added in slicer.
minimum_printable_pad_size = 0.2;
// Adjust the radius of the rounded flat base. -1 uses the corner radius.
flat_base_rounded_radius = -1;
// Add chamfer to the rounded bottom corner to make easier to print. -1 add auto 45deg.
flat_base_rounded_easyPrint = -1;
/* [Label] */
label_style = "normal"; //[disabled: no label, normal:normal, gflabel:gflabel basic label, pred:pred - labels by pred, cullenect:Cullenect click labels V2, cullenect_legacy:Cullenect click labels v1]
// Include overhang for labeling (and specify left/right/center justification)
label_position = "left"; // [left, right, center, leftchamber, rightchamber, centerchamber]
// Width, Depth, Height, Radius. Width in Gridfinity units of 42mm, Depth and Height in mm, radius in mm. Width of 0 uses full width. Height of 0 uses Depth, height of -1 uses depth*3/4.
label_size = [0,14,0,0.6]; // 0.01
// Size in mm of relief where appropriate. Width, depth, height, radius
label_relief = [0,0,0,0.6]; // 0.1
// wall to enable on, front, back, left, right. 0: disabled; 1: enabled;
label_walls=[0,1,0,0]; //[0:1:1]
/* [Sliding Lid] */
sliding_lid_enabled = false;
// 0 = wall thickness *2
sliding_lid_thickness = 0; //0.1
// 0 = wall_thickness/2
sliding_min_wallThickness = 0;//0.1
// 0 = default_sliding_lid_thickness/2
sliding_min_support = 0;//0.1
sliding_clearance = 0.1;//0.1
sliding_lid_lip_enabled = false;
/* [Finger Slide] */
// Include larger corner fillet
fingerslide = "none"; //[none, rounded, chamfered]
// Radius of the corner fillet
fingerslide_radius = 8;
// wall to enable on, front, back, left, right. 0: disabled; 1: enabled;
fingerslide_walls=[1,0,0,0]; //[0:1:1]
//Align the fingerslide with the lip
fingerslide_lip_aligned=true;
/* [Tapered Corner] */
tapered_corner = "none"; //[none, rounded, chamfered]
tapered_corner_size = 10;
// Set back of the tapered corner, default is the gridfinity corner radius
tapered_setback = -1;//gridfinity_corner_radius/2;
/* [Wall Pattern] */
// Grid wall patter
wallpattern_enabled=false;
// Style of the pattern
wallpattern_style = "gridrotated"; //[grid, gridrotated, hexgrid, hexgridrotated, voronoi, voronoigrid, voronoihexgrid, brick, brickrotated, brickoffset, brickoffsetrotated]
// Spacing between pattern
wallpattern_hole_spacing = 2; //0.1
// wall to enable on, front, back, left, right.
wallpattern_walls=[1,1,1,1]; //[0:1:1]
// Add the pattern to the dividers
wallpattern_dividers_enabled="disabled"; //[disabled, horizontal, vertical, both]
//Number of sides of the hole op
wallpattern_hole_sides = 6; //[4:square, 6:Hex, 64:circle]
//Size of the hole
wallpattern_hole_size = [5,5]; //0.1
//Radius of corners
wallpattern_hole_radius = 0.5;
// pattern fill mode
wallpattern_fill = "crop"; //[none, space, crop, crophorizontal, cropvertical, crophorizontal_spacevertical, cropvertical_spacehorizontal, spacevertical, spacehorizontal]
//voronoi: noise, brick: center weight, grid: taper
wallpattern_pattern_variable = 0.75;
//$fs for floor pattern, min size face.
wallpattern_pattern_quality = 0.4;//0.1:0.1:2
/* [Floor Pattern] */
// enable Grid floor patter
floorpattern_enabled=false;
// Style of the pattern
floorpattern_style = "gridrotated"; //[grid, gridrotated, hexgrid, hexgridrotated, voronoi, voronoigrid, voronoihexgrid, brick, brickrotated, brickoffset, brickoffsetrotated]
// Spacing between pattern
floorpattern_hole_spacing = 2; //0.1
//Number of sides of the hole op
floorpattern_hole_sides = 6; //[4:square, 6:Hex, 64:circle]
//Size of the hole
floorpattern_hole_size = [5,5]; //0.1
floorpattern_hole_radius = 0.5;
// pattern fill mode
floorpattern_fill = "crop"; //[none, space, crop, crophorizontal, cropvertical, crophorizontal_spacevertical, cropvertical_spacehorizontal, spacevertical, spacehorizontal]
//voronoi: noise, brick: center weight, grid: taper
floorpattern_pattern_variable = 0.75;
//$fs for floor pattern, min size face.
floorpattern_pattern_quality = 0.4;//0.1:0.1:2
/* [Wall Cutout] */
wallcutout_vertical ="disabled"; //[disabled, enabled, wallsonly, frontonly, backonly]
// wall to enable on, front, back, left, right. 0: disabled; Positive: GF units; Negative: ratio length/abs(value)
wallcutout_vertical_position=-2; //0.1
//default will be binwidth/2
wallcutout_vertical_width=0;
wallcutout_vertical_angle=70;
//default will be binHeight
wallcutout_vertical_height=0;
wallcutout_vertical_corner_radius=5;
wallcutout_horizontal ="disabled"; //[disabled, enabled, wallsonly, leftonly, rightonly]
// wall to enable on, front, back, left, right. 0: disabled; Positive: GF units; Negative: ratio length/abs(value)
wallcutout_horizontal_position=-2; //0.1
//default will be binwidth/2
wallcutout_horizontal_width=0;
wallcutout_horizontal_angle=70;
//default will be binHeight
wallcutout_horizontal_height=0;
wallcutout_horizontal_corner_radius=5;
/* [Extendable] */
extension_x_enabled = "disabled"; //[disabled, front, back]
extension_x_position = 0.5;
extension_y_enabled = "disabled"; //[disabled, front, back]
extension_y_position = 0.5;
extension_tabs_enabled = true;
//Tab size, height, width, thickness, style. width default is height, thickness default is 1.4, style {0,1,2}.
extension_tab_size= [10,0,0,0];
/* [Bottom Text] */
// Add bin size to bin bottom
text_1 = false;
// Font Size of text, in mm (0 will auto size)
text_size = 0; // 0.1
// Depth of text, in mm
text_depth = 0.3; // 0.01
// Font to use
text_font = "Aldo"; // [Aldo, B612, "Open Sans", Ubuntu]
// Add free-form text line to bin bottom (printing date, serial, etc)
text_2 = false;
// Actual text to add
text_2_text = "Gridfinity Extended";
/* [debug] */
//Slice along the x axis
cutx = 0; //0.1
//Slice along the y axis
cuty = 0; //0.1
// enable loging of help messages during render.
enable_help = "disabled"; //[info,debug,trace]
/* [Model detail] */
//assign colours to the bin, will may
set_colour = "enable"; //[disabled, enable, preview, lip]
//where to render the model
render_position = "center"; //[default,center,zero]
// minimum angle for a fragment (fragments = 360/fa). Low is more fragments
$fa = 6;
// minimum size of a fragment. Low is more fragments
$fs = 0.1;
// number of fragments, overrides $fa and $fs
$fn = 0;
// set random seed for
random_seed = 0; //0.0001
// force render on costly components
force_render = true;
/* [Hidden] */
module end_of_customizer_opts() {}
/*<!!end gridfinity_basic_cup!!>*/
SetGridfinityEnvironment(
width = width,
depth = depth,
height = height,
render_position = render_position,
help = enable_help,
cutx = cutx,
cuty = cuty,
cutz = calcDimensionHeight(height, true),
setColour = set_colour,
randomSeed = random_seed,
force_render = force_render)
gridfinity_cup(
width=width, depth=depth, height=height,
filled_in=filled_in,
label_settings=LabelSettings(
labelStyle=label_style,
labelPosition=label_position,
labelSize=label_size,
labelRelief=label_relief,
labelWalls=label_walls),
fingerslide=fingerslide,
fingerslide_radius=fingerslide_radius,
fingerslide_walls=fingerslide_walls,
fingerslide_lip_aligned=fingerslide_lip_aligned,
cupBase_settings = CupBaseSettings(
magnetSize = enable_magnets?magnet_size:[0,0],
magnetEasyRelease = magnet_easy_release,
centerMagnetSize = center_magnet_size,
screwSize = enable_screws?screw_size:[0,0],
holeOverhangRemedy = hole_overhang_remedy,
cornerAttachmentsOnly = box_corner_attachments_only,
floorThickness = floor_thickness,
cavityFloorRadius = cavity_floor_radius,
efficientFloor=efficient_floor,
halfPitch=half_pitch,
flatBase=flat_base,
spacer=spacer,
minimumPrintablePadSize=minimum_printable_pad_size,
flatBaseRoundedRadius = flat_base_rounded_radius,
flatBaseRoundedEasyPrint = flat_base_rounded_easyPrint),
wall_thickness=wall_thickness,
chamber_wall_thickness=chamber_wall_thickness,
chamber_wall_zClearance=chamber_wall_zClearance,
vertical_chambers = vertical_chambers,
vertical_separator_bend_position=vertical_separator_bend_position,
vertical_separator_bend_angle=vertical_separator_bend_angle,
vertical_separator_bend_separation=vertical_separator_bend_separation,
vertical_separator_cut_depth=vertical_separator_cut_depth,
vertical_irregular_subdivisions=vertical_irregular_subdivisions,
vertical_separator_config=vertical_separator_config,
horizontal_chambers=horizontal_chambers,
horizontal_separator_bend_position=horizontal_separator_bend_position,
horizontal_separator_bend_angle=horizontal_separator_bend_angle,
horizontal_separator_bend_separation=horizontal_separator_bend_separation,
horizontal_separator_cut_depth=horizontal_separator_cut_depth,
horizontal_irregular_subdivisions=horizontal_irregular_subdivisions,
horizontal_separator_config=horizontal_separator_config,
lip_style=lip_style,
zClearance=zClearance,
tapered_corner=tapered_corner,
tapered_corner_size = tapered_corner_size,
tapered_setback = tapered_setback,
wallpattern_walls=wallpattern_walls,
wallpattern_dividers_enabled=wallpattern_dividers_enabled,
wall_pattern_settings = PatternSettings(
patternEnabled = wallpattern_enabled,
patternStyle = wallpattern_style,
patternFill = wallpattern_fill,
patternBorder = wallpattern_hole_spacing,
patternHoleSize = wallpattern_hole_size,
patternHoleSides = wallpattern_hole_sides,
patternHoleSpacing = wallpattern_hole_spacing,
patternHoleRadius = wallpattern_hole_radius,
patternVariable = wallpattern_pattern_variable,
patternFs = wallpattern_pattern_quality),
floor_pattern_settings = PatternSettings(
patternEnabled = floorpattern_enabled,
patternStyle = floorpattern_style,
patternFill = floorpattern_fill,
patternBorder = floorpattern_hole_spacing,
patternHoleSize = floorpattern_hole_size,
patternHoleSides = floorpattern_hole_sides,
patternHoleSpacing = floorpattern_hole_spacing,
patternHoleRadius = floorpattern_hole_radius,
patternVariable = floorpattern_pattern_variable,
patternFs = floorpattern_pattern_quality),
wallcutout_vertical=wallcutout_vertical,
wallcutout_vertical_position=wallcutout_vertical_position,
wallcutout_vertical_width=wallcutout_vertical_width,
wallcutout_vertical_angle=wallcutout_vertical_angle,
wallcutout_vertical_height=wallcutout_vertical_height,
wallcutout_vertical_corner_radius=wallcutout_vertical_corner_radius,
wallcutout_horizontal=wallcutout_horizontal,
wallcutout_horizontal_position=wallcutout_horizontal_position,
wallcutout_horizontal_width=wallcutout_horizontal_width,
wallcutout_horizontal_angle=wallcutout_horizontal_angle,
wallcutout_horizontal_height=wallcutout_horizontal_height,
wallcutout_horizontal_corner_radius=wallcutout_horizontal_corner_radius,
extendable_Settings = ExtendableSettings(
extendablexEnabled = extension_x_enabled,
extendablexPosition = extension_x_position,
extendableyEnabled = extension_y_enabled,
extendableyPosition = extension_y_position,
extendableTabsEnabled = extension_tabs_enabled,
extendableTabSize = extension_tab_size),
sliding_lid_enabled = sliding_lid_enabled,
sliding_lid_thickness = sliding_lid_thickness,
sliding_min_wall_thickness = sliding_min_wallThickness,
sliding_min_support = sliding_min_support,
sliding_clearance = sliding_clearance,
sliding_lid_lip_enabled=sliding_lid_lip_enabled,
cupBaseTextSettings = CupBaseTextSettings(
baseTextLine1Enabled = text_1,
baseTextLine2Enabled = text_2,
baseTextLine2Value = text_2_text,
baseTextFontSize = text_size,
baseTextFont = text_font,
baseTextDepth = text_depth));