02.23.16 – David Aldana

Screen Shot 2016-02-23 at 10.54.11 PM

 

import rhinoscriptsyntax as rs
#Author: David Aldana
#Date: 01.22.16
#Purpose: Demostrate how to write a skeletal code
#Input Parameters: None
#Output Parameters: None
def addRoots():
"""
Purposes: It will add a foundation geometry
Order:Roots done from left to right and bottom to top
"""
point0= 1,1,0
point1=1,6.5,0
point2=3.934,10,0
points=point0,point1,point2
curve1 = rs.AddCurve(points)

""" attempt to create sweep with ellipses
"""
center = 1,1,0
sec = 0.8,1.10,0
thr = 1,1,.3
e1 = rs.AddEllipse3Pt(center,sec,thr)

center = 1.738,6.014,0
sec = 1.2,7,0
thr = 1,6.014, 1.2
e2 = rs.AddEllipse3Pt(center,sec,thr)

center = 3.934,10,0
sec = 3.473,11.347,0
thr = 3.934,10, 1.3
e3 = rs.AddEllipse3Pt(center,sec,thr)

rail = curve1
shapes = e1,e2,e3
rs.AddSweep1(rail,shapes,closed=True)

"""I'm a genious and now the attempt is a reality. GO David!!!
"""

point3=2.5,1,0
point4=2.5,3.5,0
point5=5.585,7.002,0
points1=point3,point4,point5
rs.AddCurve(points1)

""" second attempt to create sweep with ellipses
"""
point6=7,1,0
point7=7.5,4,0
point8=5,8,0
points2=point6,point7,point8
curve2 = rs.AddCurve(points2)

point10=3,11,0
point11=3,15,0
points3=point8,point10,point11
curve3 = rs.AddCurve(points3)

point12=3,22,0
point13=9,25,0
points4=point11,point12,point13
curve4 = rs.AddCurve(points4)

center = 7,1,0
sec = 6.5,1,0
thr = 7,1,0.5
e4 = rs.AddEllipse3Pt(center,sec,thr)

center = 5,8,0
sec = 4.5,7.7,0
thr = 5,8,1.3
e5 = rs.AddEllipse3Pt(center,sec,thr)
""" sweep 2
"""
rail = curve2
shapes = e4,e5
rs.AddSweep1(rail,shapes,closed=True)

center = 3,15,0
sec = 1.5,15,0
thr = 3,15,1.5
e6 = rs.AddEllipse3Pt(center,sec,thr)
""" sweep 3
"""
rail = curve3
shapes = e5,e6
rs.AddSweep1(rail,shapes,closed=True)

center = 9,25,0
sec = 7.9,27,0
thr = 9,25,2.5
e7 = rs.AddEllipse3Pt(center,sec,thr)
""" sweep 4
"""
rail = curve4
shapes = e6,e7
rs.AddSweep1(rail,shapes,closed=True)

start=9,25,0
end=14.04,27.48,0
line1 = rs.AddLine(start,end)

center = 14.04,27.48,0
sec = 12.88,29.52,0
thr = 14.04,27.48,2.5
e8 = rs.AddEllipse3Pt(center,sec,thr)

""" sweep 5
"""
rail = line1
shapes = e7,e8
rs.AddSweep1(rail,shapes,closed=True)

point14=14.04,27.48,0
point15=18.5,30,0
point16=20,35,0
points1=point14,point15,point16
curve5 = rs.AddCurve(points1)

center = 20,35,0
sec = 17.3,35.8,0
thr = 20,35,2.5
e9 = rs.AddEllipse3Pt(center,sec,thr)

""" sweep 6
"""
rail = curve5
shapes = e8,e9
rs.AddSweep1(rail,shapes,closed=True)

"""so far so good champ
"""

point17=15,1,0
point18=14,8,0
point19=9,12,0
points1=point17,point18,point19
rs.AddCurve(points1)

point20=5,16,0
point21=6.104,23,0
points4=point19,point20,point21
rs.AddCurve(points4)

object= rs.GetObjects()
start= 20,1,0
end= 20,35,0
rs.MirrorObject (object,start , end, copy=True)
addRoots()

def addTrunk():
pass
addTrunk()

def addBranches():
pass
addBranches()

def addLeaves():
pass
addLeaves()

def makeAMangrove():
addRoots()
addTrunk()
addBranches()
addLeaves()

makeAMangrove()

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