Skip to content

Commit 7be69db

Browse files
authored
Thickness Fixes (+ 3.0 default) (#93)
This PR fixes a few issues relating to panel thickness: - Spool width now accounts for flap width. If the calculated spool width is smaller than the flap width, the enclosure width and front opening do not shrink further. This also comments out the legacyAssert for spool width which is no longer needed. - Flap notch height and depth are now static and reflect the die-cut flap dimensions. The flap height can be set back to auto with the flap_notch_height_auto flag. - Enclosure side bolts are now positioned properly for all thicknesses - The enclosure vertical inset (distance between top/bottom of front and top/bottom pieces) now has a minimum value to prevent the bolt heads and nut edges from extending past the bounds of the enclosure at thinner thicknesses - Sets the default thickness to 3.0, matching Ponoko's current MDF availability. Tentatively closes #76
1 parent 31d8335 commit 7be69db

File tree

2 files changed

+55
-42
lines changed

2 files changed

+55
-42
lines changed

3d/flap_dimensions.scad

+4
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,9 @@ flap_height = 43;
1919
flap_thickness = 30 / 1000 * 25.4; // 30 mil
2020
flap_corner_radius = 3.1; // 2.88-3.48mm (used just for display)
2121

22+
flap_notch_height_auto = false;
23+
flap_notch_height_default = 15;
24+
flap_notch_depth = 3.2;
25+
2226
flap_pin_width = 1.4;
2327

3d/splitflap.scad

+51-42
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ spool_horizontal_explosion = lookup(spool_explosion, [
6767
]);
6868

6969

70-
// Kerf based off http://blog.ponoko.com/2011/07/12/figuring-out-kerf-for-precision-parts/
71-
// It's better to underestimate (looser fit) than overestimate (no fit)
72-
kerf_width = 0.19 - 0.02;
70+
// Ponoko kerf values are 0.2 mm for MDF and acrylic (all thicknesses)
71+
// Remember: it's better to underestimate (looser fit) than overestimate (no fit)
72+
kerf_width = 0.2 - 0.02;
7373

74-
// MDF, .125in nominal
75-
// http://www.ponoko.com/make-and-sell/show-material/64-mdf-natural
76-
thickness = 3.2;
74+
// MDF, .120in nominal
75+
// https://www.ponoko.com/materials/mdf-fiberboard
76+
thickness = 3.0;
7777

7878
eps=.01;
7979

@@ -90,10 +90,12 @@ assembly_color4 = [.204, .161, .114]; //"34291D";
9090
flap_rendered_angle = 90;
9191

9292
// Amount of slop of the flap side to side between the 2 spools
93-
flap_width_slop = 0.1;
93+
flap_width_slop = 0.5;
9494

9595
// Amount of slop for the spool assembly side-to-side inside the enclosure
9696
spool_width_slop = 1;
97+
spool_tab_clearance = 0.10;
98+
spool_joint_clearance = 0.10;
9799

98100

99101
num_flaps = 40;
@@ -114,13 +116,13 @@ outer_exclusion_radius = flap_pitch_radius + flap_height + 2;
114116

115117
front_forward_offset = flap_pitch_radius + flap_thickness/2;
116118

117-
flap_notch = sqrt(spool_outer_radius*spool_outer_radius - flap_pitch_radius*flap_pitch_radius);
118-
flap_notch_depth = 3;
119+
flap_notch_height = (flap_notch_height_auto == true) ? sqrt(spool_outer_radius*spool_outer_radius - flap_pitch_radius*flap_pitch_radius) : flap_notch_height_default;
119120

121+
spool_width = flap_width - flap_notch_depth*2 + flap_width_slop + thickness*2; // spool width, outside face (spool to spool)
122+
spool_width_clearance = max(spool_width, flap_width + flap_width_slop); // width clearance for the spool, either for the spool itself or the flaps
120123

121-
spool_width = flap_width - flap_notch_depth*2 + flap_width_slop + thickness*2;
122-
legacyAssert(spool_width >= flap_width, "Flap is wider than spool!");
123-
spool_strut_tabs = 3;
124+
//legacyAssert(spool_width >= flap_width, "Flap is wider than spool!");
125+
spool_strut_num_joints = 3;
124126
spool_strut_tab_width=8;
125127
spool_strut_tab_width_narrow=6;
126128
spool_strut_tab_outset=8;
@@ -141,7 +143,7 @@ motor_slop_radius = 3;
141143

142144

143145
// Width measured from the outside of the walls
144-
enclosure_wall_to_wall_width = thickness + spool_width_slop/2 + spool_width + spool_width_slop/2 + max(28byj48_mount_bracket_height + m4_button_head_length, 4 + 28byj48_mount_bracket_height - spool_width_slop/2) + thickness;
146+
enclosure_wall_to_wall_width = thickness + spool_width_slop/2 + spool_width_clearance + spool_width_slop/2 + max(28byj48_mount_bracket_height + m4_button_head_length, 4 + 28byj48_mount_bracket_height - spool_width_slop/2) + thickness;
145147

146148
// Width of the front panel
147149
enclosure_width = enclosure_wall_to_wall_width + 28byj48_chassis_height + 28byj48_chassis_height_slop - thickness - 28byj48_mount_bracket_height;
@@ -151,10 +153,10 @@ front_window_overhang = 3;
151153
front_window_upper = front_window_upper_base - front_window_overhang;
152154
front_window_lower = sqrt(outer_exclusion_radius*outer_exclusion_radius - front_forward_offset*front_forward_offset);
153155
front_window_slop = 0;
154-
front_window_width = spool_width_slop + spool_width + front_window_slop;
156+
front_window_width = spool_width_slop + spool_width_clearance + front_window_slop;
155157
front_window_right_inset = thickness - front_window_slop/2;
156158
enclosure_vertical_margin = 10; // gap between top/bottom of flaps and top/bottom of enclosure
157-
enclosure_vertical_inset = thickness*1.5; // distance from top of sides to top of the top piece
159+
enclosure_vertical_inset = max(thickness*1.5, m4_nut_width_corners_padded/2); // distance from top of sides to top of the top piece
158160
enclosure_height_upper = exclusion_radius + enclosure_vertical_margin + thickness + enclosure_vertical_inset;
159161
enclosure_height_lower = flap_pitch_radius + flap_height + enclosure_vertical_margin + thickness + enclosure_vertical_inset;
160162
enclosure_height = enclosure_height_upper + enclosure_height_lower;
@@ -165,6 +167,8 @@ enclosure_length = front_forward_offset + 28byj48_mount_center_offset + m4_hole_
165167

166168

167169
// Enclosure tabs: front/back
170+
enclosure_tab_clearance = 0.10;
171+
168172
num_front_tabs = 2;
169173
front_tab_width = (enclosure_wall_to_wall_width - 2*thickness) / (num_front_tabs*2 - 1);
170174

@@ -187,6 +191,8 @@ connector_bracket_length_inner = side_tab_width * 2 - m4_button_head_diameter/2;
187191
connector_bracket_thickness = captive_nut_inset - thickness - 0.2;
188192
connector_bracket_width = enclosure_width - enclosure_wall_to_wall_width + thickness*2 + connector_bracket_thickness*2;
189193
connector_bracket_overlap = 4;
194+
connector_bracket_clearance = 0.10;
195+
connector_bracket_depth_clearance = 0.20;
190196

191197

192198
mounting_hole_inset = m4_button_head_diameter/2 + 2;
@@ -208,7 +214,7 @@ echo(front_window_height=front_window_lower+front_window_upper);
208214
echo(front_forward_offset=front_forward_offset);
209215
echo(flap_exclusion_radius=exclusion_radius);
210216
echo(flap_hole_radius=flap_hole_radius);
211-
echo(flap_notch=flap_notch);
217+
echo(flap_notch_height=flap_notch_height);
212218

213219

214220
module standard_m4_bolt(nut_distance=-1) {
@@ -248,7 +254,7 @@ module m4_captive_nut(bolt_length=m4_bolt_length) {
248254

249255
// ##### Struts for bracing spool #####
250256
module spool_strut_tab_hole(narrow) {
251-
square([thickness, narrow ? spool_strut_tab_width_narrow : spool_strut_tab_width], center=true);
257+
square([thickness + spool_tab_clearance, narrow ? spool_strut_tab_width_narrow + spool_tab_clearance : spool_strut_tab_width + spool_tab_clearance], center=true);
252258
}
253259
module spool_strut_tab_holes(narrow=false) {
254260
for (i=[0:3]) {
@@ -259,7 +265,7 @@ module spool_strut_tab_holes(narrow=false) {
259265
}
260266
}
261267
module spool_strut() {
262-
joint_tab_width = spool_strut_inner_length / spool_strut_tabs;
268+
joint_tab_width = spool_strut_inner_length / spool_strut_num_joints;
263269
linear_extrude(thickness, center=true) {
264270
union() {
265271
translate([0, -spool_strut_tab_width_narrow / 2]) {
@@ -272,15 +278,15 @@ module spool_strut() {
272278
difference() {
273279
square([spool_strut_inner_length, spool_strut_width]);
274280

275-
// subtract out tabs
281+
// subtract out joints
276282
union() {
277-
for (i = [0:2:spool_strut_tabs-1]) {
278-
translate([i*joint_tab_width, -eps])
279-
square([joint_tab_width, thickness+eps]);
283+
for (i = [0:2:spool_strut_num_joints-1]) {
284+
translate([i*joint_tab_width - spool_joint_clearance/2, -eps])
285+
square([joint_tab_width + spool_joint_clearance, thickness + spool_joint_clearance/2 + eps]);
280286
}
281-
for (i = [1:2:spool_strut_tabs-1]) {
282-
translate([i*joint_tab_width, spool_strut_width - thickness])
283-
square([joint_tab_width, thickness+eps]);
287+
for (i = [1:2:spool_strut_num_joints-1]) {
288+
translate([i*joint_tab_width, spool_strut_width - thickness - spool_joint_clearance/2])
289+
square([joint_tab_width, thickness + spool_joint_clearance + eps]);
284290
}
285291
}
286292
}
@@ -354,9 +360,9 @@ module flap_2d() {
354360
}
355361
}
356362
translate([-eps, flap_pin_width])
357-
square([eps + flap_notch_depth, flap_notch]);
363+
square([eps + flap_notch_depth, flap_notch_height]);
358364
translate([flap_width - flap_notch_depth, flap_pin_width])
359-
square([eps + flap_notch_depth, flap_notch]);
365+
square([eps + flap_notch_depth, flap_notch_height]);
360366
}
361367
}
362368

@@ -412,7 +418,7 @@ module motor_shaft() {
412418
module front_tabs_negative() {
413419
for (i = [0 : num_front_tabs-1]) {
414420
translate([thickness + (i*2+0.5) * front_tab_width, 0, 0])
415-
square([front_tab_width, thickness], center=true);
421+
square([front_tab_width + enclosure_tab_clearance, thickness + enclosure_tab_clearance], center=true);
416422
}
417423
for (i = [0 : num_front_tabs-2]) {
418424
translate([thickness + (i*2+1.5) * front_tab_width, 0, 0])
@@ -427,11 +433,11 @@ module connector_bracket() {
427433
translate([connector_bracket_thickness, -eps]) {
428434
square([connector_bracket_width - connector_bracket_thickness*2, connector_bracket_length_outer - connector_bracket_length_inner + eps]);
429435
}
430-
translate([connector_bracket_thickness, -eps]) {
431-
square([thickness, connector_bracket_length_outer - connector_bracket_overlap + eps]);
436+
translate([connector_bracket_thickness - connector_bracket_clearance/2, -eps]) {
437+
square([thickness + connector_bracket_clearance, connector_bracket_length_outer - connector_bracket_overlap + connector_bracket_depth_clearance + eps]);
432438
}
433-
translate([connector_bracket_width - connector_bracket_thickness - thickness, -eps]) {
434-
square([thickness, connector_bracket_length_outer - connector_bracket_overlap + eps]);
439+
translate([connector_bracket_width - connector_bracket_thickness - thickness - connector_bracket_clearance/2, -eps]) {
440+
square([thickness + connector_bracket_clearance, connector_bracket_length_outer - connector_bracket_overlap + connector_bracket_depth_clearance + eps]);
435441
}
436442
}
437443
}
@@ -484,8 +490,8 @@ module motor_mount() {
484490
module side_tabs_negative(hole_sizes=[], extend_last_tab=false) {
485491
for (i = [0 : len(hole_sizes)]) {
486492
length = (extend_last_tab && i == len(hole_sizes)) ? side_tab_width * side_tab_width_fraction + eps : side_tab_width * side_tab_width_fraction;
487-
translate([-thickness / 2, thickness + (i*2) * side_tab_width + side_tab_width * (1 - side_tab_width_fraction)/2, 0])
488-
square([thickness, length]);
493+
translate([0, thickness + (i*2) * side_tab_width + side_tab_width * (1 - side_tab_width_fraction)/2 + length/2, 0])
494+
square([thickness + enclosure_tab_clearance, length + enclosure_tab_clearance], center=true);
489495
}
490496
for (i = [0 : len(hole_sizes) - 1]) {
491497
hole_size = hole_sizes[i];
@@ -508,8 +514,8 @@ module backstop_bolt_slot(radius) {
508514

509515
module connector_bracket_side_holes() {
510516
// overlap slot
511-
translate([enclosure_vertical_inset - thickness, -connector_bracket_overlap]) {
512-
square([thickness, connector_bracket_overlap + eps]);
517+
translate([enclosure_vertical_inset - thickness - connector_bracket_clearance/2, -connector_bracket_overlap]) {
518+
square([thickness + connector_bracket_clearance, connector_bracket_overlap + eps]);
513519
}
514520
}
515521

@@ -792,14 +798,14 @@ module split_flap_3d(letter, include_connector) {
792798

793799
module positioned_left_bolts() {
794800
// Top
795-
translate([enclosure_wall_to_wall_width, front_forward_offset - side_tab_width * 2, enclosure_height_upper - enclosure_vertical_inset - thickness/2]) {
801+
translate([enclosure_wall_to_wall_width, front_forward_offset - (thickness + 1.5 * side_tab_width), enclosure_height_upper - enclosure_vertical_inset - thickness/2]) {
796802
rotate([0, -90, 0]) {
797803
standard_m4_bolt(nut_distance=captive_nut_inset);
798804
}
799805
}
800806

801807
// Bottom
802-
translate([enclosure_wall_to_wall_width, front_forward_offset - side_tab_width * 2, -enclosure_height_lower + enclosure_vertical_inset + thickness/2]) {
808+
translate([enclosure_wall_to_wall_width, front_forward_offset - (thickness + 1.5 * side_tab_width), -enclosure_height_lower + enclosure_vertical_inset + thickness/2]) {
803809
rotate([0, -90, 0]) {
804810
standard_m4_bolt(nut_distance=captive_nut_inset);
805811
}
@@ -808,14 +814,14 @@ module split_flap_3d(letter, include_connector) {
808814

809815
module positioned_right_bolts() {
810816
// Top
811-
translate([0, front_forward_offset - side_tab_width * 2, enclosure_height_upper - enclosure_vertical_inset - thickness/2]) {
817+
translate([0, front_forward_offset - (thickness + 1.5 * side_tab_width), enclosure_height_upper - enclosure_vertical_inset - thickness/2]) {
812818
rotate([0, 90, 0]) {
813819
standard_m4_bolt(nut_distance=captive_nut_inset);
814820
}
815821
}
816822

817823
// Bottom
818-
translate([0, front_forward_offset - side_tab_width * 2, -enclosure_height_lower + enclosure_vertical_inset + thickness/2]) {
824+
translate([0, front_forward_offset - (thickness + 1.5 * side_tab_width), -enclosure_height_lower + enclosure_vertical_inset + thickness/2]) {
819825
rotate([0, 90, 0]) {
820826
standard_m4_bolt(nut_distance=captive_nut_inset);
821827
}
@@ -911,7 +917,8 @@ module split_flap_3d(letter, include_connector) {
911917
}
912918
}
913919

914-
translate([-flap_notch_depth + thickness + flap_width_slop/2, 0, 0]) {
920+
flap_offset = thickness > flap_notch_depth ? -flap_notch_depth + thickness + flap_width_slop/2 : flap_width_slop/2;
921+
translate([flap_offset, 0, 0]) {
915922
// Collapsed flaps on the top
916923
for (i=[0:num_flaps/2 - 1]) {
917924
if (i == 0 || render_flaps == 2) {
@@ -944,8 +951,10 @@ module split_flap_3d(letter, include_connector) {
944951
}
945952
}
946953
}
954+
}
947955

948-
if(render_spool) {
956+
if(render_spool) {
957+
translate([(spool_width_clearance - spool_width + spool_width_slop) / 2 + thickness, 0, 0]) {
949958
spool_struts();
950959

951960
// motor spool

0 commit comments

Comments
 (0)