refinement and fixes for folded cases with ui improvements
This commit is contained in:
@@ -17,11 +17,13 @@
|
||||
|
||||
|
||||
NAME: case_folded
|
||||
DESCRIPTION: creates folded case flat blank for supported designs
|
||||
DESCRIPTION: creates folded case flat blanks for supported designs
|
||||
TODO: none
|
||||
|
||||
USAGE: case_folded(case_design, case_style)
|
||||
|
||||
case_design = paper
|
||||
case_style = split-top, full-top
|
||||
*/
|
||||
|
||||
module case_folded(case_design, case_style) {
|
||||
@@ -29,7 +31,7 @@ module case_folded(case_design, case_style) {
|
||||
section_position = 2;
|
||||
ba = bend_allowance;
|
||||
slit_len = pcb_depth < pcb_width ? pcb_depth/10 : pcb_width/10;
|
||||
slit_width = .25;
|
||||
slit_width = material_thickness;
|
||||
slit_offset = pcb_depth < pcb_width ? pcb_depth/10 : pcb_width/10;
|
||||
fold_height = pcb_tmaxz+bottom_clearence+pcb_z+ba;
|
||||
flap_y = 12;
|
||||
@@ -38,7 +40,6 @@ tab_y = fold_height/2;
|
||||
tab_inset = 6;
|
||||
|
||||
if(case_style == "split-top") {
|
||||
projection(cut = true) {
|
||||
// rear
|
||||
difference() {
|
||||
union() {
|
||||
@@ -111,18 +112,16 @@ tab_inset = 6;
|
||||
}
|
||||
}
|
||||
|
||||
translate([0, -fold_height, pcb_tmaxz+2]) rotate([180, 0, 0])
|
||||
translate([0, -fold_height, pcb_tmaxz+2+material_thickness]) rotate([180, 0, 0])
|
||||
sbc(sbc_model, cooling, 0, "disable", "disable", true);
|
||||
translate([0, 2*pcb_depth+fold_height, pcb_tmaxz+2]) rotate([180, 0, 0])
|
||||
translate([0, 2*pcb_depth+fold_height, pcb_tmaxz+2+material_thickness]) rotate([180, 0, 0])
|
||||
sbc(sbc_model, cooling, 0, "disable", "disable", true);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
translate([0, -fold_height-(pcb_depth/2)-ba, 0]) cube([pcb_width, 2, material_thickness]);
|
||||
translate([0, pcb_depth+fold_height+(pcb_depth/2)-ba, 0]) cube([pcb_width, 2, material_thickness]);
|
||||
}
|
||||
|
||||
if(case_style == "full-top") {
|
||||
projection(cut = true) {
|
||||
if(case_style == "full-top" || case_style == "none") {
|
||||
// rear
|
||||
difference() {
|
||||
union() {
|
||||
@@ -191,13 +190,12 @@ tab_inset = 6;
|
||||
translate([pcb_width-tab_x-tab_inset, pcb_depth+fold_height, 0])
|
||||
cube([tab_x, slit_width, material_thickness+2*adj]);
|
||||
|
||||
translate([0, -fold_height, pcb_tmaxz+2]) rotate([180, 0, 0])
|
||||
translate([0, -fold_height, pcb_tmaxz+2+material_thickness]) rotate([180, 0, 0])
|
||||
sbc(sbc_model, cooling, 0, "disable", "disable", true);
|
||||
translate([0, 2*pcb_depth+fold_height, pcb_tmaxz+2]) rotate([180, 0, 0])
|
||||
translate([0, 2*pcb_depth+fold_height, pcb_tmaxz+2+material_thickness]) rotate([180, 0, 0])
|
||||
sbc(sbc_model, cooling, 0, "disable", "disable", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -242,11 +240,11 @@ section_position = 2;
|
||||
difference() {
|
||||
translate([0, pcb_depth, 0]) cube([pcb_width, fold_height, material_thickness]);
|
||||
// folding slits
|
||||
translate([slit_offset, pcb_depth+fold_height, -adj])
|
||||
translate([slit_offset, pcb_depth+fold_height-slit_width, -adj])
|
||||
cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
translate([pcb_width/2-slit_len/2, pcb_depth+fold_height, -adj])
|
||||
translate([pcb_width/2-slit_len/2, pcb_depth+fold_height-slit_width, -adj])
|
||||
cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
translate([pcb_width-slit_offset-slit_len, pcb_depth+fold_height, -adj])
|
||||
translate([pcb_width-slit_offset-slit_len, pcb_depth+fold_height-slit_width, -adj])
|
||||
cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
|
||||
translate([0, pcb_depth+bottom_clearence, pcb_depth+section_position]) rotate([-90, 0, 0])
|
||||
|
||||
@@ -125,7 +125,7 @@ bottom_ext_standoff = [5.75,5,3.6,10,4,1,0,0,0,4.5,5.1];
|
||||
|
||||
/* [Folding Case Adjustments] */
|
||||
//Material Thickness
|
||||
material_thickness = .5; //[.1:.1:3]
|
||||
material_thickness = .5; //[.1:.01:3]
|
||||
// Bend Allowance
|
||||
bend_allowance = 1; //[0:.01:5]
|
||||
// Bottom clearence
|
||||
@@ -257,6 +257,9 @@ if (view == "platter") {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(case_design == "paper") {
|
||||
case_folded(case_design, case_style);
|
||||
}
|
||||
if(case_design == "tray") {
|
||||
echo(width=width+2*sidethick,depth=depth,top=top_height,bottom=bottom_height);
|
||||
}
|
||||
@@ -535,6 +538,9 @@ if (view == "model") {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(case_design == "paper") {
|
||||
case_folded(case_design, case_style);
|
||||
}
|
||||
if(case_design == "tray") {
|
||||
echo(width=width+2*sidethick,depth=depth,top=top_height,bottom=bottom_height);
|
||||
}
|
||||
@@ -652,6 +658,6 @@ if (view == "part") {
|
||||
}
|
||||
if (view == "folded") {
|
||||
if(case_design == "paper") {
|
||||
case_folded(case_design, case_style);
|
||||
projection() case_folded(case_design, case_style);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user