Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Box_Template.scad
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ show_lid=true; // Whether or not to render the lid. To make open boxes with no l
//has_coinslot=false; // Add slot in the top for dropping in components.
//has_snap=true; // Add small ridges or snaps to lids to help keep them closed.
//lid_type_1_enhanced_snaps=false; // Add enhanced snaps to lid types 1 and 4.
//lid_type_1_enhanced_snaps_protrusion_factor = 0.63; // Shift the enhanced snaps to the left or right. Higher values make it more lose, lower values make it tighter but risk the side-walls of the box breaking off. You probably want this to be between 0.55 and 0.67.
//coinslot_x=20; // Size in X direction
//coinslot_y=2.5; // Size in Y direction
//coinslot_corner_radius=0; // rounded coinslot corners if >0; best if less than half the shorter coinslot dimension
Expand Down
13 changes: 7 additions & 6 deletions Ultimate_Box_Generator.scad
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ has_thumbhole=true; // Add gripping locations for easy opening.
has_coinslot=false; // Add slot in the top for dropping in components.
has_snap=true; // Add small ridges or snaps to lids to help keep them closed.
lid_type_1_enhanced_snaps=false; // Add enhanced snaps to lid types 1 and 4.
lid_type_1_enhanced_snaps_protrusion_factor = 0.63; // Shift the enhanced snaps to the left or right. Higher values make it more lose, lower values make it tighter but risk the side-walls of the box breaking off. You probably want this to be between 0.55 and 0.67.
coinslot_x=20; // Size in X direction
coinslot_y=2.5; // Size in Y direction
coinslot_corner_radius=0; // rounded coinslot corners if >0; best if less than half the shorter coinslot dimension
Expand Down Expand Up @@ -480,8 +481,8 @@ module make_box() {
translate ([0,wall/2,totalheight-z_tolerance])
cube ([box_x-wall/2, box_y-wall,z_tolerance],center=false);
if(lid_type_1_enhanced_snaps) {
translate([wall * 1.5, wall, totalheight + wall/2]) sphere(wall/2, $fn=lid_fn);
translate([wall * 1.5, box_y - wall, totalheight + wall/2]) sphere(wall/2, $fn=lid_fn);
translate([wall * 1.5, wall * (0.5 + lid_type_1_enhanced_snaps_protrusion_factor), totalheight + wall/2]) sphere(wall/2, $fn=lid_fn);
translate([wall * 1.5, box_y - wall * (0.5 + lid_type_1_enhanced_snaps_protrusion_factor), totalheight + wall/2]) sphere(wall/2, $fn=lid_fn);
}
}

Expand Down Expand Up @@ -532,8 +533,8 @@ module make_box() {
//Snaps
if(has_snap) {
if (lid_type_1_enhanced_snaps) {
translate([wall * 1.5, wall/2, wall/2]) sphere(wall/2, $fn=lid_fn);
translate([wall * 1.5, wall/2 + comp_size_y, wall/2]) sphere(wall/2, $fn=lid_fn);
translate([wall * 1.5, wall * lid_type_1_enhanced_snaps_protrusion_factor, wall/2]) sphere(wall/2, $fn=lid_fn);
translate([wall * 1.5, box_y - 2*tolerance - wall - wall * lid_type_1_enhanced_snaps_protrusion_factor, wall/2]) sphere(wall/2, $fn=lid_fn);
} else {
polyhedron([
[0, -snap_inset, 0],
Expand Down Expand Up @@ -848,8 +849,8 @@ module make_lid() {
//Snaps
if(has_snap) {
if (lid_type_1_enhanced_snaps) {
translate([wall * 1.5, wall/2, wall/2]) sphere(wall/2, $fn=lid_fn);
translate([wall * 1.5, wall/2 + comp_size_y, wall/2]) sphere(wall/2, $fn=lid_fn);
translate([wall * 1.5, wall * lid_type_1_enhanced_snaps_protrusion_factor, wall/2]) sphere(wall/2, $fn=lid_fn);
translate([wall * 1.5, box_y - 2*tolerance - wall - wall * lid_type_1_enhanced_snaps_protrusion_factor, wall/2]) sphere(wall/2, $fn=lid_fn);
} else {
polyhedron([
[0, -snap_inset, 0],
Expand Down