-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHousePlan
260 lines (216 loc) · 7.11 KB
/
HousePlan
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
import geometry2d
def dim(vec1 as Vector vec2 as Vector side as Number) = {
def textSize = 1.9
def 1x = vec1.x, def 1y = vec1.y
def 2x = vec2.x, def 2y = vec2.y
def dx = 2x - 1x, def dy = 2y - 1y
line(vec1 vec2)
def t = length(vec1 vec2)
if ( side > 0 ){ def side = 1.1 }
if ( side < 0 ){ def side = -1.5 }
def mx = ( 1x + 2x ) / 2, def my = ( 1y + 2y ) / 2
def tx = mx + ( side * abs( dy / t ) ) - ( textSize / 2.5 )
def ty = my + ( side * abs( dx / t ) ) - ( textSize / 3 )
text( tx ty textSize round(t) )
}
#
# Upstairs
#
def a = Vector(0, 0), def aa = a
def b = Vector(a.x + 50, a.y), dim(a b 1)
def c = Vector(b.x, b.y - 26), dim(b c 1)
def d = Vector(c.x - 20, c.y), dim(c d -1)
def e = Vector(d.x, d.y - 4), dim(d e 1)
def f = Vector(e.x + 20, e.y), dim(e f -1)
def g = Vector(f.x, f.y + 4), dim(f g 1)
def h = Vector(e.x, e.y - 14), dim(e h 1)
def i = Vector(h.x - 11, h.y), dim(h i -1)
def j = Vector(i.x, i.y + 2), dim(i j -1)
def k = Vector(j.x - 10, j.y), dim(j k -1)
def l = Vector(k.x, k.y + 11), dim(k l -1)
def m = Vector(l.x - 9, l.y), dim(l m -1)
def n = Vector(m.x, m.y + 31), dim(m n -1)
# Master Bathroom (Tub / Sinks)
def o = Vector(m.x + 0.5, m.y + 0.5)
def p = Vector(o.x + 87 / 12, o.y + 119 / 12)
rectangle(o, p)
# Kids Room
def q = Vector(i.x + 0.6, i.y + 0.5)
def r = Vector(q.x + 119 / 12, q.y + 172.25 / 12)
def s = Vector(r.x - 83.25 / 12, r.y - 28 / 12)
rectangle(q, r), rectangle(r, s)
# Guest Bedroom
def t = Vector(k.x + 0.4, k.y + 0.5)
def u = Vector(t.x + 119 / 12, t.y + 148.25 / 12)
def v = Vector(t.x, u.y + 0.3)
def w = Vector(v.x + 57 / 12, v.y + 27.5 / 12)
rectangle(t, u), rectangle(v, w)
# Kids Bathroom
def x = Vector(r.x, r.y + 0.3)
def y = Vector(x.x - 59 / 12, x.y + 101 / 12)
rectangle(x, y)
# Laundry
def z = Vector(y.x - 0.4, y.y)
def a = Vector(z.x - 76 / 12, z.y - 58.5 / 12)
rectangle(z, a)
# B & D reserved !
# Hallway Closet
def c = Vector(w.x, w.y + 0.3)
def e = Vector(c.x - 12 / 12, c.y + 28 / 12)
rectangle(e, c)
# right side 60 from guest bedroom
# Hallway (at top of stairs width 37")
def f = Vector(y.x - 0.3, x.y)
def g = Vector(f.x - 118.5 / 12, f.y), line(f, g)
def h = Vector(f.x, f.y + 39 / 12), line(f, h)
def i = Vector(h.x - 81.5 / 12, h.y), line(h, i)
def j = Vector(i.x, i.y + 67.5 / 12), line(i, j)
def k = Vector(g.x, g.y + 103 / 12), line(g, k)
def l = Vector(k.x - 18 / 12, k.y), line(k, l)
def m = Vector(l.x, l.y + 26 / 12), line(l, m), def mm = m
# Master Toilet / Shower
def f = Vector(p.x + 0.2, p.y)
def g = Vector(f.x + 74 / 12, f.y), line(f, g)
def h = Vector(g.x, g.y - 36.5 / 12), line(g, h)
def i = Vector(h.x - 15 / 12, h.y), line(h,i)
def j = Vector(i.x, i.y - 31 / 12), line(i,j)
def k = Vector(j.x - 61 / 12, j.y), line(j,k)
# Tanya's Closet
def l = Vector(o.x, p.y)
def m = Vector(l.x + 52.5 / 12, l.y + 72 / 12)
rectangle(l, m)
# Lev's Closet
def n = Vector(m.x + 35 / 12, l.y)
def o = Vector(n.x + 54 / 12, n.y), line(n, o)
def p = Vector(n.x, n.y + 72 / 12), line(n, p)
def q = Vector(p.x + 17 / 12, p.y), line(p, q)
line(q, mm)
# 80 diagonal toward hallway
# Closets' corridor width 35
# Dining Room
def q = Vector(b.x - 0.5, b.y - 0.5)
def r = Vector(q.x - 139.5 / 12, q.y - 140 / 12)
# Kitchen
def s = Vector(r.x - 0.5, q.y)
def t = Vector(s.x - 238 / 12, s.y - 165 / 12) # !
# Master Bedroom
def c = Vector(aa.x + 0.5, aa.y - 0.5)
def a = Vector(c.x, c.y - 170 / 12), line(c, a)
def e = Vector(c.x + 163.5 / 12, c.y), line(c, e)
def f = Vector(e.x, e.y - 151 / 12), line(e, f)
def g = Vector(t.x, t.y - 33 / 12), line(f, g)
def h = midpoint(f, g), line(h, mm)
# 32 diagonal b4 door, 29 diagonal to top of stairs
# Stairs
def stairDepth = 11 / 12
def BottomMiddleX = t.x + 44 / 12
def MiddleTopY = t.y - 33 / 12
# Middle Stairs
def stairWidth = 37.5 / 12
repeat 0 to 4 using ii {
def sX = BottomMiddleX
def sY = t.y - ( ii * stairDepth )
line(sX, sY, sX + stairWidth, sY)
}
# Top Stairs
repeat 0 to 5 using ii {
def sX = BottomMiddleX - ( ii * stairDepth )
def sY = MiddleTopY
def eY = sY - stairWidth
line(sX, sY, sX, eY)
}
# Entrance / Entrance Closet / Stairs Platform
def u = Vector(d.x, d.y + 70 / 12), dim(d, u, 1)
def v = Vector(BottomMiddleX + stairWidth, t.y)
def temp = MiddleTopY - stairWidth
line(Vector(d.x, temp), Vector(t.x, temp))
line(v, Vector(v.x, temp))
rectangle(t, Vector(BottomMiddleX, MiddleTopY))
#
# Downstairs + Middle
#
def n = Vector(0, -50)
def o = Vector(n.x + 18, n.y), dim(n o 1)
def oo = Vector(o.x + 32, o.y), dim(o oo 1), def b = oo
def c = Vector(b.x, b.y - 26), dim(b c 1)
def d = Vector(c.x - 20, c.y), dim(c d -1)
def e = Vector(c.x, c.y - 4), dim(c e 1)
def f = Vector(e.x - 20, e.y), dim(e f -1)
def p = Vector(o.x, o.y - 20), #line(o p)
def q = Vector(p.x + 12, p.y), #dim(p q -1)
def r = Vector(q.x, q.y - 6), dim(q r 1)
def s = Vector(n.x, n.y - 26), dim(n s -1)
# Dining Room
def q = Vector(b.x - 5 / 12, b.y - 5 / 12)
def rr = Vector(q.x - 139.5 / 12, q.y - 140 / 12)
dim(q, Vector(rr.x, q.y), -1)
line(rr.x, q.y, rr.x, rr.y)
def ss = Vector(q.x, rr.y), dim(q, ss, -1)
dim(ss, Vector(ss.x - 24 / 12, ss.y), 1)
#rectangle(q, rr)
# Living Room
# ~ V 160, H 235.5
# Kitchen
def ss = Vector(rr.x - 5 / 12, q.y)
def t = Vector(ss.x - 238 / 12, ss.y - 165 / 12) # !
dim(ss, Vector(t.x, ss.y), -1)
line(t.x, ss.y, t.x, t.y)
def u = Vector(ss.x - 24 / 12, t.y), line(t, u)
def v = Vector(u.x, u.y + 25 / 12), dim(u, v, -1)
def w = Vector(v.x + 24 / 12, v.y), dim(v, w, 1)
dim(w, ss, 1)
#rectangle(ss, t)
# Stairs
def stairDepth = 11 / 12
def BottomMiddleX = t.x + 44 / 12
def MiddleTopY = t.y - 33 / 12
# Bottom Stairs
def stairWidth = 41 / 12
repeat 1 to 5 using ii {
def sX = t.x + ( ii * stairDepth )
line(sX, t.y, sX, t.y + stairWidth)
}
line(t.x, t.y + stairWidth, BottomMiddleX, t.y + stairWidth)
# Middle Stairs
def stairWidth = 37.5 / 12
repeat 1 to 4 using ii {
def sX = BottomMiddleX
def sY = t.y - ( ii * stairDepth )
line(sX, sY, sX + stairWidth, sY)
}
# Entrance / Entrance Closet / Stairs Platform
def u = Vector(d.x, d.y + 71 / 12)
def v = Vector(BottomMiddleX + stairWidth, t.y)
dim(u, v, 1)
def temp = MiddleTopY - stairWidth
dim(Vector(d.x - 0.2, temp), Vector(t.x, temp), -1)
line(v, Vector(v.x, temp))
rectangle(t, Vector(BottomMiddleX, MiddleTopY))
# Office
def d = Vector(s.x + 5 / 12, s.y + 5 / 12)
def e = Vector(d.x + 165 / 12, d.y + 121 / 12)
rectangle(d, e)
line(d.x + 135.5 / 12, e.y, d.x + 135.5 / 12, d.y)
# Family Room
def f = Vector(d.x, d.y + 121 / 12 - 0.4)
def g = Vector(f.x + 207 / 12, f.y + 175.5 / 12)
rectangle(f, g)
# Downstair Corridor
def h = Vector(e.x + 0.3, e.y + 0.3)
def i = Vector(h.x + 39 / 12, h.y - 125 / 12)
rectangle(h, i)
# Downstairs Bathroom
def j = Vector(r.x - 0.4, r.y + 0.4)
def k = Vector(j.x - 139.5 / 12, j.y + 62 / 12)
rectangle(j, k)
# Garage
def r = Vector(r.x, r.y - 0) # can change to move down
def s = Vector(r.x, r.y - 4), dim(r s 1)
def ss = Vector(s.x, s.y - 16), dim(s ss 1)
def t = Vector(ss.x - 19, ss.y), dim(ss t -1)
def u = Vector(t.x, t.y - 2), dim(t u 1)
def v = Vector(u.x - 11, u.y), dim(u v -1)
def w = Vector(v.x, v.y + 22), dim(v w -1)
def y = Vector(w.x + 30, w.y), dim(w y -1)
def z = midpoint(w, ss)
text(z.x - 4, z.y, 2, "622 sq ft")