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()
Get the size of the view
Returns:
Type | Description |
---|---|
Vector2D
|
Size of the view |
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)
Get the world 3D point from a projection 2D point and a reference point
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pnt
|
Point2D
|
View Point |
required |
refPnt
|
Point3D
|
Reference point with the additional coordinate |
required |
Returns:
Type | Description |
---|---|
Point3D
|
World 3D point |
ViewPerpendicularToWorld(line3D, pnt)
Transform a view perpendicular point to a world perpendicular point
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line3D
|
Line3D
|
3D perpendicular line |
required |
pnt
|
Point3D
|
Reference point for the perpendicular |
required |
Returns:
Type | Description |
---|---|
Point3D
|
World perpendicular point |
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)
Transform a view point to a world point
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pnt
|
Point2D
|
View point |
required |
z
|
float
|
z-coordinate |
required |
Returns:
Type | Description |
---|---|
Point3D
|
World point |
ViewToWorldBaseZ(pnt, zWorld)
Transform a view point to a world point with resulting z-coordinate
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pnt
|
Point2D
|
View point |
required |
zWorld
|
float
|
Z-coordinate |
required |
Returns:
Type | Description |
---|---|
Point3D
|
World point with resulting z-coordinate |
ViewToWorldBaseZ0(pnt)
Transform a view point to a world point with resulting z-world = 0
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pnt
|
Point2D
|
View point |
required |
Returns:
Type | Description |
---|---|
Point3D
|
World point with z=0 |
ViewToWorldPlane(pnt, plane)
Transform the view point to a world plane
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pnt
|
Point2D
|
View point |
required |
plane
|
Plane3D
|
Plane |
required |
Returns:
Type | Description |
---|---|
Point3D
|
World point at the 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)
Transform the world point to a pixel point
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pnt
|
Point3D
|
World point |
required |
bBottomTop
|
bool
|
The y zero point is on the bottom of the screen: true/false |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Pixel point |
WorldToProjectionBase0
overload
WorldToProjectionBase0(pnt)
Get the world projection point with the base 0
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pnt
|
Point3D
|
World point |
required |
Returns:
Type | Description |
---|---|
Point3D
|
World projection point with the base 0 |
WorldToProjectionBase0(line)
Get the world projection line with the base 0
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line
|
Line3D
|
World coordinate line |
required |
Returns:
Type | Description |
---|---|
Line3D
|
World projection point with the base 0 |
WorldToView
overload
WorldToView(pnt)
Transform a world point to a view point
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pnt
|
Point3D
|
World point |
required |
Returns:
Type | Description |
---|---|
Point2D
|
View point |
WorldToView(pnt)
Transform a world point to a view point
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pnt
|
Point2D
|
World point |
required |
Returns:
Type | Description |
---|---|
Point2D
|
View point |
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)
Transform a 3D world line to a 2D view line
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line
|
Line3D
|
World line |
required |
Returns:
Type | Description |
---|---|
Line2D
|
View line |
WorldToView(line)
Transform a 2D world line to a 2D view line
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line
|
Line2D
|
World line |
required |
Returns:
Type | Description |
---|---|
Line2D
|
View 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)
Transform a world point to a view 3D point
If Z coordinate of returned view point is positive, then world point is before eye (i.e. is visible).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pnt
|
Point3D
|
World point |
required |
Returns:
Type | Description |
---|---|
Point3D
|
View point |
WorldToWorldPlane
overload
WorldToWorldPlane(pnt, plane)
Transform a world point to a plane point
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pnt
|
Point3D
|
World point |
required |
plane
|
Plane3D
|
Plane |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Plane point in world coordinates |
WorldToWorldPlane(line, plane)
Transform a world line to a plane line
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line
|
Line3D
|
World line |
required |
plane
|
Plane3D
|
Plane |
required |
Returns:
Type | Description |
---|---|
Line3D
|
Plane line in world coordinates |
__init__()
initialize