add upper case, add screw holes to cases

This commit is contained in:
Ricardo (XenGi) Band 2023-06-12 13:57:52 +02:00
commit 93721a857e
No known key found for this signature in database
9 changed files with 75 additions and 23 deletions

View file

@ -1,7 +1,12 @@
.PHONY: render
.PHONY: stl 3mf
render:
stl:
openscad --export-format binstl -o upper_case.stl upper_case.scad
openscad --export-format binstl -o lower_case.stl lower_case.scad
openscad --export-format 3mf -o lower_case.3mf lower_case.scad
openscad --export-format binstl -o plate.stl plate.scad
3mf:
openscad --export-format 3mf -o upper_case.3mf upper_case.scad
openscad --export-format 3mf -o lower_case.3mf lower_case.scad
openscad --export-format 3mf -o plate.3mf plate.scad

View file

@ -1,12 +1,15 @@
![upper case](https://gitlab.com/noisy_cricket/cad/-/raw/main/upper_case.png?inline=false)
![plate](https://gitlab.com/noisy_cricket/cad/-/raw/main/plate.png?inline=false)
![lower case](https://gitlab.com/noisy_cricket/cad/-/raw/main/lower_case.png?inline=false)
CAD files for noisy cricket
===========================
Create stl and 3mf files for lower case and plate files by running (needs openscad):
Create files for 3D printing or CNC by running this (needs openscad):
```shell
make render
make stl
make 3mf
```
---

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Before After
Before After

View file

@ -4,7 +4,7 @@ include <util.scad>
$fn = 64;
difference() {
color("SaddleBrown") difference() {
// case
hull() {
translate([-case_thickness, -case_thickness, 0]) cylinder(h=case_thickness+standoff_height+pcb_thickness+5, r=pcb_radius);
@ -43,10 +43,21 @@ difference() {
translate([-pololu_width/2+pololu_hole_spacing, pololu_depth/2-pololu_hole_spacing, -pcb_thickness/2-2]) cylinder(h=2, r=pololu_holes_radius);
translate([pololu_width/2-pololu_hole_spacing, pololu_depth/2-pololu_hole_spacing, -pcb_thickness/2-2]) cylinder(h=2, r=pololu_holes_radius);
}
// screw holes for upper case
translate([-case_thickness, -case_thickness, 0]) cylinder(h=2, d=4);
translate([pcb_width-2*pcb_radius+case_thickness, -case_thickness, 0]) cylinder(h=2, d=4);
translate([-case_thickness, pcb_depth-2*pcb_radius+case_thickness, 0]) cylinder(h=2, d=4);
translate([pcb_width-2*pcb_radius+case_thickness, pcb_depth-2*pcb_radius+case_thickness, 0]) cylinder(h=2, d=4);
translate([-case_thickness, -case_thickness, 0]) cylinder(h=case_thickness+standoff_height+pcb_thickness+5, d=2);
translate([pcb_width-2*pcb_radius+case_thickness, -case_thickness, 0]) cylinder(h=case_thickness+standoff_height+pcb_thickness+5, d=2);
translate([-case_thickness, pcb_depth-2*pcb_radius+case_thickness, 0]) cylinder(h=case_thickness+standoff_height+pcb_thickness+5, d=2);
translate([pcb_width-2*pcb_radius+case_thickness, pcb_depth-2*pcb_radius+case_thickness, 0]) cylinder(h=case_thickness+standoff_height+pcb_thickness+5, d=2);
}
// mounting standoffs
for(i = [0 : len(mounting_holes)-1]) {
color("SaddleBrown") for(i = [0 : len(mounting_holes)-1]) {
translate([mounting_holes[i][0] - pcb_radius, mounting_holes[i][1] - pcb_radius, case_bottom_thickness]) difference() {
cylinder(h=standoff_height, d=4);
cylinder(h=standoff_height, d=2);

BIN
plate.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View file

@ -4,24 +4,22 @@ include <util.scad>
$fn = 64;
module plate() {
hull() {
cylinder(h=plate_thickness, r=pcb_radius);
translate([pcb_width-2*pcb_radius, 0, 0]) cylinder(h=plate_thickness, r=pcb_radius);
translate([0, pcb_depth-2*pcb_radius, 0]) cylinder(h=plate_thickness, r=pcb_radius);
translate([pcb_width-2*pcb_radius, pcb_depth-2*pcb_radius, 0]) cylinder(h=plate_thickness, r=pcb_radius);
// projection(cut=true)
color("Gold") difference() {
union() {
hull() {
cylinder(h=plate_thickness, r=pcb_radius);
translate([pcb_width-2*pcb_radius, 0, 0]) cylinder(h=plate_thickness, r=pcb_radius);
translate([0, pcb_depth-2*pcb_radius, 0]) cylinder(h=plate_thickness, r=pcb_radius);
translate([pcb_width-2*pcb_radius, pcb_depth-2*pcb_radius, 0]) cylinder(h=plate_thickness, r=pcb_radius);
}
translate([20, pcb_depth - pcb_radius, 0]) lug();
translate([pcb_width-2*pcb_radius - 20, pcb_depth - pcb_radius, 0]) lug();
translate([20, -pcb_radius, 0]) lug(north_facing=false);
translate([pcb_width-2*pcb_radius - 20, -pcb_radius, 0]) lug(north_facing=false);
}
translate([20, pcb_depth - pcb_radius, 0]) lug();
translate([pcb_width-2*pcb_radius - 20, pcb_depth - pcb_radius, 0]) lug();
translate([20, -pcb_radius, 0]) lug(north_facing=false);
translate([pcb_width-2*pcb_radius - 20, -pcb_radius, 0]) lug(north_facing=false);
}
// projection(cut=true)
difference() {
color("gold") plate();
translate([12.7-pcb_radius, 12.7-pcb_radius, 0]) {
mx_1x1_cutout();
translate([mx, 0, 0]) mx_1x1_cutout();

BIN
upper_case.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

34
upper_case.scad Normal file
View file

@ -0,0 +1,34 @@
// This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
include <util.scad>
$fn = 64;
color("SaddleBrown") difference() {
// case
hull() {
translate([-case_thickness, -case_thickness, 0]) cylinder(h=upper_case_height, r=pcb_radius);
translate([pcb_width-2*pcb_radius+case_thickness, -case_thickness, 0]) cylinder(h=upper_case_height, r=pcb_radius);
translate([-case_thickness, pcb_depth-2*pcb_radius+case_thickness, 0]) cylinder(h=upper_case_height, r=pcb_radius);
translate([pcb_width-2*pcb_radius+case_thickness, pcb_depth-2*pcb_radius+case_thickness, 0]) cylinder(h=upper_case_height, r=pcb_radius);
}
// pcb
hull() {
cylinder(h=upper_case_height+0.1, r=pcb_radius);
translate([pcb_width-2*pcb_radius, 0, 0]) cylinder(h=upper_case_height+0.1, r=pcb_radius);
translate([0, pcb_depth-2*pcb_radius, 0]) cylinder(h=upper_case_height+0.1, r=pcb_radius);
translate([pcb_width-2*pcb_radius, pcb_depth-2*pcb_radius, 0]) cylinder(h=upper_case_height+0.1, r=pcb_radius);
}
// threaded inserts
translate([-case_thickness, -case_thickness, 0]) cylinder(h=3, d=3);
translate([pcb_width-2*pcb_radius+case_thickness, -case_thickness, 0]) cylinder(h=3, d=3);
translate([-case_thickness, pcb_depth-2*pcb_radius+case_thickness, 0]) cylinder(h=3, d=3);
translate([pcb_width-2*pcb_radius+case_thickness, pcb_depth-2*pcb_radius+case_thickness, 0]) cylinder(h=3, d=3);
translate([20, pcb_depth - pcb_radius, 0]) lug(hole=false);
translate([pcb_width-2*pcb_radius - 20, pcb_depth - pcb_radius, 0]) lug(hole=false);
translate([20, -pcb_radius, 0]) lug(north_facing=false, hole=false);
translate([pcb_width-2*pcb_radius - 20, -pcb_radius, 0]) lug(north_facing=false, hole=false);
}

View file

@ -12,6 +12,7 @@ plate_thickness = 1.5;
case_thickness = 5;
case_bottom_thickness = 5;
case_height = 10;
upper_case_height = 5;
standoff_height = 3;