more work on folded cases, added paper_full-top case
This commit is contained in:
@@ -20,184 +20,276 @@
|
||||
DESCRIPTION: creates folded case flat blank for supported designs
|
||||
TODO: none
|
||||
|
||||
USAGE: case_folded(case_design)
|
||||
USAGE: case_folded(case_design, case_style)
|
||||
|
||||
*/
|
||||
|
||||
module case_folded(case_design) {
|
||||
module case_folded(case_design, case_style) {
|
||||
|
||||
section_position = 2;
|
||||
ba = 1;
|
||||
slit_len = pcb_depth < pcb_width ? pcb_depth/10 : pcb_width/10;
|
||||
slit_width = .25;
|
||||
slit_offset = pcb_depth < pcb_width ? pcb_depth/10 : pcb_width/10;
|
||||
flap_y = 12;
|
||||
section_position = 2;
|
||||
ba = bend_allowance;
|
||||
slit_len = pcb_depth < pcb_width ? pcb_depth/10 : pcb_width/10;
|
||||
slit_width = .25;
|
||||
slit_offset = pcb_depth < pcb_width ? pcb_depth/10 : pcb_width/10;
|
||||
fold_height = pcb_tmaxz+bottom_clearence+pcb_z+ba;
|
||||
flap_y = 12;
|
||||
tab_x = pcb_depth/4;
|
||||
tab_y = fold_height/2;
|
||||
tab_inset = 6;
|
||||
|
||||
if(case_design == "paper_split-top") {
|
||||
// projection(cut = true) {
|
||||
if(case_style == "split-top") {
|
||||
projection(cut = true) {
|
||||
// rear
|
||||
difference() {
|
||||
union() {
|
||||
translate([0, -pcb_tmaxz-case_offset_bz-pcb_z-pcb_bmaxz-ba, 0])
|
||||
cube([pcb_width, pcb_tmaxz+pcb_bmaxz+case_offset_bz+pcb_z+ba, .1]);
|
||||
translate([0, -pcb_tmaxz-case_offset_bz-pcb_z-pcb_bmaxz-ba-(pcb_depth/2), 0])
|
||||
cube([pcb_width, pcb_depth/2, .1]);
|
||||
}
|
||||
// folding slits
|
||||
translate([slit_offset, -pcb_tmaxz-case_offset_bz-pcb_z-pcb_bmaxz-ba, -adj])
|
||||
cube([slit_len, slit_width, .2]);
|
||||
translate([pcb_width/2-slit_len/2, -pcb_tmaxz-case_offset_bz-pcb_z-pcb_bmaxz-ba, -adj])
|
||||
cube([slit_len, slit_width, .2]);
|
||||
translate([pcb_width-slit_offset-slit_len, -pcb_tmaxz-case_offset_bz-pcb_z-pcb_bmaxz-ba, -adj])
|
||||
cube([slit_len, slit_width, .2]);
|
||||
folded_base(fold_height, ba, flap_y, tab_x, tab_y, tab_inset, slit_len, slit_width, slit_offset);
|
||||
translate([0, -fold_height-(pcb_depth/2)-ba, 0])
|
||||
cube([pcb_width, (pcb_depth/2)+ba, material_thickness]);
|
||||
translate([0, pcb_depth+fold_height, 0])
|
||||
cube([pcb_width, (pcb_depth/2)+ba, material_thickness]);
|
||||
|
||||
translate([0, -pcb_tmaxz-case_offset_bz-pcb_z-pcb_bmaxz-ba, pcb_tmaxz+2]) rotate([180, 0, 0])
|
||||
// flaps rear left
|
||||
translate([-tab_y, -fold_height+tab_inset-(pcb_depth/2), 0])
|
||||
slab_r([tab_y, tab_x, material_thickness], [tab_x/2,tab_x/2,.1,.1]);
|
||||
|
||||
// flaps rear right
|
||||
translate([pcb_width, -fold_height-(pcb_depth/2)+tab_inset, 0])
|
||||
slab_r([tab_y, tab_x, material_thickness], [.1,.1,tab_x/2,tab_x/2]);
|
||||
|
||||
// flaps front left
|
||||
translate([-tab_y, pcb_depth+fold_height-tab_inset+tab_x, 0])
|
||||
slab_r([tab_y, tab_x, material_thickness], [tab_x/2,tab_x/2,.1,.1]);
|
||||
|
||||
// flaps front right
|
||||
translate([pcb_width, pcb_depth+fold_height-tab_inset+tab_x, 0])
|
||||
slab_r([tab_y, tab_x, material_thickness], [.1,.1,tab_x/2,tab_x/2]);
|
||||
|
||||
// flaps left rear
|
||||
difference() {
|
||||
translate([-(fold_height), 0, 0])
|
||||
linear_extrude(material_thickness) polygon([[0, 0],
|
||||
[1, (-pcb_depth/4)],
|
||||
[(fold_height)-2, (-pcb_depth/4)],
|
||||
[(fold_height), 0],
|
||||
[0, 0]]);
|
||||
translate([-bottom_clearence, 0, section_position]) rotate([90, 0, 270])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// flaps left front
|
||||
difference() {
|
||||
translate([-(fold_height), pcb_depth, 0])
|
||||
linear_extrude(material_thickness) polygon([[0, 0],
|
||||
[1, (pcb_depth/4)],
|
||||
[(fold_height)-2, (pcb_depth/4)],
|
||||
[(fold_height), 0],
|
||||
[0, 0]]);
|
||||
translate([-bottom_clearence, pcb_depth, pcb_depth+section_position]) rotate([-90, 0, 90])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// flaps right rear
|
||||
difference() {
|
||||
translate([pcb_width, 0, 0])
|
||||
linear_extrude(material_thickness) polygon([[0, 0],
|
||||
[2, (-pcb_depth/4)],
|
||||
[(fold_height)-1, (-pcb_depth/4)],
|
||||
[(fold_height), 0],
|
||||
[0, 0]]);
|
||||
translate([bottom_clearence+pcb_width, -pcb_width, section_position]) rotate([90, 0, 90])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
|
||||
// flaps right front
|
||||
difference() {
|
||||
translate([pcb_width, pcb_depth, 0])
|
||||
linear_extrude(material_thickness) polygon([[0, 0],
|
||||
[2, (pcb_depth/4)],
|
||||
[(fold_height)-1, (pcb_depth/4)],
|
||||
[(fold_height), 0],
|
||||
[0, 0]]);
|
||||
translate([bottom_clearence+pcb_width, pcb_width+pcb_depth, section_position+pcb_depth])
|
||||
rotate([270, 0, 270]) sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
}
|
||||
|
||||
translate([0, -fold_height, pcb_tmaxz+2]) 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])
|
||||
sbc(sbc_model, cooling, 0, "disable", "disable", true);
|
||||
|
||||
translate([0, -pcb_bmaxz-case_offset_bz, section_position]) rotate([90, 0, 0])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// left side
|
||||
difference() {
|
||||
union() {
|
||||
translate([-pcb_tmaxz-case_offset_bz-pcb_z-pcb_bmaxz-ba, 0, 0])
|
||||
cube([pcb_tmaxz+pcb_bmaxz+case_offset_bz+pcb_z+ba, pcb_depth, .1]);
|
||||
translate([-pcb_tmaxz-case_offset_bz-pcb_z-pcb_bmaxz-ba-flap_y, 0, 0])
|
||||
cube([flap_y, pcb_depth, .1]);
|
||||
}
|
||||
// folding slits
|
||||
translate([-pcb_tmaxz-case_offset_bz-pcb_z-pcb_bmaxz-ba, (pcb_depth/2)+4, -adj])
|
||||
cube([slit_width, flap_y, .2]);
|
||||
|
||||
translate([-pcb_tmaxz-case_offset_bz-pcb_z-pcb_bmaxz-ba, (pcb_depth/2)-flap_y-4, -adj])
|
||||
cube([slit_width, flap_y, .2]);
|
||||
|
||||
translate([-pcb_bmaxz-case_offset_bz, 0, section_position]) rotate([0, -90, 0])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
|
||||
}
|
||||
// front
|
||||
difference() {
|
||||
union() {
|
||||
translate([0, pcb_depth, 0]) cube([pcb_width, pcb_tmaxz+pcb_bmaxz+case_offset_bz+pcb_z+ba, .1]);
|
||||
translate([0, pcb_depth+pcb_tmaxz+pcb_bmaxz+case_offset_bz+pcb_z+ba, 0]) cube([pcb_width, pcb_depth/2, .1]);
|
||||
}
|
||||
// folding slits
|
||||
translate([slit_offset, pcb_depth+pcb_tmaxz+case_offset_bz+pcb_z+pcb_bmaxz+ba, -adj])
|
||||
cube([slit_len, slit_width, .2]);
|
||||
translate([pcb_width/2-slit_len/2, pcb_depth+pcb_tmaxz+case_offset_bz+pcb_z+pcb_bmaxz+ba, -adj])
|
||||
cube([slit_len, slit_width, .2]);
|
||||
translate([pcb_width-slit_offset-slit_len, pcb_depth+pcb_tmaxz+case_offset_bz+pcb_z+pcb_bmaxz+ba, -adj])
|
||||
cube([slit_len, slit_width, .2]);
|
||||
|
||||
translate([0, 2*pcb_depth+pcb_tmaxz+pcb_bmaxz+case_offset_bz+pcb_z+ba, pcb_tmaxz+2]) rotate([180, 0, 0])
|
||||
sbc(sbc_model, cooling, 0, "disable", "disable", true);
|
||||
|
||||
translate([0, pcb_depth+case_offset_bz+pcb_bmaxz, pcb_depth+section_position]) rotate([-90, 0, 0])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// right side
|
||||
difference() {
|
||||
union() {
|
||||
translate([pcb_width, 0, 0]) cube([pcb_tmaxz+pcb_bmaxz+case_offset_bz+pcb_z+ba, pcb_depth, .1]);
|
||||
translate([pcb_width+pcb_tmaxz+case_offset_bz+pcb_z+pcb_bmaxz+ba, 0, 0])
|
||||
cube([flap_y, pcb_depth, .1]);
|
||||
}
|
||||
// folding slits
|
||||
translate([pcb_width+pcb_tmaxz+case_offset_bz+pcb_z+pcb_bmaxz+ba, (pcb_depth/2)+4, -adj])
|
||||
cube([slit_width, flap_y, .2]);
|
||||
translate([pcb_width+pcb_tmaxz+case_offset_bz+pcb_z+pcb_bmaxz+ba, (pcb_depth/2)-flap_y-4, -adj])
|
||||
cube([slit_width, flap_y, .2]);
|
||||
|
||||
translate([pcb_width+pcb_bmaxz+case_offset_bz, 0, pcb_width+section_position]) rotate([0, 90, 0])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// pcb section
|
||||
difference() {
|
||||
cube([pcb_width, pcb_depth, .1]);
|
||||
translate([0, 0, 1]) sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
// pcb folding slits rear
|
||||
translate([slit_offset, 0, -adj]) cube([slit_len, slit_width, .2]);
|
||||
translate([pcb_width/2-slit_len/2, 0, -adj]) cube([slit_len, slit_width, .2]);
|
||||
translate([pcb_width-slit_offset-slit_len, 0, -adj]) cube([slit_len, slit_width, .2]);
|
||||
|
||||
// pcb folding slits left
|
||||
translate([0, slit_offset, -adj]) cube([slit_width, slit_len, .2]);
|
||||
translate([0, pcb_depth/2-slit_len/2, -adj]) cube([slit_width, slit_len, .2]);
|
||||
translate([0, pcb_depth-slit_offset-slit_len, -adj]) cube([slit_width, slit_len, .2]);
|
||||
|
||||
// pcb folding slits front
|
||||
translate([slit_offset, pcb_depth-slit_width, -adj]) cube([slit_len, slit_width, .2]);
|
||||
translate([pcb_width/2-slit_len/2, pcb_depth-slit_width, -adj]) cube([slit_len, slit_width, .2]);
|
||||
translate([pcb_width-slit_offset-slit_len, pcb_depth-slit_width, -adj]) cube([slit_len, slit_width, .2]);
|
||||
|
||||
// pcb folding slits right
|
||||
translate([pcb_width-slit_width, slit_offset, -adj]) cube([slit_width, slit_len, .2]);
|
||||
translate([pcb_width-slit_width, pcb_depth/2-slit_len/2, -adj]) cube([slit_width, slit_len, .2]);
|
||||
translate([pcb_width-slit_width, pcb_depth-slit_offset-slit_len, -adj]) cube([slit_width, slit_len, .2]);
|
||||
}
|
||||
// flaps rear left
|
||||
translate([(-pcb_tmaxz-case_offset_bz-pcb_z-pcb_bmaxz-ba)/2, -pcb_tmaxz-case_offset_bz-pcb_z-pcb_bmaxz-ba+4-(pcb_depth/2), 0])
|
||||
cube([(pcb_tmaxz+pcb_bmaxz+case_offset_bz+pcb_z+ba)/2, pcb_depth/4, .1]);
|
||||
|
||||
// flaps rear right
|
||||
translate([pcb_width, -pcb_tmaxz-case_offset_bz-pcb_z-pcb_bmaxz-ba-(pcb_depth/2)+4, 0])
|
||||
cube([(pcb_tmaxz+pcb_bmaxz+case_offset_bz+pcb_z+ba)/2, pcb_depth/4, .1]);
|
||||
|
||||
// flaps front left
|
||||
translate([(-pcb_tmaxz-case_offset_bz-pcb_z-pcb_bmaxz-ba)/2,
|
||||
pcb_depth+pcb_tmaxz+case_offset_bz+pcb_z+pcb_bmaxz+ba-4+pcb_depth/4, 0])
|
||||
cube([(pcb_tmaxz+pcb_bmaxz+case_offset_bz+pcb_z+ba)/2, pcb_depth/4, .1]);
|
||||
|
||||
// flaps front right
|
||||
translate([pcb_width, pcb_depth+pcb_tmaxz+case_offset_bz+pcb_z+pcb_bmaxz+ba-4+pcb_depth/4, 0])
|
||||
cube([(pcb_tmaxz+pcb_bmaxz+case_offset_bz+pcb_z+ba)/2, pcb_depth/4, .1]);
|
||||
|
||||
// flaps left rear
|
||||
difference() {
|
||||
translate([-(pcb_tmaxz+pcb_bmaxz+case_offset_bz+pcb_z+ba), 0, 0])
|
||||
linear_extrude(.1) polygon([[0, 0],
|
||||
[1, (-pcb_depth/4)],
|
||||
[(pcb_tmaxz+pcb_bmaxz+case_offset_bz+pcb_z+ba)-2, (-pcb_depth/4)],
|
||||
[(pcb_tmaxz+pcb_bmaxz+case_offset_bz+pcb_z+ba), 0],
|
||||
[0, 0]]);
|
||||
translate([-pcb_bmaxz-case_offset_bz, 0, section_position]) rotate([90, 0, 270])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// flaps left front
|
||||
difference() {
|
||||
translate([-(pcb_tmaxz+pcb_bmaxz+case_offset_bz+pcb_z+ba), pcb_depth, 0])
|
||||
linear_extrude(.1) polygon([[0, 0],
|
||||
[1, (pcb_depth/4)],
|
||||
[(pcb_tmaxz+pcb_bmaxz+case_offset_bz+pcb_z+ba)-2, (pcb_depth/4)],
|
||||
[(pcb_tmaxz+pcb_bmaxz+case_offset_bz+pcb_z+ba), 0],
|
||||
[0, 0]]);
|
||||
translate([-pcb_bmaxz-case_offset_bz, pcb_depth, pcb_depth+section_position]) rotate([-90, 0, 90])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// flaps right rear
|
||||
difference() {
|
||||
translate([pcb_width, 0, 0])
|
||||
linear_extrude(.1) polygon([[0, 0],
|
||||
[2, (-pcb_depth/4)],
|
||||
[(pcb_tmaxz+pcb_bmaxz+case_offset_bz+pcb_z+ba)-1, (-pcb_depth/4)],
|
||||
[(pcb_tmaxz+pcb_bmaxz+case_offset_bz+pcb_z+ba), 0],
|
||||
[0, 0]]);
|
||||
translate([pcb_bmaxz+case_offset_bz+pcb_width, -pcb_width, section_position]) rotate([90, 0, 90])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
|
||||
// flaps right front
|
||||
difference() {
|
||||
translate([pcb_width, pcb_depth, 0])
|
||||
linear_extrude(.1) polygon([[0, 0],
|
||||
[2, (pcb_depth/4)],
|
||||
[(pcb_tmaxz+pcb_bmaxz+case_offset_bz+pcb_z+ba)-1, (pcb_depth/4)],
|
||||
[(pcb_tmaxz+pcb_bmaxz+case_offset_bz+pcb_z+ba), 0],
|
||||
[0, 0]]);
|
||||
translate([pcb_bmaxz+case_offset_bz+pcb_width, pcb_width+pcb_depth, section_position+pcb_depth])
|
||||
rotate([270, 0, 270]) sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
if(case_style == "full-top") {
|
||||
projection(cut = true) {
|
||||
// rear
|
||||
difference() {
|
||||
union() {
|
||||
folded_base(fold_height, ba, flap_y, tab_x, tab_y, tab_inset, slit_len, slit_width, slit_offset);
|
||||
translate([0, -fold_height-pcb_depth-ba, 0])
|
||||
cube([pcb_width, pcb_depth+ba, material_thickness]);
|
||||
translate([0, pcb_depth+fold_height, 0])
|
||||
cube([pcb_width, (pcb_depth/4)+ba, material_thickness]);
|
||||
|
||||
// flaps rear left
|
||||
translate([tab_inset, -fold_height-pcb_depth-tab_y, 0])
|
||||
slab_r([tab_x, tab_y, material_thickness], [tab_x/2,.1,.1,tab_x/2]);
|
||||
|
||||
// flaps rear right
|
||||
translate([pcb_width-tab_x-tab_inset, -fold_height-pcb_depth-tab_y, 0])
|
||||
slab_r([tab_x, tab_y, material_thickness], [tab_x/2,.1,.1,tab_x/2]);
|
||||
|
||||
// flaps left rear
|
||||
difference() {
|
||||
translate([-(fold_height), 0, 0])
|
||||
linear_extrude(material_thickness) polygon([[0, 0],
|
||||
[1, (-pcb_depth/4)],
|
||||
[(fold_height)-2, (-pcb_depth/4)],
|
||||
[(fold_height), 0],
|
||||
[0, 0]]);
|
||||
translate([-bottom_clearence, 0, section_position]) rotate([90, 0, 270])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// flaps left front
|
||||
difference() {
|
||||
translate([-(fold_height), pcb_depth, 0])
|
||||
linear_extrude(material_thickness) polygon([[0, 0],
|
||||
[1, (pcb_depth/4)],
|
||||
[(fold_height)-2, (pcb_depth/4)],
|
||||
[(fold_height), 0],
|
||||
[0, 0]]);
|
||||
translate([-bottom_clearence, pcb_depth, pcb_depth+section_position]) rotate([-90, 0, 90])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// flaps right rear
|
||||
difference() {
|
||||
translate([pcb_width, 0, 0])
|
||||
linear_extrude(material_thickness) polygon([[0, 0],
|
||||
[2, (-pcb_depth/4)],
|
||||
[(fold_height)-1, (-pcb_depth/4)],
|
||||
[(fold_height), 0],
|
||||
[0, 0]]);
|
||||
translate([bottom_clearence+pcb_width, -pcb_width, section_position]) rotate([90, 0, 90])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
|
||||
// flaps right front
|
||||
difference() {
|
||||
translate([pcb_width, pcb_depth, 0])
|
||||
linear_extrude(material_thickness) polygon([[0, 0],
|
||||
[2, (pcb_depth/4)],
|
||||
[(fold_height)-1, (pcb_depth/4)],
|
||||
[(fold_height), 0],
|
||||
[0, 0]]);
|
||||
translate([bottom_clearence+pcb_width, pcb_width+pcb_depth, section_position+pcb_depth])
|
||||
rotate([270, 0, 270]) sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
}
|
||||
// top closure tab slits
|
||||
translate([tab_inset, pcb_depth+fold_height, 0]) cube([tab_x, slit_width, material_thickness+(2*adj)]);
|
||||
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])
|
||||
sbc(sbc_model, cooling, 0, "disable", "disable", true);
|
||||
translate([0, 2*pcb_depth+fold_height, pcb_tmaxz+2]) rotate([180, 0, 0])
|
||||
sbc(sbc_model, cooling, 0, "disable", "disable", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// base folding case
|
||||
module folded_base(fold_height, ba, flap_y, tab_x, tab_y, tab_inset, slit_len, slit_width, slit_offset) {
|
||||
|
||||
section_position = 2;
|
||||
|
||||
// rear
|
||||
difference() {
|
||||
translate([0, -fold_height, 0]) cube([pcb_width, fold_height, material_thickness]);
|
||||
// folding slits
|
||||
translate([slit_offset, -fold_height, -adj])
|
||||
cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
translate([pcb_width/2-slit_len/2, -fold_height, -adj])
|
||||
cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
translate([pcb_width-slit_offset-slit_len, -fold_height, -adj])
|
||||
cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
|
||||
translate([0, -bottom_clearence, section_position]) rotate([90, 0, 0])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// left side
|
||||
difference() {
|
||||
union() {
|
||||
translate([-fold_height, 0, 0])
|
||||
cube([fold_height, pcb_depth, material_thickness]);
|
||||
translate([-fold_height-flap_y, 0, 0]) cube([flap_y, pcb_depth, material_thickness]);
|
||||
}
|
||||
// folding slits
|
||||
translate([-fold_height, (pcb_depth/2)+tab_inset, -adj])
|
||||
cube([slit_width, tab_x, material_thickness+(2*adj)]);
|
||||
|
||||
translate([-fold_height, (pcb_depth/2)-tab_x-tab_inset, -adj])
|
||||
cube([slit_width, tab_x, material_thickness+(2*adj)]);
|
||||
|
||||
translate([-bottom_clearence, 0, section_position]) rotate([0, -90, 0])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
|
||||
}
|
||||
// front
|
||||
difference() {
|
||||
translate([0, pcb_depth, 0]) cube([pcb_width, fold_height, material_thickness]);
|
||||
// folding slits
|
||||
translate([slit_offset, pcb_depth+fold_height, -adj])
|
||||
cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
translate([pcb_width/2-slit_len/2, pcb_depth+fold_height, -adj])
|
||||
cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
translate([pcb_width-slit_offset-slit_len, pcb_depth+fold_height, -adj])
|
||||
cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
|
||||
translate([0, pcb_depth+bottom_clearence, pcb_depth+section_position]) rotate([-90, 0, 0])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// right side
|
||||
difference() {
|
||||
union() {
|
||||
translate([pcb_width, 0, 0]) cube([fold_height, pcb_depth, material_thickness]);
|
||||
translate([pcb_width+fold_height, 0, 0])
|
||||
cube([flap_y, pcb_depth, material_thickness]);
|
||||
}
|
||||
// folding slits
|
||||
translate([pcb_width+fold_height, (pcb_depth/2)+tab_inset, -adj])
|
||||
cube([slit_width, tab_x, material_thickness+(2*adj)]);
|
||||
translate([pcb_width+fold_height, (pcb_depth/2)-tab_x-tab_inset, -adj])
|
||||
cube([slit_width, tab_x, material_thickness+(2*adj)]);
|
||||
|
||||
translate([pcb_width+bottom_clearence, 0, pcb_width+section_position]) rotate([0, 90, 0])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// pcb section
|
||||
difference() {
|
||||
cube([pcb_width, pcb_depth, material_thickness]);
|
||||
translate([0, 0, 1+material_thickness]) sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
// pcb folding slits rear
|
||||
translate([slit_offset, 0, -adj]) cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
translate([pcb_width/2-slit_len/2, 0, -adj]) cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
translate([pcb_width-slit_offset-slit_len, 0, -adj]) cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
|
||||
// pcb folding slits left
|
||||
translate([0, slit_offset, -adj]) cube([slit_width, slit_len, material_thickness+(2*adj)]);
|
||||
translate([0, pcb_depth/2-slit_len/2, -adj]) cube([slit_width, slit_len, material_thickness+(2*adj)]);
|
||||
translate([0, pcb_depth-slit_offset-slit_len, -adj]) cube([slit_width, slit_len, material_thickness+(2*adj)]);
|
||||
|
||||
// pcb folding slits front
|
||||
translate([slit_offset, pcb_depth-slit_width, -adj]) cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
translate([pcb_width/2-slit_len/2, pcb_depth-slit_width, -adj]) cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
translate([pcb_width-slit_offset-slit_len, pcb_depth-slit_width, -adj]) cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
|
||||
// pcb folding slits right
|
||||
translate([pcb_width-slit_width, slit_offset, -adj]) cube([slit_width, slit_len, material_thickness+(2*adj)]);
|
||||
translate([pcb_width-slit_width, pcb_depth/2-slit_len/2, -adj]) cube([slit_width, slit_len, material_thickness+(2*adj)]);
|
||||
translate([pcb_width-slit_width, pcb_depth-slit_offset-slit_len, -adj]) cube([slit_width, slit_len, material_thickness+(2*adj)]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user