Point3D
Canonical path: NemAll_Python_Geometry.Point3D
Representation class for 3D point
GetCoords
GetCoords() -> tuple[float, float, float]
Get individual point coordinates
Returns:
-
float
–X coordinate
-
float
–Y coordinate
-
float
–Z coordinate
GetDistance
GetDistance(point: Point3D) -> float
Calculate the distance between this and a given point
Parameters:
-
point
(Point3D
) –given point
Returns:
-
float
–Distance from this point to given point
Examples:
IsZero
Set
overloaded
Values
__add__
overloaded
Point translation by point
Formula: Point(new) = Point(this) + Point
This is not standard math operation and is implemented only as practical use case for point moving in %Allplan. In this case given operand point represent offset from Zero point. For standard move operation please use Service::Move method with Vector3D operand.
Parameters:
-
point
(Point3D
) –Point.
Returns:
-
Point3D
–Point.
Examples:
__eq__
__eq__(point: Point3D) -> bool
Comparison of points without tolerance.
Be careful, this method work without tolerance!
Parameters:
-
point
(Point3D
) –Compared point.
Returns:
-
bool
–True when points are equal, otherwise false.
__iadd__
In-place point translation by a point
This is not standard math operation and is implemented only as practical use case for point moving in Allplan. In this case given operand point represent offset from Zero point. For standard move operation please use Move method with Vector3D operand.
Parameters:
-
point
(Point3D
) –Point.
Returns:
-
Point3D
–Point.
Examples:
__idiv__
__idiv__(divider: float) -> Point3D
In-place division operator for a division by a scalar.
Parameters:
-
divider
(float
) –Divider.
Returns:
-
Point3D
–Point.
Examples:
__init__
overloaded
__init__(point: Point3D)
__init__(point: Point2D)
Initialize from a 2D point
The Z-coordinate is set to 0
Parameters:
-
point
(Point2D
) –2D Point which will be copied to the 3D point.
Examples:
Initialize from individual X,Y and Z coordinates in a global coordinate system
Parameters:
-
x
(float
) –X coordinate of point
-
y
(float
) –Y coordinate of point
-
z
(float
) –Z coordinate of point
__isub__
In-place negative point translation by a point
This is not standard math operation and is implemented only as practical use case for point moving in Allplan. In this case given operand point represent offset from Zero point. For standard move operation please use Move method with Vector3D operand.
Parameters:
-
point
(Point3D
) –Point.
Returns:
-
Point3D
–Point.
Examples:
__mul__
overloaded
__mul__(scale: float) -> Point3D
Scale point with a factor
Parameters:
-
scale
(float
) –scaling factor
Returns:
-
Point3D
–scaled Point
Examples:
__ne__
__ne__(point: Point3D) -> bool
Comparison of points without tolerance.
Be careful, this method work without tolerance!
Parameters:
-
point
(Point3D
) –Compared point.
Returns:
-
bool
–True when points are not equal, otherwise false.
__sub__
overloaded
Point translation by negative point
Formula: Point(new) = Point(this) - Point
This is not standard math operation and is implemented only as practical use case for point moving in %Allplan. In this case given operand point represent offset from Zero point. For standard move operation please use Service::Move method with Vector3D operand.
Parameters:
-
point
(Point3D
) –Point3D.
Returns:
-
Point3D
–Point.
Examples: