class Point2D¶
- class NemAll_Python_Geometry.Point2D¶
Representation class for 2D point
- GetCoords() Tuple[float, float] ¶
Get copy of X,Y coordinates.
- Returns:
tuple(X coordinate of point,
     Y coordinate of point)
- IsZero() bool ¶
Check the coords [0.0,0.0].
If the coords are zero, the return value is true. If the coords aren’t zero, the return value is false.
- Returns:
bool.
- Set(...)¶
-
- Set(x: float, y: float) None ¶
Initialize from x,y coordinates.
- Args:
x:  coordinate.
y:  coordinate.
- SetX(x: float) None ¶
Set the coordinate.
- Args:
x:  coordinate.
- SetY(y: float) None ¶
Set the coordinate.
- Args:
y:  coordinate.
- Values() list(double] ¶
Get copy of X,Y coordinates as python list.
- Returns:
X coordinate of point.,
Y coordinate of point.
- __add__(...)¶
- __add__(point: Point2D) Point2D ¶
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 Vector2D operand.
- Args:
point:  Point.
- Returns:
Point.
- __eq__(point: Point2D) bool ¶
Comparison of points without tolerance.
Be careful, this method work without tolerance!
- Args:
point:  Compared point.
- Returns:
True when points are equal, otherwise false.
- __iadd__(point: Point2D) Point2D ¶
Point translation by point.
Formula: Point(this) = 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 Vector2D operand.
- Args:
point:  Point.
- Returns:
Point.
- __idiv__(divider: float) Point2D ¶
Divide operator.
- Formula:
Point(this).X = Point(this).X / divider Point(this).Y = Point(this).Y / divider
This method is checked and throwing Geometry::Exception when divider is zero.
- Args:
divider:  Divider.
- Returns:
Point.
- __init__(...)¶
- __init__() None ¶
- __init__(point: Point3D) None ¶
Explicit copy constructor.
Copy only X_COORD and Y_COORD from point
- Args:
point:  3D Point which will be copied to the 2D point.
- __init__(refPoint: Point2D, point: Point2D) None ¶
Constructor.
Initialize point from point in local coordinate system. Formula: Result = refPoint + point
- Args:
refPoint:  Reference point.
point:     Relative point.
- __init__(x: float, y: float) None ¶
Constructor.
Initialize point from single coordinates in world coordinate system.
- Args:
x:  X coordinate of point.
y:  Y coordinate of point.
- __isub__(point: Point2D) Point2D ¶
Point translation by negative point
Formula: Point(this) = 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 Vector2D operand.
- Args:
point:  Point.
- Returns:
Point.
- __mul__(matrix: Matrix2D) Point2D ¶
Matrix transformation.
Result = Point * matrix
- Args:
matrix:  Transformation Matrix.
- Returns:
Point.
- __ne__(point: Point2D) bool ¶
Comparison of points without tolerance.
Be careful, this method works without tolerance!
- Args:
point:  Compared point.
- Returns:
True when points are not equal, otherwise false.
- __repr__() str ¶
Convert to string
- __sub__(...)¶
- __sub__(vec: Vector2D) Point2D ¶
Move the point by reversed vector
- Args:
vec:  Vector
- Returns:
New point
- __sub__(point: Point2D) Point2D ¶
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 Vector2D operand.
- Args:
point:  Point.
- Returns:
Point.
- __truediv__(divider: float) Point2D ¶
Divide operator.
- Formula:
Point(new).X = Point(this).X / divider Point(new).Y = Point(this).Y / divider
- Args:
divider:  Divider.
- Returns:
Point.
- property X: float¶
Get the x coordinate.
Set the coordinate.
- property Y: float¶
Get the y coordinate.
Set the coordinate.
- __module__ = 'NemAll_Python_Geometry'¶