#define ModelGeomAlgo_Point2D_H
#include "ModelGeomAlgo.h"
+#include "ModelAPI_Feature.h"
class ModelAPI_Feature;
class ModelAPI_Object;
#include <memory>
#include <string>
#include <set>
+#include <map>
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
/// \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
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
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