Creates a plane from an origin point and a normal direction vector.
rhinoscriptsyntax.PlaneFromNormal (origin, normal, xaxis=None)
rhinoscript.plane.PlaneFromNormal (origin, normal, xaxis=None)
origin |
Required. List of 3 numbers or Point3d. A 3-D point identifying the origin of the plane. |
normal |
Required. Line of 3 numbers, Point3d, or Vector3d. A non-zero 3-D vector identifying the normal direction of the plane. |
xaxis |
Optional. Line of 3 numbers, Point3d, or Vector3d. A non-zero 3-D vector identifying the plane's X axis. |
Plane |
The plane if successful. The elements of a plane array are as follows: |
None |
If not successful, or on error. |
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)
rs.ViewCPlane( None, rs.PlaneFromNormal(origin, normal) )