I'm trying to use LineFitFromPoints, but I'm not sure how to use what it is returning.
Some example code:
p1 = (0,0,10)
p2 = (0,1,0)
p3 =(0,0,-10)
points = [p1, p2, p3]
testLine = rs.LineFitFromPoints(points)
print testLine
#test = rs.IsLine(testLine)
#print test
This prints 6 numbers. If I unhash the last two lines, I get the familiar error "parameter (testLine) must be a Guid". If I try to access the numbers as a list (testLine[0], for example) I get an error that says " Line object is unscriptable".
I want to have access to the points of testLine, or be able to treat testLine as a curve and extract the endpoints.
Any help? I'm going to try to look at the code of the LineFitFromPoints function now...


Reply With Quote
