fixed access_port and access_cover 180 rotation in portrait and landscape.
This commit is contained in:
@@ -46,7 +46,8 @@
|
|||||||
20221207 Version 2.0.3 added part view to facilitate individual part prints, updated sbc model framework,
|
20221207 Version 2.0.3 added part view to facilitate individual part prints, updated sbc model framework,
|
||||||
added n2l and m1 cases
|
added n2l and m1 cases
|
||||||
2023xxxx Version 2.0.x fixed standoff sidewall support misplacement on sbc move, fixed standoff auto
|
2023xxxx Version 2.0.x fixed standoff sidewall support misplacement on sbc move, fixed standoff auto
|
||||||
opening z height, fixed case top right side standoffs support
|
opening z height, fixed case top right side standoffs support,
|
||||||
|
fixed access_port and access_cover 180 rotation in portrait and landscape,
|
||||||
|
|
||||||
see https://github.com/hominoids/SBC_Case_Builder
|
see https://github.com/hominoids/SBC_Case_Builder
|
||||||
*/
|
*/
|
||||||
@@ -1221,10 +1222,35 @@ module case_bottom(case_design) {
|
|||||||
}
|
}
|
||||||
if ((class == "add1" || class == "add2") && face == "bottom" && type == "access_port") {
|
if ((class == "add1" || class == "add2") && face == "bottom" && type == "access_port") {
|
||||||
if(data_3 == "landscape") {
|
if(data_3 == "landscape") {
|
||||||
|
if(rotation[2] == 180) {
|
||||||
|
parametric_move_sub("rectangle",loc_x-6+size_x,loc_y+.5+size_y,loc_z-adjust,face,rotation,
|
||||||
|
parametric,size_x-17,size_y-1,floorthick+1,data_1,data_2,data_3,[.1,.1,.1,.1]);
|
||||||
|
parametric_move_sub("rectangle",loc_x-size_x+12.5+size_x,loc_y-(size_y/2)+6+size_y,loc_z-adjust,
|
||||||
|
face,rotation,parametric,5.5,10.5,floorthick+.12,data_1,data_2,data_3,[5.5,5.5,5.5,5.5]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
parametric_move_sub("rectangle",loc_x+6,loc_y-.5,loc_z-adjust,face,rotation,
|
parametric_move_sub("rectangle",loc_x+6,loc_y-.5,loc_z-adjust,face,rotation,
|
||||||
parametric,size_x-17,size_y-1,floorthick+1,data_1,data_2,data_3,[.1,.1,.1,.1]);
|
parametric,size_x-17,size_y-1,floorthick+1,data_1,data_2,data_3,[.1,.1,.1,.1]);
|
||||||
parametric_move_sub("rectangle",loc_x+size_x-12.5,loc_y+(size_y/2)-6,loc_z-adjust,face,rotation,
|
parametric_move_sub("rectangle",loc_x+size_x-12.5,loc_y+(size_y/2)-6,loc_z-adjust,face,rotation,
|
||||||
parametric,5.5,10.5,floorthick+.12,data_1,data_2,data_3,[5.5,5.5,5.5,5.5]);
|
parametric,5.5,10.5,floorthick+.12,data_1,data_2,data_3,[5.5,5.5,5.5,5.5]);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if(rotation[2] == 180) {
|
||||||
|
if(data_3 == "portrait") {
|
||||||
|
parametric_move_sub("rectangle",loc_x+size_x-.5,loc_y+size_y-5.75,loc_z-adjust,face,
|
||||||
|
rotation,parametric,size_x-1,size_y-17,floorthick+1,data_1,data_2,data_3,[.1,.1,.1,.1]);
|
||||||
|
parametric_move_sub("rectangle",loc_x-(size_x/2)+5+size_x,loc_y-size_y+12.5+size_y,
|
||||||
|
loc_z-adjust,face,rotation,parametric,10.5,5.5,floorthick+.12,data_1,data_2,data_3,
|
||||||
|
[5.5,5.5,5.5,5.5]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
parametric_move_sub("rectangle",loc_x-.5,loc_y-5.75,loc_z-adjust,face,rotation,
|
||||||
|
parametric,size_x-1,size_y-17,floorthick+1,data_1,data_2,data_3,[.1,.1,.1,.1]);
|
||||||
|
parametric_move_sub("rectangle",loc_x-(size_x/2)+5,loc_y-size_y+12.5,loc_z-adjust,face,
|
||||||
|
rotation,parametric,10.5,5.5,floorthick+.12,data_1,data_2,data_3,[5.5,5.5,5.5,5.5]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
parametric_move_sub("rectangle",loc_x+.5,loc_y+5.75,loc_z-adjust,face,rotation,
|
parametric_move_sub("rectangle",loc_x+.5,loc_y+5.75,loc_z-adjust,face,rotation,
|
||||||
@@ -1233,6 +1259,7 @@ module case_bottom(case_design) {
|
|||||||
parametric,10.5,5.5,floorthick+.12,data_1,data_2,data_3,[5.5,5.5,5.5,5.5]);
|
parametric,10.5,5.5,floorthick+.12,data_1,data_2,data_3,[5.5,5.5,5.5,5.5]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if ((class == "model") && face == "bottom" && type == "h2_netcard") {
|
if ((class == "model") && face == "bottom" && type == "h2_netcard") {
|
||||||
parametric_move_sub("rectangle",loc_x+25,loc_y-6,loc_z-14,face,rotation,
|
parametric_move_sub("rectangle",loc_x+25,loc_y-6,loc_z-14,face,rotation,
|
||||||
parametric,68.5,wallthick+3,14.5,data_1,data_2,data_3,[1,1,1,1]);
|
parametric,68.5,wallthick+3,14.5,data_1,data_2,data_3,[1,1,1,1]);
|
||||||
|
|||||||
@@ -52,7 +52,8 @@
|
|||||||
2023xxxx version 2.0.x added h3_port_extender(style, mask = false), hk_pwr_button(mask = false), keyhole(keysize, mask = false),
|
2023xxxx version 2.0.x added h3_port_extender(style, mask = false), hk_pwr_button(mask = false), keyhole(keysize, mask = false),
|
||||||
vent_hex(cells_x, cells_y, cell_size, cell_spacing, orientation) and supporting code, dsub(dsubsize, mask = false),
|
vent_hex(cells_x, cells_y, cell_size, cell_spacing, orientation) and supporting code, dsub(dsubsize, mask = false),
|
||||||
vent_panel_hex(x, y, thick, cell_size, cell_spacing, border, borders),
|
vent_panel_hex(x, y, thick, cell_size, cell_spacing, border, borders),
|
||||||
added nut_holder(nut, style, dia_x, dia_y, height)
|
added nut_holder(nut, style, dia_x, dia_y, height), fixed access_port and access_cover 180 rotation
|
||||||
|
in portrait and landscape,
|
||||||
|
|
||||||
see https://github.com/hominoids/SBC_Case_Builder
|
see https://github.com/hominoids/SBC_Case_Builder
|
||||||
|
|
||||||
@@ -277,11 +278,21 @@ module add(type,loc_x,loc_y,loc_z,face,rotation,size_x,size_y,size_z,data_1,data
|
|||||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) feet(size_x, size_z);
|
translate([loc_x,loc_y,loc_z]) rotate(rotation) feet(size_x, size_z);
|
||||||
}
|
}
|
||||||
if(type == "access_port") {
|
if(type == "access_port") {
|
||||||
|
if(rotation[2] == 180) {
|
||||||
|
translate([loc_x+size_x,loc_y+size_y,loc_z]) rotate(rotation) access_port([size_x,size_y,size_z],data_3);
|
||||||
|
}
|
||||||
|
else {
|
||||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) access_port([size_x,size_y,size_z],data_3);
|
translate([loc_x,loc_y,loc_z]) rotate(rotation) access_port([size_x,size_y,size_z],data_3);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(type == "access_cover") {
|
if(type == "access_cover") {
|
||||||
|
if(rotation[2] == 180) {
|
||||||
|
color("grey",1) translate([loc_x+size_x,loc_y+size_y,loc_z]) rotate(rotation) access_cover([size_x,size_y,size_z],data_3);
|
||||||
|
}
|
||||||
|
else {
|
||||||
color("grey",1) translate([loc_x,loc_y,loc_z]) rotate(rotation) access_cover([size_x,size_y,size_z],data_3);
|
color("grey",1) translate([loc_x,loc_y,loc_z]) rotate(rotation) access_cover([size_x,size_y,size_z],data_3);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(type == "boom_vring") {
|
if(type == "boom_vring") {
|
||||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) boom_vring(data_1);
|
translate([loc_x,loc_y,loc_z]) rotate(rotation) boom_vring(data_1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user