X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_PointBuilder.h;h=28703d91da9a85132f5277f91308e411b9661da4;hb=f0cec241aae9ca16d86e166f45cb5c4987d2c792;hp=64e479ce1cfbb300b3e16b840b43eadbaae788ba;hpb=3874b57fe5aba25ff5aee2a07654fc23c1ee8eb0;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_PointBuilder.h b/src/GeomAlgoAPI/GeomAlgoAPI_PointBuilder.h index 64e479ce1..28703d91d 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_PointBuilder.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_PointBuilder.h @@ -10,19 +10,60 @@ #include #include -class GeomAPI_Shape; +class GeomAPI_Edge; +class GeomAPI_Face; class GeomAPI_Pnt; +class GeomAPI_Shape; +class GeomAPI_Vertex; -/**\class GeomAlgoAPI_PointBuilder - * \ingroup DataAlgo - * \brief Allows to create face-shapes by different parameters - */ - +/// \class GeomAlgoAPI_PointBuilder +/// \ingroup DataAlgo +/// \brief Allows to create vertex-shapes by different parameters class GEOMALGOAPI_EXPORT GeomAlgoAPI_PointBuilder { - public: - /// Creates linear edge by two points - static std::shared_ptr point(std::shared_ptr thePoint); +public: + /// Creates a vertex by point + static std::shared_ptr vertex(const std::shared_ptr thePoint); + + /// Creates a vertex by point coordinates + static std::shared_ptr vertex(const double theX, + const double theY, + const double theZ); + + /// \brief Creates vertex by edge and distance on it. + /// \param[in] theEdge edge. + /// \param[in] theValue distance value. + /// \param[in] theIsPercent if true theValue will be treated as a percentage of theEdge total length. + /// \param[in] theIsReverse if true the distance will be measured from the edge end point. + /// \return created vertex. + static std::shared_ptr vertexOnEdge(const std::shared_ptr theEdge, + const double theValue, + const bool theIsPercent = false, + const bool theIsReverse = false); + + /// \brief Creates vertex by projection another vertex on plane. + /// \param[in] theVertex vertex to project. + /// \param[in] thePlane face for projection. Should be planar. + /// \return created vertex. + static std::shared_ptr vertexByProjection(const std::shared_ptr theVertex, + const std::shared_ptr thePlane); + + /// \brief Creates vertex by intersection two coplanar lines. + /// \param[in] theEdge1 first linear edge. + /// \param[in] theEdge2 second linear edge. + /// \return created vertex. + static std::shared_ptr vertexByIntersection(const std::shared_ptr theEdge1, + const std::shared_ptr theEdge2); + + /// \brief Creates vertex by intersection line and plane. + /// \param[in] theEdge linear edge. + /// \param[in] theFace planar face. + /// \return created vertex. + static std::shared_ptr vertexByIntersection(const std::shared_ptr theEdge, + const std::shared_ptr theFace); + + /// Return point by shape vertex + static std::shared_ptr point(const std::shared_ptr theVertex); }; #endif