From 13caa125ced928dd544b90f3963582c7fe7155f0 Mon Sep 17 00:00:00 2001 From: Dmitry Maylarov Date: Wed, 19 May 2021 00:32:32 +0300 Subject: [PATCH] nanopi m4v2 case --- .../NanoPiM4V2/thingiverse_customizer.scad | 49 +++++++++++++++++++ RackCabinets/sixinch_library.scad | 15 +++--- 2 files changed, 55 insertions(+), 9 deletions(-) create mode 100644 RackCabinets/NanoPiM4V2/thingiverse_customizer.scad diff --git a/RackCabinets/NanoPiM4V2/thingiverse_customizer.scad b/RackCabinets/NanoPiM4V2/thingiverse_customizer.scad new file mode 100644 index 0000000..15dd37f --- /dev/null +++ b/RackCabinets/NanoPiM4V2/thingiverse_customizer.scad @@ -0,0 +1,49 @@ +include<../sixinch_library.scad> +$fn = 50*1; + +Part = "c"; // [a:All, b:FrontPlate, c:Cabinet, d:Lid, e:BackPlate, f:Handles] +Units = 4; +Depth = 100; + +module pi_mount_holes() { + dimensions_x = [0, 58]; + dimensions_y = [0, 49]; + for(i=[0:1]){ + for(j=[0:1]){ + echo(i); echo(j); + translate([dimensions_x[i],dimensions_y[j],0]) + screw(); + } + } +} + +module go(){ + { + rotate([90,0,90]) + if(Part=="a"){ + frontplate(Units,[],[],[],[Units/2],[45],[45]); + cabinet(Depth,Units,[45],[],[Units/2]); + lid(Depth,Units,[45],[45]); + back_plate(Units,Depth,[45],[45],[Units/2],[],[]); + handle(Units,false); + }else if(Part=="b"){ + frontplate(Units,[],[],[],[Units/2],[45],[45]); + }else if(Part=="c"){ + cabinet(Depth,Units,[45],[],[Units/2]); + }else if(Part=="d"){ + lid(Depth,Units,[45],[45]); + }else if(Part=="e"){ + back_plate(Units,Depth,[45],[45],[Units/2],[],[]); + }else if(Part=="f"){ + handle(Units,true); + } + } +} + +difference() { + go(); + translate([13, 36, 0]) + pi_mount_holes(); + translate([-25, 0, -18]) + chimney(); +} diff --git a/RackCabinets/sixinch_library.scad b/RackCabinets/sixinch_library.scad index 5bbfb04..1d9196d 100755 --- a/RackCabinets/sixinch_library.scad +++ b/RackCabinets/sixinch_library.scad @@ -19,23 +19,18 @@ slip = 0.35; - module chimney() { for(i=[0:8:80]){ - echo(i); - translate([20 + (width-80)/2 +i,-1,20]){ +// echo(i); + translate([20 + (width-80)/2 +i,-1,30]){ minkowski(){ - cube([0.01,200,30]); + cube([0.01,200,30]); sphere(d=2,h=1); } } } } - - - - module back_plate(u,dp,screw_top,screw_bottom,screw_side,square_hole,round_hole){ difference(){ @@ -167,7 +162,6 @@ module cabinet (dp,u,screw_bottom_front,round_peg,screw_side_front){ translate([20+width,unit/2+0,sixinch-40]){ cylinder(d=gauge_box,h=41);} translate([20+width,unit/2-3,sixinch-40]){ cylinder(d=gauge_box,h=41);} - } } @@ -536,12 +530,15 @@ module frontplate(u,square_hole,round_hole,round_peg,screw_side_front,screw_top, module baseplate(u,handle){ difference(){ union(){ + /* translate([1.25,1.25,1.25]){ minkowski(){ cube([sixinch-2.5,unit*u-2.5,gauge-2.5]); sphere(r=1.25); } } + */ + cube([sixinch,unit*u,gauge]); } //Rack mount holes translate([10-0.5,unit/2,-gauge/2]) {cylinder(r=2.3,gauge*2);}