-
Notifications
You must be signed in to change notification settings - Fork 41
/
gothic-2-arch+rose.scad
78 lines (68 loc) · 1.43 KB
/
gothic-2-arch+rose.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
68
69
70
71
72
73
74
75
76
77
78
module opening(x,y,r,d) {
linear_extrude(height=d)
union() {
intersection () {
translate([x,y,0]) circle(r);
translate([-x,y,0]) circle(r);
}
translate([0,y/2,0]) square(size=[2 *(r-x), y],center=true);
}
};
module arch(x,y,r,d,t) {
translate([0,-1,0])
difference () {
opening(x,y,r+t,d);
translate([0,0,-1]) opening(x,y,r,d+2*t + 2);
}
}
module archway (x,y,r,d,t,n) {
union() {
for (i=[0:n-1]) {
arch(x,y,r+i*t,d+i*t,t);
}
}
}
module window (x,y,r,d,t,dy,dr) {
union() {
arch(x*2,y*1.2,r*2,d,t);
assign( offset=(r + x) / 2) {
echo(offset);
union() {
translate([offset,0,0]) arch(x/2,y-dy,r-dr,d-t,t);
translate([-offset,0,0]) arch(x/2,y-dy,r-dr,d-t,t);
}
}
}
}
module ring(r,d,t) {
linear_extrude(height=d)
difference () {
circle(r+t,center=true);
circle(r,center=true);
}
}
module rose(r1,r2,r3,d,t) {
union() {
difference() {
union() {
for (i =[1:4]) {
rotate([0,0,i*90]) translate([r1,0,0]) ring(r2,d,t);
}
}
translate([0,0,-1]) cylinder(r=r3,h=d+2);
}
ring(r3,d,t);
}
}
module remove_ground() {
difference() {
child(0);
translate([0,-50,0]) cube([100,100,100],center=true);
}
}
$fa = 0.01; $fs = 0.5;
remove_ground ()
union() {
window(2,12,6,4,1,-2,2);
translate([0,20.25,0]) scale(0.37) rose(4,6,5,8,2);
}