ViewProjectionXform

Returns a view-based, 2-D projection transformation that will allow you to project geometry to the world x-y plane to make a 2-D drawing. The transformation matrix returned is similar the one used by Rhino's Make2D command.

Care must be taken when using transformation matrix returned by this function as input to either the TransformObject or TransformObjects methods, as not all 3-D geometry can be projected to 2-D without creating bad geometry. It is suggested that only point, point cloud and curve objects be used in this situation.

Syntax

Rhino.ViewProjectionXform ([strView])

Parameters

strView

Optional.  String.  The title or identifier of the view.  If omitted, the current active view is used.

Returns

Array

The 4x4 transformation matrix if successful.

Null

If not successful, or on error.

Example

Dim arrObjects, strView, arrXform

arrObjects = Rhino.GetObjects("Select curves to draw", 4, True, True)

If IsArray(arrObjects) Then

  strView = Rhino.CurrentView

  If Rhino.IsViewPerspective(strView) Then

    arrXform = Rhino.ViewProjectionXform(strView)

    Call Rhino.TransformObjects(arrObjects, arrXform, True)

  End If

End If

Also See

IsViewPerspective

ViewProjection