XformWorldToScreen

Transforms a point from world coordinates to either client-area coordinates of the specified view or screen coordinates. The resulting coordinates are represented as a 2-D point.

Syntax

rhinoscriptsyntax.XformWorldToScreen (point, view=None, screen_coordinates=False)

rhinoscript.transformation.XformWorldToScreen (point, view=None, screen_coordinates=False)

Parameters

point

Required.  List of 3 numbers or Point3d.  A 3-D point in world coordinates.

view

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

screen_coordinates

Optional. Boolean. If omitted or False, the function returns the results as client-area coordinates of the specified view. If True, then the results are returned as screen coordinates.

Returns

Point2d

If screen_coordinates is omitted or False, a 2-D point in client-area coordinates if successful.

Point2d

If screen_coordinates is True, a 2-D point in screen coordinates if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

point = (0.0, 0.0, 0.0)

view = rs.CurrentView()

point2d = rs.XformWorldToScreen(point, view)

print point2d

Also See

XformScreenToWorld