JAN.31_BEN XIE

import rhinoscriptsyntax as rs
#Input : Curves
#Output : points

#Outline of the wing
point1 = (0,1.5,0), (1.2,2,0), (1.5,3,0)
point2 = (1.5,3,0), (4,2.8,0), (5,3,0)
point3 = (5,3,0), (4.5,2,0), (2.5,0.5,0)
point4 = (2.5,0.5,0)
point5 = (1,0.5,0)
Curve1 = rs.AddCurve(point1,2)
Curve2 = rs.AddCurve(point2,2)
Curve3 = rs.AddCurve(point3,3)
Line = rs.AddLine(point4,point5)

obj0 = rs.GetObject("Select a curve")
points = rs.DivideCurve(obj0,8)
for point in points:rs.AddPoint(point)
print points

obj1 = rs.GetObject("Select another curve")
points1 = rs.DivideCurve(obj1,20)
for point0 in points1:rs.AddPoint(point0)
print points1

obj = rs.GetObject("Select a curve", rs.filter.curve)
if rs.IsCurve(obj):
    rs.OffsetCurve( obj, [0,1,0], 0.5 )

obj01 = rs.GetObject("Select a curve", rs.filter.curve)
if rs.IsCurve(obj01):
    rs.OffsetCurve( obj01, [0,1,0], 0.5 )

obj01 = rs.GetObject("Select a curve")
points2 = rs.DivideCurve(obj01,8)
for point01 in points2:rs.AddPoint(point01)
print points2

obj02 = rs.GetObject("Select a curve")
points3 = rs.DivideCurve(obj02,20)
for point02 in points3:rs.AddPoint(point02)
print points3

11.png

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