RhinoPython, DivideCurve, join points

Hi,

I’m doing Rhinopython for the first time and I trying to divide two lines that I created and then join the points form those two lines. This is what I have so far;

r_bot1 = Point3d(d1,d1,d1)
r_bot2 = Point3d(d1, W-d1, d1)
r_bot3 = Point3d(L-d1, d1, d1)
r_bot4 = Point3d(L-d1, W-d1, d1)

r_bot_curve = rs.AddLine(r_bot1,r_bot2)
r_bot_curve_1 = rs.AddLine(r_bot3,r_bot4)

points = rs.DivideCurve(r_bot_curve, 4, True, True)
points_1 = rs.DivideCurve(r_bot_curve_1, 4, True, True)

line = rs.AddLine(points,points_1)

However I keep getting “Could not convert Rhino.Geometry.Point3d …to a Point3d”. Anyone help?

import rhinoscriptsyntax as rs
line_a = rs.AddLine([0,0,0], [10,10,0])
line_b = rs.AddLine([0,5,0], [10,15,0])
pts_a = rs.DivideCurve(line_a, 4, True, True)
pts_b = rs.DivideCurve(line_b, 4, True, True)
lines = []
for pt_a, pt_b in zip(pts_a, pts_b):
    lines.append(rs.AddLine(pt_a, pt_b))

Lines.py (298 Bytes)

Thank you!

How would I show all these lines in the rhino viewport? When I set the output of the python code e.g a = lines, it doesn’t show anything? I can get one to show by going a = lines[1] however I cant seem to get them all?