Intersection of Objects

I am trying to get the lengths of intersection of circular surfaces via python rhinoscrypt synthax. But I am getting a an error, below is my code and the error

> def LengthOfIntersection(surface_list):
>     length = 0
>     for i in range(len(surface_list)):
>         curveA = surface_list[i]
>         for j in range(len(surface_list)):
>             if j != i:
>                 intersection = rs.CurveCurveIntersection(curveA,surface_list[j])
>                 #print intersection
>                 if intersection != None:
>                     
>                     length += math.sqrt((intersection[1][1][0]-intersection[0][1][0])**2 + (intersection[1][1][1]-intersection[0][1][1])**2)
>             else: continue       
>     print length  

Message: unable to convert 97e735cd-4382-4a4b-9e89-233569696282 into Curve geometry

Hi,

Without a file to test against, I’d say that some item in the surface_list is not a curve.

-Willem

Yeah, the surface list contains guids of surfaces. I have changed curvecurveintersection to intersectbreps and it works.

Thanks.