Skip to content

Commit 5aa89c8

Browse files
authored
Merge pull request #9 from matushorvath/cassette-cover
Cassette cover mounting features
2 parents 966516d + 4c0d50d commit 5aa89c8

4 files changed

Lines changed: 100 additions & 9 deletions

File tree

model/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ PREVIEWS=$(TARGETS:.stl=.png)
44
all: $(TARGETS)
55
preview: $(PREVIEWS)
66

7-
include $(wildcard *.deps)
7+
-include $(wildcard *.deps)
88

99
# Detect OpenSCAD location
1010
ifneq ($(shell wslinfo --version),)

model/cassette_cover.scad

Lines changed: 78 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ include <common.scad>
33
include <cassette_dimensions.scad>
44
include <BOSL2/std.scad>
55

6-
// TODO locating features on cover
7-
// TODO mounting tabs on cover
8-
96
module cc_cover_handle() {
107
move([
118
-CC_VISIBLE_DEPTH + DELTA,
@@ -40,6 +37,9 @@ function cc_cover_plane(dist) =
4037
)
4138
round_corners(shape, radius = radii, $fn=fn_where_needed);
4239

40+
//%polygon(cc_cover_plane(CC_VISIBLE_DEPTH));
41+
//polygon(cc_cover_plane(0));
42+
4343
module cc_bottom_corner_mask() {
4444
// Rounding for bottom corners
4545
// Needs to be applied after skin(), because it causes different
@@ -69,7 +69,78 @@ module cc_bottom_corner_mask() {
6969
}
7070
}
7171

72-
// cc_bottom_corner_mask();
72+
//cc_bottom_corner_mask();
73+
74+
module cc_cover_top_bezel() {
75+
move([
76+
DELTA,
77+
scr_fwd_height - CC_BEZEL_WIDTH - CC_COVER_FIT,
78+
CC_BEZEL_POSITION
79+
])
80+
cuboid([
81+
BODY_WALL + CC_BEZEL_EXTRA_DEPTH,
82+
CC_BEZEL_WIDTH,
83+
cc_mask_width - 2 * CC_BEZEL_POSITION
84+
],
85+
anchor = LEFT + BOTTOM + FRONT
86+
);
87+
}
88+
89+
module cc_cover_side_bezel() {
90+
move([
91+
DELTA,
92+
CC_BEZEL_POSITION,
93+
CC_COVER_FIT
94+
])
95+
// Use diff, not difference, so we can position the gaps and the ball with the same operation
96+
diff() {
97+
bezel_side_height = scr_fwd_height - 2 * CC_BEZEL_POSITION;
98+
99+
// Bezel side body
100+
cuboid([
101+
BODY_WALL + CC_BEZEL_EXTRA_DEPTH,
102+
bezel_side_height,
103+
CC_BEZEL_WIDTH
104+
],
105+
anchor = LEFT + BOTTOM + FRONT
106+
);
107+
108+
// Mounting points (two sets of two gaps and and a ball)
109+
move([DELTA, bezel_side_height / 2, -DELTA]) // move mount points relative to bezel body
110+
ycopies(CC_MOUNT_DISTANCE + CC_MOUNT_LENGTH + CC_MOUNT_GAP) { // two pairs of mounting points per bezel side
111+
ycopies(CC_MOUNT_LENGTH + CC_MOUNT_GAP) // two gaps around each mounting point
112+
// Gaps around mounting points, to make them flexible
113+
tag("remove") cuboid([
114+
BODY_WALL + CC_BEZEL_EXTRA_DEPTH + 2 * DELTA,
115+
CC_MOUNT_GAP,
116+
CC_BEZEL_WIDTH + 2 * DELTA
117+
],
118+
anchor = LEFT + BOTTOM
119+
);
120+
121+
// Mounting point ball
122+
move([
123+
BODY_WALL - CC_MOUNT_BALL_FIT, // ball starts right behind the wall, with a small delta to make the fit tight
124+
0,
125+
CC_MOUNT_BALL_R - CC_COVER_INTERFERENCE //
126+
])
127+
bottom_half(z = CC_COVER_INTERFERENCE - CC_MOUNT_BALL_R + DELTA)
128+
sphere(
129+
r = CC_MOUNT_BALL_R,
130+
anchor = LEFT
131+
);
132+
}
133+
}
134+
}
135+
136+
module cc_cover_mounts() {
137+
cc_cover_top_bezel();
138+
139+
zflip_copy(z = cc_mask_width / 2)
140+
cc_cover_side_bezel();
141+
}
142+
143+
//cc_cover_mounts();
73144

74145
module cc_cover_object() {
75146
// Position the forward face
@@ -96,23 +167,23 @@ module cc_cover_object() {
96167
skin(faces, slices = 10);
97168
}
98169

170+
//cc_cover_object();
171+
99172
module cc_cover() {
100173
// Angle and move the cover together with the corner mask
101174
move([kbd_back_x, kbd_back_y, CC_MASK_LEFT_Z]) // move to position relative to the model
102175
zrot(-SCR_FWD_A) // angle relative to the model
103176
difference() {
104177
union() {
105178
cc_cover_object();
179+
cc_cover_mounts();
106180
cc_cover_handle();
107181
}
108182

109183
cc_bottom_corner_mask();
110184
}
111185
}
112186

113-
// %polygon(cc_cover_plane(CC_VISIBLE_DEPTH));
114-
// polygon(cc_cover_plane(0));
115-
116187
// use <body.scad>
117188
// xrot(90) {
118189
// %body(true);

model/cassette_dimensions.scad

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,24 @@ CC_B_R = SCR_FWD_BR_R;
9595
CC_MASK_LEFT_Z = 63;
9696
CC_MASK_RIGHT_Z = 222.5;
9797
cc_mask_width = CC_MASK_RIGHT_Z - CC_MASK_LEFT_Z;
98+
99+
// Cover mounting features
100+
101+
// Depth of the mounting bezel (in addition to BODY_WALL to clear the wall)
102+
CC_BEZEL_EXTRA_DEPTH = 4;
103+
104+
// Mounting bezel width, needs to be thin enough to be flexible
105+
CC_BEZEL_WIDTH = 1.5;
106+
107+
// Mounting features on the bezel
108+
CC_MOUNT_DISTANCE = 140;
109+
CC_MOUNT_LENGTH = 4;
110+
CC_MOUNT_GAP = 1;
111+
112+
CC_COVER_FIT = 0.1; // gap around the bezel
113+
CC_COVER_INTERFERENCE = 0.5; // how much the ball extends past the bezel; should be at least CC_COVER_FIT
114+
CC_MOUNT_BALL_R = 2;
115+
CC_MOUNT_BALL_FIT = 0.2;
116+
117+
// Bezel position; relative to cover edges
118+
CC_BEZEL_POSITION = 20;

model/vt52.scad

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ include <BOSL2/std.scad>
55
use <cassette_cover.scad>
66
use <shell.scad>
77

8-
// TODO finish right side dark cover
98
// TODO bottom cover
109
// TODO keyboard plate
1110
// TODO try to put "DIGITAL decscope" near the backspace

0 commit comments

Comments
 (0)