Boya Zhang – March 18 Five classes

3 18

import rhinoscriptsyntax as rs

class Floor():
def __init__(self):
self.x_ref = 10
self.y_ref = 5
self.thickness = 0.5
self.makeStartPoint()
self.makeThickness()
def makeStartPoint(self):
st = 0,0,0
return st
def makeThickness(self):
a = self.x_ref
b = self.y_ref
c = self.thickness
st = self.makeStartPoint()
x = st[0]
y = st[1]
z = st[2]
p0 = x, y, z
p1 = x+a, y, z
p2 = x+a, y+b, z
p3 = x, y+b, z
p4 = x, y, z+c
p5 = x+a, y, z+c
p6 = x+a, y+b, z+c
p7 = x, y+b, z+c
pts = p0,p1,p2,p3,p4,p5,p6,p7
rs.AddBox(pts)

f = Floor()

class Columns():
def __init__(self):
self.x_ref = 0.5
self.y_ref = 0.5
self.height = 5
self.StartPoint0 = 0,0,0.5
self.StartPoint1 = 9.5,0,0.5
self.StartPoint2 = 9.5,4.5,0.5
self.StartPoint3 = 0,4.5,0.5
self.MakeColumn0()
self.MakeColumn1()
self.MakeColumn2()
self.MakeColumn3()
def MakeColumn0(self):
st = self.StartPoint0
a = self.x_ref
b = self.y_ref
c = self.height
x = st[0]
y = st[1]
z = st[2]
p0 = x, y, z
p1 = x+a, y, z
p2 = x+a, y+b, z
p3 = x, y+b, z
p4 = x, y, z+c
p5 = x+a, y, z+c
p6 = x+a, y+b, z+c
p7 = x, y+b, z+c
pts = p0,p1,p2,p3,p4,p5,p6,p7
rs.AddBox(pts)
def MakeColumn1(self):
st = self.StartPoint1
a = self.x_ref
b = self.y_ref
c = self.height
x = st[0]
y = st[1]
z = st[2]
p0 = x, y, z
p1 = x+a, y, z
p2 = x+a, y+b, z
p3 = x, y+b, z
p4 = x, y, z+c
p5 = x+a, y, z+c
p6 = x+a, y+b, z+c
p7 = x, y+b, z+c
pts = p0,p1,p2,p3,p4,p5,p6,p7
rs.AddBox(pts)
def MakeColumn2(self):
st = self.StartPoint2
a = self.x_ref
b = self.y_ref
c = self.height
x = st[0]
y = st[1]
z = st[2]
p0 = x, y, z
p1 = x+a, y, z
p2 = x+a, y+b, z
p3 = x, y+b, z
p4 = x, y, z+c
p5 = x+a, y, z+c
p6 = x+a, y+b, z+c
p7 = x, y+b, z+c
pts = p0,p1,p2,p3,p4,p5,p6,p7
rs.AddBox(pts)
def MakeColumn3(self):
st = self.StartPoint3
a = self.x_ref
b = self.y_ref
c = self.height
x = st[0]
y = st[1]
z = st[2]
p0 = x, y, z
p1 = x+a, y, z
p2 = x+a, y+b, z
p3 = x, y+b, z
p4 = x, y, z+c
p5 = x+a, y, z+c
p6 = x+a, y+b, z+c
p7 = x, y+b, z+c
pts = p0,p1,p2,p3,p4,p5,p6,p7
rs.AddBox(pts)

c = Columns()

class LongWalls():
def __init__(self):
self.x_ref = 9
self.y_ref = 0.5
self.height = 5
self.StartPoint0 = 0.5,0,0.5
self.StartPoint1 = 0.5,4.5,0.5
self.MakeWall0()
self.MakeWall1()
def MakeWall0(self):
st = self.StartPoint0
a = self.x_ref
b = self.y_ref
c = self.height
x = st[0]
y = st[1]
z = st[2]
p0 = x, y, z
p1 = x+a, y, z
p2 = x+a, y+b, z
p3 = x, y+b, z
p4 = x, y, z+c
p5 = x+a, y, z+c
p6 = x+a, y+b, z+c
p7 = x, y+b, z+c
pts = p0,p1,p2,p3,p4,p5,p6,p7
rs.AddBox(pts)
def MakeWall1(self):
st = self.StartPoint1
a = self.x_ref
b = self.y_ref
c = self.height
x = st[0]
y = st[1]
z = st[2]
p0 = x, y, z
p1 = x+a, y, z
p2 = x+a, y+b, z
p3 = x, y+b, z
p4 = x, y, z+c
p5 = x+a, y, z+c
p6 = x+a, y+b, z+c
p7 = x, y+b, z+c
pts = p0,p1,p2,p3,p4,p5,p6,p7
rs.AddBox(pts)

l = LongWalls()

class ShortWalls():
def __init__(self):
self.x_ref = 0.5
self.y_ref = 4
self.height = 5
self.StartPoint0 = 0,0.5,0.5
self.StartPoint1 = 9.5,0.5,0.5
self.MakeWall0()
self.MakeWall1()
def MakeWall0(self):
st = self.StartPoint0
a = self.x_ref
b = self.y_ref
c = self.height
x = st[0]
y = st[1]
z = st[2]
p0 = x, y, z
p1 = x+a, y, z
p2 = x+a, y+b, z
p3 = x, y+b, z
p4 = x, y, z+c
p5 = x+a, y, z+c
p6 = x+a, y+b, z+c
p7 = x, y+b, z+c
pts = p0,p1,p2,p3,p4,p5,p6,p7
rs.AddBox(pts)
def MakeWall1(self):
st = self.StartPoint1
a = self.x_ref
b = self.y_ref
c = self.height
x = st[0]
y = st[1]
z = st[2]
p0 = x, y, z
p1 = x+a, y, z
p2 = x+a, y+b, z
p3 = x, y+b, z
p4 = x, y, z+c
p5 = x+a, y, z+c
p6 = x+a, y+b, z+c
p7 = x, y+b, z+c
pts = p0,p1,p2,p3,p4,p5,p6,p7
rs.AddBox(pts)

s = ShortWalls()

class Roof():
def __init__(self):
self.x_ref = 10
self.y_ref = 5
self.thickness = 0.5
self.makeStartPoint()
self.makeThickness()
def makeStartPoint(self):
st = 0,0,5.5
return st
def makeThickness(self):
a = self.x_ref
b = self.y_ref
c = self.thickness
st = self.makeStartPoint()
x = st[0]
y = st[1]
z = st[2]
p0 = x, y, z
p1 = x+a, y, z
p2 = x+a, y+b, z
p3 = x, y+b, z
p4 = x, y, z+c
p5 = x+a, y, z+c
p6 = x+a, y+b, z+c
p7 = x, y+b, z+c
pts = p0,p1,p2,p3,p4,p5,p6,p7
rs.AddBox(pts)

r = Roof()

One thought on “Boya Zhang – March 18 Five classes

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s