Why the PFN function return of upper code print 'Could not convert'?

import rhinoscriptsyntax as rs
brep1=rs.GetObject("the one of both intersected srurface")
brep2=rs.GetObject("the one of both intersected srurface")
line=rs.IntersectBreps(brep1,brep2)
start_point = rs.CurveStartPoint(line)
end_point = rs.CurveEndPoint(line)
origin =start_point
if origin:
    direction = end_point
    if direction:
        normal = direction - origin
        normal = rs.VectorUnitize(normal)
        p= rs.PlaneFromNormal(origin, normal) 
        rs.ViewCPlane( None,p)
        print p

rs.RotateObject(brep2,start_point,40,p)
import rhinoscriptsyntax as rs
origin = rs.GetPoint("CPlane origin")
if origin:
    direction = rs.GetPoint("CPlane direction")
    if direction:
        normal = direction - origin
        normal = rs.VectorUnitize(normal)
        p=rs.ViewCPlane( None, rs.PlaneFromNormal(origin, normal) )
        print p

why the upper code print Could not convert ?

Hi @日成1,

Can you post a 3dm file containing the two Breps you are trying to intersect?

– Dale

1 Like

I’ve solved it the key is the VectorUnitize