20 #ifndef ModelGeomAlgo_Point2D_H
21 #define ModelGeomAlgo_Point2D_H
23 #include "ModelGeomAlgo.h"
24 #include "ModelAPI_Feature.h"
50 static MODELGEOMALGO_EXPORT std::shared_ptr<GeomDataAPI_Point2D>
getPointOfRefAttr(
52 const std::string& theAttribute,
53 const std::string& theObjectFeatureKind =
"",
54 const std::string& theObjectFeatureAttribute =
"");
67 static MODELGEOMALGO_EXPORT
69 const std::string& theReferenceFeatureKind,
70 std::set<std::shared_ptr<GeomDataAPI_Point2D> >& theAttributes,
71 const std::string& theObjectFeatureKind =
"",
72 const std::string& theObjectFeatureAttribute =
"",
73 const bool isSkipFeatureAttributes =
true);
80 typedef std::map<std::shared_ptr<GeomAPI_Pnt>,
81 std::pair<std::list<std::shared_ptr<GeomDataAPI_Point2D> >,
84 static MODELGEOMALGO_EXPORT
void getPointsIntersectedShape(
85 const std::shared_ptr<ModelAPI_Feature>& theBaseFeature,
86 const std::list<std::shared_ptr<ModelAPI_Feature> >& theFeatures,
89 static MODELGEOMALGO_EXPORT std::list<std::shared_ptr<GeomAPI_Pnt> > getSetOfPntIntersectedShape(
90 const std::shared_ptr<ModelAPI_Feature>& theBaseFeature,
91 const std::list<std::shared_ptr<ModelAPI_Feature> >& theFeatures);
102 const std::shared_ptr<GeomAPI_Shape> theBaseShape,
103 const std::set<std::shared_ptr<GeomDataAPI_Point2D> >& theAttributes,
104 const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
105 const std::shared_ptr<GeomAPI_Dir>& theDirX,
106 const std::shared_ptr<GeomAPI_Dir>& theDirY,
118 const std::shared_ptr<GeomAPI_Shape> theBaseShape,
119 const std::set<std::shared_ptr<GeomDataAPI_Point2D> >& theAttributes,
120 const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
121 const std::shared_ptr<GeomAPI_Dir>& theDirX,
122 const std::shared_ptr<GeomAPI_Dir>& theDirY,
123 std::list<std::shared_ptr<GeomAPI_Pnt> >& thePoints,
124 std::map<std::shared_ptr<GeomDataAPI_Point2D>,
125 std::shared_ptr<GeomAPI_Pnt> >& theAttributeToPoint);
130 static MODELGEOMALGO_EXPORT
bool isPointOnEdge(
const std::shared_ptr<GeomAPI_Shape> theBaseShape,
131 const std::shared_ptr<GeomAPI_Pnt>& thePoint,
132 std::shared_ptr<GeomAPI_Pnt>& theProjectedPoint);
139 const std::shared_ptr<GeomAPI_Shape> theBaseShape,
140 const std::shared_ptr<GeomAPI_Pnt>& thePoint,
141 std::shared_ptr<GeomAPI_Pnt>& theProjectedPoint);
148 static MODELGEOMALGO_EXPORT std::string getPontAttributesInfo(
149 const std::shared_ptr<ModelAPI_Feature>& theFeature,
150 const std::set<std::shared_ptr<ModelAPI_Attribute> >& theAttributesOnly);
155 static MODELGEOMALGO_EXPORT std::string getPointAttributeInfo(
156 const std::shared_ptr<ModelAPI_Attribute>& theAttribute);
3D direction defined by three normalized coordinates
Definition: GeomAPI_Dir.h:34
3D point defined by three coordinates
Definition: GeomAPI_Pnt.h:38
Interface to the topological shape object.
Definition: GeomAPI_Shape.h:43
Attribute that contains 2D point coordinates.
Definition: GeomDataAPI_Point2D.h:37
Feature function that represents the particular functionality of this operation.
Definition: ModelAPI_Feature.h:41
Represents any object in the data model and in the object browser.
Definition: ModelAPI_Object.h:45
Definition: ModelGeomAlgo_Point2D.h:41
static bool isInnerPointOnEdge(const std::shared_ptr< GeomAPI_Shape > theBaseShape, const std::shared_ptr< GeomAPI_Pnt > &thePoint, std::shared_ptr< GeomAPI_Pnt > &theProjectedPoint)
Finds projected point to the given shape, which does not placed on the shape boundaries.
Definition: ModelGeomAlgo_Point2D.cpp:364
static 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 bool isSkipFeatureAttributes=true)
Fills container of point 2D attributes, which refer to the feature through the references features wi...
Definition: ModelGeomAlgo_Point2D.cpp:84
static void getPointsInsideShape_p(const std::shared_ptr< GeomAPI_Shape > theBaseShape, const std::set< std::shared_ptr< GeomDataAPI_Point2D > > &theAttributes, const std::shared_ptr< GeomAPI_Pnt > &theOrigin, const std::shared_ptr< GeomAPI_Dir > &theDirX, const std::shared_ptr< GeomAPI_Dir > &theDirY, std::list< std::shared_ptr< GeomAPI_Pnt > > &thePoints, std::map< std::shared_ptr< GeomDataAPI_Point2D >, std::shared_ptr< GeomAPI_Pnt > > &theAttributeToPoint)
Removes attributes which points are out of the base shape.
Definition: ModelGeomAlgo_Point2D.cpp:322
std::map< std::shared_ptr< GeomAPI_Pnt >, std::pair< std::list< std::shared_ptr< GeomDataAPI_Point2D > >, std::list< std::shared_ptr< ModelAPI_Object > > > > PointToRefsMap
Find points of intersection between the shape of the feature and all features in the sketch.
Definition: ModelGeomAlgo_Point2D.h:82
static bool isPointOnEdge(const std::shared_ptr< GeomAPI_Shape > theBaseShape, const std::shared_ptr< GeomAPI_Pnt > &thePoint, std::shared_ptr< GeomAPI_Pnt > &theProjectedPoint)
Finds projected point to the given shape line.
Definition: ModelGeomAlgo_Point2D.cpp:346
static void getPointsInsideShape(const std::shared_ptr< GeomAPI_Shape > theBaseShape, const std::set< std::shared_ptr< GeomDataAPI_Point2D > > &theAttributes, const std::shared_ptr< GeomAPI_Pnt > &theOrigin, const std::shared_ptr< GeomAPI_Dir > &theDirX, const std::shared_ptr< GeomAPI_Dir > &theDirY, PointToRefsMap &thePointToAttributeOrObject)
Removes attributes which points are out of the base shape.
Definition: ModelGeomAlgo_Point2D.cpp:280
static std::shared_ptr< GeomDataAPI_Point2D > getPointOfRefAttr(ModelAPI_Feature *theFeature, const std::string &theAttribute, const std::string &theObjectFeatureKind="", const std::string &theObjectFeatureAttribute="")
Searches Point2D attribute of reference of the attribute of given feature.
Definition: ModelGeomAlgo_Point2D.cpp:53