1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAPI_Pnt.hxx
4 // Created: 23 Apr 2014
5 // Author: Mikhail PONIKAROV
10 #include <GeomAPI_Interface.h>
20 * \brief 3D point defined by three coordinates
23 class GeomAPI_Pnt : public GeomAPI_Interface
26 /// Creation of point by coordinates
28 GeomAPI_Pnt(const double theX, const double theY, const double theZ);
29 /// Creation of point by coordinates
31 GeomAPI_Pnt(const std::shared_ptr<GeomAPI_XYZ>& theCoords);
33 /// returns X coordinate
36 /// returns Y coordinate
39 /// returns Z coordinate
45 void setX(const double theX);
48 void setY(const double theY);
51 void setZ(const double theZ);
53 /// returns coordinates of the point
55 const std::shared_ptr<GeomAPI_XYZ> xyz();
57 /// Distance between two points
59 double distance(const std::shared_ptr<GeomAPI_Pnt>& theOther) const;
61 /// Returns whether the distance between two points is less then precision confusion
63 bool isEqual(const std::shared_ptr<GeomAPI_Pnt>& theOther) const;
65 /// Projects a point to the plane defined by the origin and 2 axes vectors in this plane
67 std::shared_ptr<GeomAPI_Pnt2d> to2D(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
68 const std::shared_ptr<GeomAPI_Dir>& theDirX,
69 const std::shared_ptr<GeomAPI_Dir>& theDirY);
71 /// Projects a point to the plane defined by the origin and 2 axes vectors in this plane
73 std::shared_ptr<GeomAPI_Pnt2d> to2D(const std::shared_ptr<GeomAPI_Pln>& thePln) const;
75 /// Translates the point along direction theDir on distance theDist
77 void translate(const std::shared_ptr<GeomAPI_Dir>& theDir, double theDist);