Creates a plane from an origin point and a normal direction vector.
Rhino.PlaneFromNormal (arrOrigin, arrNormal)
arrOrigin |
Required. Array. A 3-D point identifying the origin of the plane. |
arrNormal |
Required. Array. A non-zero 3-D vector identifying the normal direction of the plane. |
Array |
The plane if successful. The elements of a plane array are as follows:
|
||||||||||
Null |
If not successful, or on error. |
Dim arrOrigin, arrDirection, arrNormal
arrOrigin = Rhino.GetPoint("CPlane origin")
If IsArray(arrOrigin) Then
arrDirection = Rhino.GetPoint("CPlane direction")
If IsArray(arrDirection) Then
arrNormal = Rhino.VectorCreate(arrDirection, arrOrigin)
arrNormal = Rhino.VectorUnitize(arrNormal)
Rhino.ViewCPlane , Rhino.PlaneFromNormal(arrOrigin, arrNormal)
End If
End If