import rhinoscriptsyntax as rs
import scriptcontext
import Rhino
def Start():
crv_id = rs.GetObject("Get Curve", rs.filter.curve)
test1 = rs.IsCurvePlanar(crv_id)
test2 = rs.IsCurveClosed(crv_id)
test3 = rs.IsCurveClosable(crv_id)
test4 = rs.IsPolyline(crv_id)
pts = rs.CurvePoints(crv_id)
pts = rs.CullDuplicatePoints(pts,0.1)
pts = list(pts)
pts += [pts[0]] # to make start and end point the same, since this duplicate was removed too
poly =rs.AddPolyline(pts)
mesh_id = rs.MeshPolyline(poly)
print test1, test2, test3, test4
print mesh_id
return
Start()