Point2D
Canonical path: NemAll_Python_Geometry.Point2D
Representation class for 2D point
GetCoords
GetCoords() -> tuple[float, float]
Get individual point coordinates
Returns:
-
float
–X coordinate
-
float
–Y coordinate
GetDistance
GetDistance(point: Point2D) -> float
Calculate the distance between this and a given point, according to the formula:
Parameters:
-
point
(Point2D
) –given point
Returns:
-
float
–Distance from this point to given point
Examples:
IsZero
Set
overloaded
Values
__add__
overloaded
__eq__
__eq__(point: Point2D) -> bool
Comparison of points without tolerance.
Be careful, this method work without tolerance!
Parameters:
-
point
(Point2D
) –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 Vector2D operand.
Parameters:
-
point
(Point2D
) –Point.
Returns:
-
Point2D
–Reference to point.
Examples:
__init__
overloaded
Initialize
__init__(point: Point2D)
__init__(point: Point3D)
Explicit copy constructor.
Copy only X_COORD and Y_COORD from point
Parameters:
-
point
(Point3D
) –3D Point which will be copied to the 2D point.
Constructor.
Initialize point from single coordinates in world coordinate system.
Parameters:
-
x
(float
) –X coordinate of point.
-
y
(float
) –Y 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 Vector2D operand.
Parameters:
-
point
(Point2D
) –Point.
Returns:
-
Point2D
–Reference to point.
Examples:
__itruediv__
__itruediv__(divider: float) -> Point2D
In-place division operator for a division by a scalar.
Parameters:
-
divider
(float
) –Divider.
Returns:
-
Point2D
–Point.
Examples:
__mul__
__ne__
__ne__(point: Point2D) -> bool
Comparison of points without tolerance.
Be careful, this method works without tolerance!
Parameters:
-
point
(Point2D
) –Compared point.
Returns:
-
bool
–True when points are not equal, otherwise false.