1 // Copyright (C) 2020-2021 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef GeomAlgoAPI_Fillet1D_H_
21 #define GeomAlgoAPI_Fillet1D_H_
23 #include <GeomAlgoAPI.h>
24 #include <GeomAlgoAPI_MakeShape.h>
26 #include <GeomAPI_Shape.h>
28 /// \class GeomAlgoAPI_Fillet1D
30 /// \brief Perform fillet on vertices of a wire
31 class GeomAlgoAPI_Fillet1D : public GeomAlgoAPI_MakeShape
33 typedef std::map<GeomShapePtr, ListOfShape, GeomAPI_Shape::Comparator> MapModified;
36 /// Run fillet operation on a set of vertices with fixed radius.
37 /// \param theBaseWire a changing Wire
38 /// \param theFilletVertices list of edges the fillet is performed on
39 /// \param theFilletRadius radius of the fillet
40 GEOMALGOAPI_EXPORT GeomAlgoAPI_Fillet1D(const GeomShapePtr& theBaseWire,
41 const ListOfShape& theFilletVertices,
42 const double theFilletRadius);
44 /// \return the list of shapes generated from the shape \a theShape.
45 /// \param[in] theOldShape base shape.
46 /// \param[out] theNewShapes shapes generated from \a theShape. Does not cleared!
47 GEOMALGOAPI_EXPORT virtual void generated(const GeomShapePtr theOldShape,
48 ListOfShape& theNewShapes);
50 /// \return the list of shapes modified from the shape \a theShape.
51 /// \param[in] theOldShape base shape.
52 /// \param[out] theNewShapes shapes modified from \a theShape. Does not cleared!
53 GEOMALGOAPI_EXPORT virtual void modified(const GeomShapePtr theOldShape,
54 ListOfShape& theNewShapes);
56 /// \return List of failed vertices
57 const ListOfShape& failedVertices() const { return myFailedVertices; }
60 /// Perform 1d-fillet on wire
61 /// \param theBaseWire a changing wire
62 /// \param theFilletVertices list of vertices of filler
63 /// \param theRadius fillet radius
64 void build(const GeomShapePtr& theBaseWire,
65 const ListOfShape& theFilletVertices,
66 const double theRadius);
69 MapModified myGenerated;
70 MapModified myModified;
72 ListOfShape myFailedVertices;