Can one define a Cplane in a Python script?

…All in the title.
From 3points for example ?
Thanks,
Jean P.

Hi Jean,

An easy way is to use the ViewCPlane method from rhinoscriptsyntax:

import rhinoscriptsyntax as rs
origin = rs.GetPoint("CPlane origin")
if origin:
    plane = rs.ViewCPlane()
    plane = rs.MovePlane(plane,origin)
    rs.ViewCPlane(None, plane)

Use the PlaneFromPoints method to create a plane from 3 points. Then pass this plane to ViewCPlane.

Check the Rhino.Python help file for more details.