-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathegg_of_columbus_puzzle.scad
45 lines (40 loc) · 1.84 KB
/
egg_of_columbus_puzzle.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
size=60;
height=5;
cut_width=2;
egg_of_columbus_puzzle(size, height, cut_width);
module egg_of_columbus_puzzle(size, height, cut_width) {
small_circle_radius = 2-sqrt(2);
difference() {
egg(size, height, cut_width);
cube([5*size,cut_width,3*height],center=true);
translate([0,2.5*size,0]) cube([cut_width,5*size,3*height],center=true);
translate([0,-5*small_circle_radius*size+cut_width,0]) cube([cut_width,5*size,3*height],center=true);
translate([size,0,0])rotate(a=[0,0,45])cube([cut_width,5*size,3*height],center=true);
translate([-size,0,0])rotate(a=[0,0,-45])cube([cut_width,5*size,3*height],center=true);
translate([-size*(1-small_circle_radius)/2,-size*(1-small_circle_radius)/2,0])rotate(a=[0,0,45])cube([cut_width,small_circle_radius*size,3*height],center=true);
translate([size*(1-small_circle_radius)/2,-size*(1-small_circle_radius)/2,0])rotate(a=[0,0,-45])cube([cut_width,small_circle_radius*size,3*height],center=true);
}
}
module egg(size, height, cut_width) {
difference() {
intersection() {
translate([-size,0,0])cylinder(h=height,r=2*size-cut_width/2, $fn=1000);
translate([size,0,0])cylinder(h=height,r=2*size-cut_width/2, $fn=1000);
}
translate([0,size,0])top_arc_cutter(size, height, cut_width);
button_arc_cutter(size, height, cut_width);
}
}
module top_arc_cutter(size, height, cut_width) {
small_circle_radius = 2-sqrt(2);
difference() {
translate([0,0,-1.5]) rotate(a=[0,0,45]) cube([size,size,3*height]);
cylinder(h=3*height,r=small_circle_radius*size-cut_width/2,center = true, $fn=1000);
}
}
module button_arc_cutter(size, height, cut_width) {
difference() {
translate([0,-size,0]) cube([2*size,2*size,3*height],center = true);
cylinder(h=3*height,r=size-cut_width/2,center = true, $fn=1000);
}
}