Skip to content

Commit e52a58d

Browse files
committed
attachment cover with similar chamfer to the attachment itsself.
1 parent 4b48c9a commit e52a58d

3 files changed

Lines changed: 30 additions & 23 deletions

File tree

src/MainCase/UsbCover.scad

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ include <../../variables.scad>
22
include <../../lib/utils.scad>
33

44
$fn = 64;
5-
epsilon = 0.01; // infinitesimal thickness for slabs in hull - can be increased to see if offsets were done right.
65
depth = UsbCover_depth+UsbCover_foot_length;
76

87

src/Mounting/AttachmentCover.scad

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,40 @@
11
include <../../variables.scad>
2-
32
use <../../lib/Round-Anything/polyround.scad>
43
use <../../lib/utils.scad>
54

65
module AttachmentCover(height=2) {
7-
difference() {
8-
intersection() {
9-
hull() {
10-
r0 = 2;
11-
r1 = 1;
12-
13-
translate([0, 0, -1])
14-
linear_extrude(1)
15-
polygon(roundedRectangle(MountAttachment_width, MountAttachment_height, r0));
6+
difference(){
7+
hull(){
8+
translate([0,0,0]) linear_extrude(epsilon) polygon(polyRound([
9+
[0, MountAttachment_height/2, 2],
10+
[MountAttachment_width, MountAttachment_height/2, 5],
11+
[MountAttachment_width, -MountAttachment_height/2, 5],
12+
[0, -MountAttachment_height/2, 2],
13+
], fn=$pfn));
1614

17-
translate([0, 0, height-1])
18-
linear_extrude(1)
19-
polygon(roundedRectangle(MountAttachment_width-2*(r0-r1), MountAttachment_height-2*(r0-r1), r1));
15+
translate([-1,0,2-epsilon]) linear_extrude(epsilon) offset(r=-1) polygon(polyRound([
16+
[0, MountAttachment_height/2, 2],
17+
[MountAttachment_width, MountAttachment_height/2, 5],
18+
[MountAttachment_width, -MountAttachment_height/2, 5],
19+
[0, -MountAttachment_height/2, 2],
20+
], fn=$pfn));
21+
}
22+
mirror([0, 0, 0]) {
23+
for(i = [-1, 1]) {
24+
for(j = [-1, 1]) {
25+
translate([
26+
MountAttachment_width / 2 + i * MountAttachment_holes_dx / 2 + MountAttachment_holes_x_offset ,
27+
j * MountAttachment_holes_dy / 2,
28+
2,
29+
])
30+
ScrewHole( 2,
31+
m3_screw_diameter_loose,
32+
head_depth=1,
33+
head_diameter=m3_screw_head_diameter);
34+
}
2035
}
21-
22-
translate([-100, -100, 0])
23-
cube(200);
2436
}
25-
26-
// Screw holes
27-
for(i=[-1,1])for(j=[-1,1])
28-
translate([i*MountAttachment_holes_dx/2, j*MountAttachment_holes_dy/2, height])
29-
ScrewHoleM3(height, head_depth=height/2);
3037
}
3138
}
3239

33-
AttachmentCover();
40+
translate([-MountAttachment_width/4-6,0,0])AttachmentCover();

variables.scad

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ $fs = 0.2;
3535
$fa = 1;
3636
$fn = fast ? 24 : 120;
3737
$pfn = $fn; // for polyRound
38+
epsilon = 0.01; // infinitesimal thickness for slabs in hull - can be increased to see if offsets were done right.
3839

3940

4041
// ==========================================================

0 commit comments

Comments
 (0)