Jan.30 Junya Huang

01302016.jpg

</pre>
import rhinoscriptsyntax as rs
#Author: Junya Huang
#Date: Jan29/2106
#Purpose: practice
#Imput parameters: Scale number of the pattern on top cloth; curves
#Output parameters: None

def top():
scale = rs.GetInteger("scale number of the pattern on top cloth")
topcloth = rs.GetObject("pick top cloth")
rs.AddHatch(topcloth,None, scale)

def skirt():
rail01 = rs.GetObject("select first rail")

rail02 = rs.GetObject("select first rail")

class myclass:
def __init__(self,_strCurve01,_strCurve02, _numOfDivs):
rail01=_strCurve01
rail02=_strCurve02
self.numOfDivs = _numOfDivs
def drawLineBetweenCurves(self):
ptList01 = rs.DivideCurve(rail01,self.numOfDivs,False,True)
ptList02 = rs.DivideCurve(rail02,self.numOfDivs,False,True)
count = 0
for i in ptList01:
rs.AddLine( ptList01[count], ptList02[count] )
count += 1
obj01=myclass(rail01, rail02, 60)
obj01.drawLineBetweenCurves()
def cloth():
top()
skirt()

cloth()
<pre>

 

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