Salome HOME
Different salome launchers for release and debug version (for proper environment).
[modules/shaper.git] / src / ModelGeomAlgo / ModelGeomAlgo_Point2D.h
index b70ef961e3a62e19ff9dc97a94368d9fb2098252..7f1e89bdf0c03e6266e41b1db7582667cac04e9a 100755 (executable)
@@ -8,6 +8,7 @@
 #define ModelGeomAlgo_Point2D_H
 
 #include "ModelGeomAlgo.h"
+#include "ModelAPI_Feature.h"
 
 class ModelAPI_Feature;
 class ModelAPI_Object;
@@ -20,6 +21,7 @@ class GeomDataAPI_Point2D;
 #include <memory>
 #include <string>
 #include <set>
+#include <map>
 
 
 namespace ModelGeomAlgo_Point2D {
@@ -29,12 +31,13 @@ namespace ModelGeomAlgo_Point2D {
   /// \param theAttribute a name of AttributeRefAttr on the given feature
   /// \param theObjectFeatureKind a feature kind in object of attribute that satisfies the search
   /// \param theObjectFeatureAttribute a feature attribute in object that satisfies the search
+  /// \param isSkipFeatureAttributes a boolean value if coincidences to the feature attributes
   /// \returns found point attribute or NULL
   MODELGEOMALGO_EXPORT std::shared_ptr<GeomDataAPI_Point2D> getPointOfRefAttr(
-                                                ModelAPI_Feature* theFeature,
-                                                const std::string& theAttribute,
-                                                const std::string& theObjectFeatureKind = "",
-                                                const std::string& theObjectFeatureAttribute = "");
+                        ModelAPI_Feature* theFeature,
+                        const std::string& theAttribute,
+                        const std::string& theObjectFeatureKind = "",
+                        const std::string& theObjectFeatureAttribute = "");
 
   /// Fills container of point 2D attributes, which refer to the feature through the references
   /// features with the given kind
@@ -43,12 +46,15 @@ namespace ModelGeomAlgo_Point2D {
   /// \param theAttributes a container of found point 2D attributes
   /// \param theObjectFeatureKind a feature kind in object of attribute that satisfies the search
   /// \param theObjectFeatureAttribute a feature attribute in object that satisfies the search
+  /// \param isSkipFeatureAttributes a boolean value if coincidences to the feature attributes
+  /// should be skipped
   /// \returns found point attribute or NULL
   MODELGEOMALGO_EXPORT void getPointsOfReference(const std::shared_ptr<ModelAPI_Object>& theObject,
                                           const std::string& theReferenceFeatureKind,
                                           std::set<std::shared_ptr<GeomDataAPI_Point2D> >& theAttributes,
                                           const std::string& theObjectFeatureKind = "",
-                                          const std::string& theObjectFeatureAttribute = "");
+                                          const std::string& theObjectFeatureAttribute = "",
+                                          const bool isSkipFeatureAttributes = true);
 
   /// Removes attributes which points are out of the base shape
   /// \param theBaseShape a shape of check
@@ -63,7 +69,9 @@ namespace ModelGeomAlgo_Point2D {
                               const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
                               const std::shared_ptr<GeomAPI_Dir>& theDirX,
                               const std::shared_ptr<GeomAPI_Dir>& theDirY,
-                              std::set<std::shared_ptr<GeomAPI_Pnt> >& thePoints);
+                              std::list<std::shared_ptr<GeomAPI_Pnt> >& thePoints,
+                              std::map<std::shared_ptr<GeomDataAPI_Point2D>,
+                                       std::shared_ptr<GeomAPI_Pnt> >& theAttributeToPoint);
 
   /// Finds projected point to the given shape line
   /// \param theBaseShape a shape of check
@@ -72,6 +80,21 @@ namespace ModelGeomAlgo_Point2D {
   MODELGEOMALGO_EXPORT bool isPointOnEdge(const std::shared_ptr<GeomAPI_Shape> theBaseShape,
                                           const std::shared_ptr<GeomAPI_Pnt>& thePoint,
                                           std::shared_ptr<GeomAPI_Pnt>& theProjectedPoint);
+
+  /// Return feature name, kind and point values united in a string info
+  /// \param theFeature an investigated feature
+  /// \param theAttributesOnly a container of necessary attributes, if empty, all
+  /// \return string value
+  MODELGEOMALGO_EXPORT std::string getPontAttributesInfo(
+                           const std::shared_ptr<ModelAPI_Feature>& theFeature,
+                           const std::set<std::shared_ptr<ModelAPI_Attribute> >& theAttributesOnly);
+
+  /// Return point attribute string info
+  /// \param theAttribute an investigated attribute
+  /// \return string value
+  MODELGEOMALGO_EXPORT std::string getPointAttributeInfo(
+                                  const std::shared_ptr<ModelAPI_Attribute>& theAttribute);
+
 }
 
 #endif