2.23.16 – Kalil

Screen Shot 2016-02-23 at 10.54.17 PM.png

import rhinoscriptsyntax as rs

def AddStem():
ptA=(5.58,3.37,0)
ptB=(4.57,3.37,0)
ptC=(4.68,4.44,0)
ptD=(4.74,6.24,0)
ptE=(4.81,6.51,0)
ptF=(4.97,8.20,0)
ptG=(5.29,10.10,0)
ptH=(5.39,10.14,0)
points=(ptA,ptB,ptC,ptD,ptE,ptF,ptG,ptH,ptA)
leftoutline=rs.AddPolyline(points)
axis=rs.AddLine(ptA,ptH)
rs.AddRevSrf(leftoutline,axis)
def AddBranches():
import rhinoscriptsyntax as rs
start1=(6.512,3.905,0)
center1=(7.895,4.215,0)
end1=(9.419,5.245,0)
crv1=rs.AddArc3Pt(start1,end1,center1)
center=(6.512,3.905,0)
second=(6.45,4.29,0)
third=(6.512,3.905,.25)
ell1=rs.AddEllipse3Pt(center,second,third)
center=(7.895,4.215,0)
second=(7.66,4.48,0)
third=(7.895,4.215,0.15)
ell2=rs.AddEllipse3Pt(center,second,third)
center=(9.44,5.20,0)
second=(9.44,5.2,0.02)
third=(9.461,5.155,0)
ell3=rs.AddEllipse3Pt(center,second,third)
center=(8.983,4.808,0)
second=(8.867,5.0001,0)
third=(8.983,4.808,.08)
ell6=rs.AddEllipse3Pt(center,second,third)
shapes=ell1,ell2,ell6,ell3
rail=crv1
branch1=rs.AddSweep1(rail,shapes,closed=True)
branch2 = rs.GetObjects()
if branch2:
start = rs.GetPoint("Point to copy from")
if start:
end = rs.GetPoint("Point to copy to", start)
if end:
translation = end-start
branch3=rs.CopyObjects( branch2, translation )
origin=(6.38,4.89,0)
scale=(.90,.90,.90)
rs.ScaleObject(branch3,origin,scale,copy=False)
branch4 = rs.GetObjects()
if branch4:
start = rs.GetPoint("Point to copy from")
if start:
end = rs.GetPoint("Point to copy to", start)
if end:
translation = end-start
branch5=rs.CopyObjects( branch4, translation )
origin=(6.28,6.02,0)
scale=(.82,.82,.82)
rs.ScaleObject(branch5,origin,scale,copy=False)
branch6 = rs.GetObjects()
if branch6:
start = rs.GetPoint("Point to copy from")
if start:
end = rs.GetPoint("Point to copy to", start)
if end:
translation = end-start
branch6=rs.CopyObjects( branch5, translation )
origin=(6.14,6.92,0)
scale=(.65,.65,.65)
rs.ScaleObject(branch6,origin,scale,copy=False)
branch7 = rs.GetObjects()
if branch7:
start = rs.GetPoint("Point to copy from")
if start:
end = rs.GetPoint("Point to copy to", start)
if end:
translation = end-start
branch7=rs.CopyObjects( branch6, translation )
origin=(5.99,7.67,0)
scale=(.50,.50,.50)
rs.ScaleObject(branch7,origin,scale,copy=False)
objects=rs.GetObjects()
start=(5.58,3.37,0)
end=(5.39,10.14,0)
rs.MirrorObjects(objects,start,end,copy=True)

AddStem()
AddBranches()

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