-
Notifications
You must be signed in to change notification settings - Fork 1
/
Raya3.scad
67 lines (54 loc) · 2.29 KB
/
Raya3.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
include <puzzlecad2.scad>
box_puzzle_scale = 15;
box_puzzle_border = 6;
$burr_inset = 0.16;
long = box_puzzle_scale * 4; // voxels long
wide = box_puzzle_scale * 3; // voxels wide
high = box_puzzle_scale * 2; // voxels high
dimlong = long + box_puzzle_border * 2;
dimwide = wide + box_puzzle_border * 2;
height = high + box_puzzle_border;
mid = box_puzzle_border / 2 + 0.5;
far = dimlong - mid;
far2 = dimwide - mid;
*pieces();
*box();
cap();
module pieces() {
burr_plate([
["x..|xxx"],//piece A-B
[".x.|xxx"],//pieces C-D-E-F
], $burr_scale = box_puzzle_scale,$plate_width = 150,$burr_bevel = 1.0);
}
module box() {
difference() {
beveled_cube([dimwide, dimlong, height]);
translate([box_puzzle_border - $burr_inset, box_puzzle_border - $burr_inset, box_puzzle_border- $burr_inset])
cube([
wide + $burr_inset * 2,
long + $burr_inset * 2,
high + $burr_inset * 1]);
}
translate([mid, mid, height]) cylinder(r = 2.2, h = 2, $fn = 32);
translate([mid, far, height]) cylinder(r = 2.2, h = 2, $fn = 32);
translate([far2, far, height]) cylinder(r = 2.2, h = 2, $fn = 32);
translate([far2, mid, height]) cylinder(r = 2.2, h = 2, $fn = 32);
}
module cap() {
render(convexity = 2)
translate([0,0,height])
difference() {
beveled_cube([dimwide, dimlong, box_puzzle_border]);
//first cutout removal
translate([box_puzzle_border-$burr_inset,box_puzzle_border-$burr_inset+box_puzzle_scale,0])
cube([wide + $burr_inset * 2,box_puzzle_scale*2+ $burr_inset * 2,box_puzzle_border]);
// second cutout removal
translate([box_puzzle_border-$burr_inset +1*box_puzzle_scale-$burr_inset,box_puzzle_border-$burr_inset+.5*box_puzzle_scale-$burr_inset,0])
cube([box_puzzle_scale+2*$burr_inset,3*box_puzzle_scale+2*$burr_inset,box_puzzle_border]);
// now remove the pins
translate([mid, mid, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
translate([mid, far, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
translate([far2, far, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
translate([far2, mid, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
}// end of main difference
}