Point2D

The Point2D class is a data holder for a 2D point. The Point2D is internally represented by a x and y coordinate. The coordinate value unit is mm.

There are the following groups of member functions with some examples of use:

  • construct the point
    import NemAll_Python_Geometry as AllplanGeo
    
    point1 = AllplanGeo.Point2D()
    point2 = AllplanGeo.Point2D(1000, 2000)
    point3 = AllplanGeo.Point2D(point2)
    ...
    
  • set and get the coordinate values
    point1.X = 500
    point1.Y = point2.Y
    ...
    
  • changing the point by basic mathematical operations like +, -, * and /
    point4 = point2 + point3
    point2 -= point3
    point5 = point3 / 2
    ...
    
  • comparing points
    if point2 == point3:
       ...
    ...
    
  • general point utilities like get distance, …
    dist = point2.GetDistance(point3)
    ...
    
The Point2DList class is a special list for Point2D objects and can be used like
point_list = AllplanGeo.Point2DList()
point_list.append(point1)
point_list.append(point2)
point_list.append(point3)

The complete documentation of the members from the Point2D and Point2DList class can be found here: