Sanchez Class Work 03.04.16 – 2

</pre>
<pre></pre>
import rhinoscriptsyntax as rs

def makeGridsFromSurface():
obj = rs.GetObject()
uDomain = rs.SurfaceDomain(obj,0)
vDomain = rs.SurfaceDomain(obj,1)
print uDomain
print vDomain

uMax = uDomain[1]
uMin = uDomain[0]
vMax = vDomain[1]
vMin = vDomain[0]
uStep = 20
vStep = 20
uStepDist = (uMax - uMin)/uStep
vStepDist = (vMax - vMin)/vStep

ulist = rs.frange(uMin, uMax, uStepDist)
vlist = rs.frange(vMin, vMax, vStepDist)

ptlist = []
for u in ulist:
vptlist = []
for v in vlist:
pt = rs.EvaluateSurface(obj, u, v)
#rs.AddPoint(pt)
vptlist.append(pt)
ptlist.append(vptlist)
return ptlist
ptlist1 = makeGridsFromSurface()
ptlist2 = makeGridsFromSurface()

def verticleColumns(x,y):
p0 = ptlist1[x][y]
p1 = ptlist2[x][y]
rs.AddLine(p0, p1)


def obliqColumns0(x,y):
p0 = ptlist1[x+1][y-1]
p1 = ptlist2[x][y]

path = rs.AddLine(p0,p1)
cir1 = rs.AddCircle(p0, 0.2)
rs.ExtrudeCurve(cir1,path)

def obliqColumns1(x,y):
p0 = ptlist1[x+1][y+1]
p1 = ptlist2[x][y]

path = rs.AddLine(p0,p1)
cir1 = rs.AddCircle(p0, 0.2)
rs.ExtrudeCurve(cir1,path)

def obliqColumns2(x,y):
p0 = ptlist1[x-1][y+1]
p1 = ptlist2[x][y]

path = rs.AddLine(p0,p1)
cir1 = rs.AddCircle(p0, 0.2)
rs.ExtrudeCurve(cir1,path)

def obliqColumns3(x,y):
p0 = ptlist1[x-1][y-1]
p1 = ptlist2[x][y]

path = rs.AddLine(p0,p1)
cir1 = rs.AddCircle(p0,0.2)
rs.ExtrudeCurve(cir1,path)
def makeColumns(ptlist1, ptlist2):
xlist = range(1, 19, 2)
ylist = range(1, 19, 2)
for x in xlist:
for y in ylist:
#verticleColumns(x,y)
obliqColumns0(x,y)
obliqColumns1(x,y)
obliqColumns2(x,y)
obliqColumns3(x,y)

makeColumns(ptlist1, ptlist2)

<img class="alignnone size-full wp-image-3445" src="https://digitalfabspring2016.files.wordpress.com/2016/03/flipped.png" alt="Flipped" width="1919" height="1079" />

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