Salome HOME
Preparations for Split operation. It includes:
[modules/shaper.git] / src / ModelGeomAlgo / ModelGeomAlgo_Point2D.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModelGeomAlgo_Point2D.h
4 // Created:     20 Jul 2016
5 // Author:      Natalia ERMOLAEVA
6
7 #ifndef ModelGeomAlgo_Point2D_H
8 #define ModelGeomAlgo_Point2D_H
9
10 #include "ModelGeomAlgo.h"
11
12 class ModelAPI_Feature;
13 class GeomAPI_Shape;
14 class GeomAPI_Pnt;
15 class GeomAPI_Dir;
16
17 class GeomDataAPI_Point2D;
18
19 #include <memory>
20 #include <set>
21
22
23 namespace ModelGeomAlgo_Point2D {
24
25   /// Searches Point2D attribute of reference of the attribute of given feature
26   /// \param theFeature a feature to obtain AttributeRefAttr
27   /// \param theAttribute a name of AttributeRefAttr on the given feature
28   /// \param theObjectFeatureKind a feature kind in object of attribute that satisfies the search
29   /// \param theObjectFeatureAttribute a feature attribute in object that satisfies the search
30   /// \returns found point attribute or NULL
31   MODELGEOMALGO_EXPORT std::shared_ptr<GeomDataAPI_Point2D> getPointOfRefAttr(
32                                                 ModelAPI_Feature* theFeature,
33                                                 const std::string& theAttribute,
34                                                 const std::string& theObjectFeatureKind = "",
35                                                 const std::string& theObjectFeatureAttribute = "");
36
37   /// Fills container of point 2D attributes, which refer to the feature through the references
38   /// features with the given kind
39   /// \param theFeature a feature where references should be searched (e.g. a sketch line)
40   /// \param theReferenceFeatureKind a kind of the feature to be processed (e.g. coincidence constraint)
41   /// \param theAttributes a container of found point 2D attributes
42   /// \param theObjectFeatureKind a feature kind in object of attribute that satisfies the search
43   /// \param theObjectFeatureAttribute a feature attribute in object that satisfies the search
44   /// \returns found point attribute or NULL
45   MODELGEOMALGO_EXPORT void getPointsOfReference(const std::shared_ptr<ModelAPI_Feature>& theFeature,
46                                           const std::string& theReferenceFeatureKind,
47                                           std::set<std::shared_ptr<GeomDataAPI_Point2D> >& theAttributes,
48                                           const std::string& theObjectFeatureKind = "",
49                                           const std::string& theObjectFeatureAttribute = "");
50
51   /// Removes attributes which points are out of the base shape
52   /// \param theBaseShape a shape of check
53   /// \param theAttributes a container of point 2D attributes
54   /// \param theOrigin origin of a plane to generate 3D point by 2D attribute point
55   /// \param theDirX plane X direction to generate 3D point by 2D attribute point
56   /// \param theDirY plane X direction to generate 3D point by 2D attribute point
57   /// \param thePoints a container of 3D points belong to the shape
58   MODELGEOMALGO_EXPORT void getPointsInsideShape(
59                               const std::shared_ptr<GeomAPI_Shape> theBaseShape,
60                               const std::set<std::shared_ptr<GeomDataAPI_Point2D> >& theAttributes,
61                               const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
62                               const std::shared_ptr<GeomAPI_Dir>& theDirX,
63                               const std::shared_ptr<GeomAPI_Dir>& theDirY,
64                               std::set<std::shared_ptr<GeomAPI_Pnt> >& thePoints);
65 }
66
67 #endif