X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_PointBuilder.h;h=fe2a56e1e2c5df350493c4900a9588325d3f8a08;hb=97917d3698f5a2f7fc9596e7c755ff8f6751e373;hp=906a2814febbc8effdf2e1f35109b3d6d0ccf5d2;hpb=98d0d390dac05b7764af10c723fd33f23665c207;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_PointBuilder.h b/src/GeomAlgoAPI/GeomAlgoAPI_PointBuilder.h index 906a2814f..fe2a56e1e 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_PointBuilder.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_PointBuilder.h @@ -1,8 +1,21 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -// File: GeomAlgoAPI_PointBuilder.h -// Created: 02 Jun 2014 -// Author: Mikhail PONIKAROV +// Copyright (C) 2014-2019 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// #ifndef GeomAlgoAPI_PointBuilder_H_ #define GeomAlgoAPI_PointBuilder_H_ @@ -33,7 +46,8 @@ public: /// \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] 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, @@ -41,12 +55,29 @@ public: const bool theIsPercent = false, const bool theIsReverse = false); + /// \brief Creates vertex by projection another vertex on edge. + /// \param[in] theVertex vertex to project. + /// \param[in] theEdge edge for projection. + /// \return created vertex. + static std::shared_ptr + vertexByProjection(const std::shared_ptr theVertex, + const std::shared_ptr theEdge); + /// \brief Creates vertex by projection another vertex on plane. /// \param[in] theVertex vertex to project. - /// \param[in] thePlane face for projection. Should be planar. + /// \param[in] theFace face for projection. Should be planar. + /// \return created vertex. + static std::shared_ptr + vertexByProjection(const std::shared_ptr theVertex, + const std::shared_ptr theFace); + + /// \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 vertexByProjection(const std::shared_ptr theVertex, - const std::shared_ptr thePlane); + static std::shared_ptr + vertexByIntersection(const std::shared_ptr theEdge1, + const std::shared_ptr theEdge2); /// Return point by shape vertex static std::shared_ptr point(const std::shared_ptr theVertex);