]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchAPI/SketchAPI_IntersectionPoint.h
Salome HOME
#18963 C++17 ready
[modules/shaper.git] / src / SketchAPI / SketchAPI_IntersectionPoint.h
1 // Copyright (C) 2014-2020  CEA/DEN, EDF R&D
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef SRC_SKETCHAPI_SKETCHAPI_INTERSECTIONPOINT_H_
21 #define SRC_SKETCHAPI_SKETCHAPI_INTERSECTIONPOINT_H_
22
23 //--------------------------------------------------------------------------------------
24 #include "SketchAPI.h"
25
26 #include <SketchPlugin_IntersectionPoint.h>
27
28 #include "SketchAPI_SketchEntity.h"
29 //--------------------------------------------------------------------------------------
30 class ModelHighAPI_Selection;
31 //--------------------------------------------------------------------------------------
32 /**\class SketchAPI_IntersectionPoint
33  * \ingroup CPPHighAPI
34  * \brief Interface for IntersectionPoint feature
35  */
36 class SketchAPI_IntersectionPoint : public SketchAPI_SketchEntity
37 {
38 public:
39   /// Constructor without values
40   SKETCHAPI_EXPORT
41   explicit SketchAPI_IntersectionPoint(const std::shared_ptr<ModelAPI_Feature> & theFeature);
42   /// Constructor with values
43   SKETCHAPI_EXPORT
44   SketchAPI_IntersectionPoint(const std::shared_ptr<ModelAPI_Feature> & theFeature,
45                  const ModelHighAPI_Selection & theExternal);
46   /// Constructor with values
47   SKETCHAPI_EXPORT
48   SketchAPI_IntersectionPoint(const std::shared_ptr<ModelAPI_Feature> & theFeature,
49                  const std::wstring & theExternalName);
50   /// Destructor
51   SKETCHAPI_EXPORT
52   virtual ~SketchAPI_IntersectionPoint();
53
54   INTERFACE_3(SketchPlugin_IntersectionPoint::ID(),
55               externalFeature, SketchPlugin_IntersectionPoint::EXTERNAL_FEATURE_ID(),
56               ModelAPI_AttributeSelection, /** External edge */,
57               external, SketchPlugin_IntersectionPoint::EXTERNAL_ID(),
58               ModelAPI_AttributeSelection, /** External */,
59               includeToResult, SketchPlugin_IntersectionPoint::INCLUDE_INTO_RESULT(),
60               ModelAPI_AttributeBoolean, /** Include into result */
61   )
62
63   /// Set by external
64   SKETCHAPI_EXPORT
65   void setByExternalEdge(const ModelHighAPI_Selection & theExternaEdge);
66
67   /// Set by external name
68   SKETCHAPI_EXPORT
69   void setByExternalEdgeName(const std::wstring & theExternalEdgeName);
70
71   /// Set flag to include projection to result or not
72   SKETCHAPI_EXPORT
73   void setIncludeToResult(bool theKeepResult);
74
75   /// Returns created intersection points
76   SKETCHAPI_EXPORT
77   std::list<std::shared_ptr<SketchAPI_SketchEntity> > intersectionPoints() const;
78
79   /// Dump wrapped feature
80   SKETCHAPI_EXPORT
81   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
82 };
83
84 //! Pointer on IntersectionPoint object
85 typedef std::shared_ptr<SketchAPI_IntersectionPoint> IntersectionPointPtr;
86
87 //--------------------------------------------------------------------------------------
88 //--------------------------------------------------------------------------------------
89 #endif /* SRC_SKETCHAPI_SKETCHAPI_INTERSECTIONPOINT_H_ */