Method ToView
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
ToView(DxfViewport, GeoPoint2)
A point of model space in the coordinates of a viewport's view, as AutoCAD's display coordinates (TRANS 0 to 2): about the view's target and turned by its twist. Through a viewport twisted 30 degrees about the origin, (100, 0) is (86.603, 50).
public static GeoPoint2 ToView(DxfViewport viewport, GeoPoint2 model)
Parameters
viewportDxfViewportThe viewport.
modelGeoPoint2The point of model space.
Returns
- GeoPoint2
The point in the view's coordinates, where ViewCenter is given.
Exceptions
- ArgumentNullException
Thrown when the viewport is null.
ToView(DxfViewport, GeoPoint3)
A point of model space, height and all, in the coordinates of a viewport's view, as AutoCAD's display coordinates (TRANS 0 to 2): the point taken from the view's target, along the view's axes, then turned by its twist. Through a viewport looking from (1, -1, 1), the point (100, 0, 0) is (70.711, -40.825), (0, 0, 100) is (0, 81.650), and the depth, which is its third coordinate, is dropped. Through a plan it is the point of ToView(DxfViewport, GeoPoint2) whatever its height.
public static GeoPoint2 ToView(DxfViewport viewport, GeoPoint3 model)
Parameters
viewportDxfViewportThe viewport.
modelGeoPoint3The point of model space.
Returns
- GeoPoint2
The point in the view's coordinates, where ViewCenter is given.
Exceptions
- ArgumentNullException
Thrown when the viewport is null.