View World Projection
Class full path: NemAll_Python_IFW_Input.ViewWorldProjection
Functions
CreateForUnitTest()
staticmethod
GetDocumentID()
Get the document ID
Returns:
Type | Description |
---|---|
int
|
Document ID |
GetEyePoint()
Get eye point of current projection
Eye point is point where camera is.
Returns:
Type | Description |
---|---|
Point3D
|
Eye point |
GetIsoProjection()
Get the isometric projection of the view
Returns:
Type | Description |
---|---|
eProjectionType
|
Isometric projection of the view |
GetMatrix()
Get the transformation matrix of the current projection
Returns:
Type | Description |
---|---|
Matrix3D
|
Transformation matrix |
GetPixelFactor()
Get factor of pixel to world coordinates
Used when you need calculate how much millimeters are one pixel
Returns:
Type | Description |
---|---|
float
|
Pixel factor in x direction, |
float
|
Pixel factor in y direction |
GetScreenScale()
Get the screen scale
Returns:
Type | Description |
---|---|
float
|
Screen scale |
GetSearchRadiusByPixel(pixel)
Get the search radius by pixel
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pixel
|
int
|
Pixel of the search radius |
required |
Returns:
Type | Description |
---|---|
float
|
Search radius in view size |
GetViewAngle()
Get the rotation angle of the view
Returns:
Type | Description |
---|---|
float
|
Rotation angle of the view |
GetViewPoint()
Get view point of current projection
View point is point where you are looking (focused). View point lie in plain of drawn data.
Returns:
Type | Description |
---|---|
Point3D
|
Eye point |
GetViewSize()
GetViewZAngle()
Get the rotation angle of the view in z-direction
Returns:
Type | Description |
---|---|
float
|
Rotation angle of the view in z-direction |
IsAssistWindow()
Check for assist window
Returns:
Type | Description |
---|---|
bool
|
The document is an assist window: true/false |
IsCentralProjection()
Check, whether the projection is a central projection
Returns:
Type | Description |
---|---|
bool
|
Central projection: true/false |
IsFreeProjection()
Check, whether the projection is a free projection
Returns:
Type | Description |
---|---|
bool
|
Projection is a free view: true/false |
IsGroundplanView()
Check, whether the projection is ground plan view
Returns:
Type | Description |
---|---|
bool
|
Projection is ground plan view: true/false |
IsInView(pnt)
Check, whether the point is inside the view
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pnt
|
Point2D
|
View point |
required |
Returns:
Type | Description |
---|---|
bool
|
Point is inside the view: true/false |
IsIsometricProjection()
Check, whether the projection is a isometric projection
Returns:
Type | Description |
---|---|
bool
|
Projection is a isometric projection: true/false |
IsSideView()
Check, whether the projection is a side view
Returns:
Type | Description |
---|---|
bool
|
Projection is a side view: true/false |
ProjectionToWorld(pnt, refPnt)
ViewPerpendicularToWorld(line3D, pnt)
ViewToPixel(pnt, bBottomTop, considerZoomwindow)
Transform a view point to a pixel coordinate
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pnt
|
Point2D
|
View point |
required |
bBottomTop
|
bool
|
The y zero point is on the bottom of the screen: true/false |
required |
considerZoomwindow
|
bool
|
if true and the position is in a zoom window, then the zoom window will be used for the calculation |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Pixel view point |
ViewToWorld(pnt, z)
ViewToWorldBaseZ(pnt, zWorld)
ViewToWorldBaseZ0(pnt)
ViewToWorldPlane(pnt, plane)
ViewToWorldRay(pnt)
Calculates a ray
Calculates a ray (for non-vanishing-point-projections, rather a line) from the given view 2D point. Can be used for pick-point calculations.
Note that we have a right-hand view coordinate system, so its Z axis points towards the eye.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pnt
|
Point2D
|
View point |
required |
Returns:
Type | Description |
---|---|
Point3D
|
World point of ray, |
Vector3D
|
Vector of calculated ray point |
WorldToPixel(pnt, bBottomTop)
WorldToProjectionBase0
overload
WorldToProjectionBase0(pnt)
WorldToView
overload
WorldToView(pnt)
WorldToView(pnt)
WorldToView(x, y, z)
Transform a world point to a view point
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x
|
float
|
X-coordinate world |
required |
y
|
float
|
Y-coordinate world |
required |
z
|
float
|
Z-coordinate world |
required |
Returns:
Type | Description |
---|---|
Point2D
|
View point |
WorldToView(line)
WorldToView(line)
WorldToView(polyline3D)
Transform a 3D world polyline to a 2D view polyline
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyline3D
|
Polyline3D
|
World polyline |
required |
Returns:
Type | Description |
---|---|
Polyline2D
|
View polyline |
WorldToView3D(pnt)
WorldToWorldPlane
overload
WorldToWorldPlane(pnt, plane)
__init__()
initialize