Point3D

The Point3D class is a data holder for a 2D point. The Point3D 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.Point3D()
    point2 = AllplanGeo.Point3D(1000, 2000, 3000)
    point3 = AllplanGeo.Point3D(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 Point3DList class is a special list for Point3D objects and can be used like
point_list = AllplanGeo.Point3DList()
point_list.append(point1)
point_list.append(point2)
point_list.append(point3)

The complete documentation of the members from the Point3D and Point3DList class can be found here: