FEB 1-3 shenting wang

p0 = 0,0,0
p1 = 10,0,0
p2 = 7.1,7.1,0
p3 = 0,10,0
p4 = -7.1,7.1,0
p5 = -10,0,0
p6 = -7.1,-7.1,0
p7 = 0,-10,0
p8 = 7.1,-7.1,0

rs.AddLine(p0,p1)
rs.AddLine(p0,p2)
rs.AddLine(p0,p3)
rs.AddLine(p0,p4)
rs.AddLine(p0,p5)
rs.AddLine(p0,p6)
rs.AddLine(p0,p7)
rs.AddLine(p0,p8)

DrawLines()

def DrawRim():

r1 = 0,2,0
r2 = 1.4,1.4,0
r3 = 2,0,0
r4 = 1.4,-1.4,0
r5 = 0,-2,0
r6 = -1.4,-1.4,0
r7 = -2,0,0
r8 = -1.4,1.4,0

l1 = rs.AddLine(r1,r2)
l2 = rs.AddLine(r2,r3)
l3 = rs.AddLine(r3,r4)
l4 = rs.AddLine(r4,r5)
l5 = rs.AddLine(r5,r6)
l6 = rs.AddLine(r6,r7)
l7 = rs.AddLine(r7,r8)
l8 = rs.AddLine(r8,r1)

DrawFirstRim()

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

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