1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAlgoAPI_PointBuilder.h
4 // Created: 02 Jun 2014
5 // Author: Mikhail PONIKAROV
7 #ifndef GeomAlgoAPI_PointBuilder_H_
8 #define GeomAlgoAPI_PointBuilder_H_
10 #include <GeomAlgoAPI.h>
19 /// \class GeomAlgoAPI_PointBuilder
21 /// \brief Allows to create vertex-shapes by different parameters
22 class GEOMALGOAPI_EXPORT GeomAlgoAPI_PointBuilder
25 /// Creates a vertex by point
26 static std::shared_ptr<GeomAPI_Vertex> vertex(const std::shared_ptr<GeomAPI_Pnt> thePoint);
28 /// Creates a vertex by point coordinates
29 static std::shared_ptr<GeomAPI_Vertex> vertex(const double theX,
33 /// \brief Creates vertex by edge and distance on it.
34 /// \param[in] theEdge edge.
35 /// \param[in] theValue distance value.
36 /// \param[in] theIsPercent if true theValue will be treated as a percentage of theEdge total length.
37 /// \param[in] theIsReverse if true the distance will be measured from the edge end point.
38 /// \return created vertex.
39 static std::shared_ptr<GeomAPI_Vertex> vertexOnEdge(const std::shared_ptr<GeomAPI_Edge> theEdge,
40 const double theValue,
41 const bool theIsPercent = false,
42 const bool theIsReverse = false);
44 /// \brief Creates vertex by projection another vertex on plane.
45 /// \param[in] theVertex vertex to project.
46 /// \param[in] thePlane face for projection. Should be planar.
47 /// \return created vertex.
48 static std::shared_ptr<GeomAPI_Vertex> vertexByProjection(const std::shared_ptr<GeomAPI_Vertex> theVertex,
49 const std::shared_ptr<GeomAPI_Face> thePlane);
51 /// \brief Creates vertex by intersection two coplanar lines.
52 /// \param[in] theEdge1 first linear edge.
53 /// \param[in] theEdge2 second linear edge.
54 /// \return created vertex.
55 static std::shared_ptr<GeomAPI_Vertex> vertexByIntersection(const std::shared_ptr<GeomAPI_Edge> theEdge1,
56 const std::shared_ptr<GeomAPI_Edge> theEdge2);
58 /// Return point by shape vertex
59 static std::shared_ptr<GeomAPI_Pnt> point(const std::shared_ptr<GeomAPI_Shape> theVertex);