SHAPER  9.12.0
ModelGeomAlgo_Point2D Class Reference

Public Types

typedef 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. More...
 

Static Public Member Functions

static std::shared_ptr< GeomDataAPI_Point2DgetPointOfRefAttr (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. More...
 
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 with the given kind. More...
 
static void getPointsIntersectedShape (const std::shared_ptr< ModelAPI_Feature > &theBaseFeature, const std::list< std::shared_ptr< ModelAPI_Feature > > &theFeatures, PointToRefsMap &thePointToAttributeOrObject)
 
static std::list< std::shared_ptr< GeomAPI_Pnt > > getSetOfPntIntersectedShape (const std::shared_ptr< ModelAPI_Feature > &theBaseFeature, const std::list< std::shared_ptr< ModelAPI_Feature > > &theFeatures)
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Member Typedef Documentation

◆ PointToRefsMap

typedef std::map<std::shared_ptr<GeomAPI_Pnt>, std::pair<std::list<std::shared_ptr<GeomDataAPI_Point2D> >, std::list<std::shared_ptr<ModelAPI_Object> > > > ModelGeomAlgo_Point2D::PointToRefsMap

Find points of intersection between the shape of the feature and all features in the sketch.

Parameters
theBaseFeaturea feature: line, arc or circle that will be intersected
theFeaturesa container of features to intersect with the base feature
thePointsa container of 3D points belong to the shape
theObjectToPointa container of object to point

Member Function Documentation

◆ getPointOfRefAttr()

std::shared_ptr< GeomDataAPI_Point2D > ModelGeomAlgo_Point2D::getPointOfRefAttr ( ModelAPI_Feature theFeature,
const std::string &  theAttribute,
const std::string &  theObjectFeatureKind = "",
const std::string &  theObjectFeatureAttribute = "" 
)
static

Searches Point2D attribute of reference of the attribute of given feature.

Parameters
theFeaturea feature to obtain AttributeRefAttr
theAttributea name of AttributeRefAttr on the given feature
theObjectFeatureKinda feature kind in object of attribute that satisfies the search
theObjectFeatureAttributea feature attribute in object that satisfies the search
isSkipFeatureAttributesa boolean value if coincidences to the feature attributes
Returns
found point attribute or NULL

essential check as it is called in openGl thread

◆ getPointsOfReference()

void ModelGeomAlgo_Point2D::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 
)
static

Fills container of point 2D attributes, which refer to the feature through the references features with the given kind.

Parameters
theObjectan object where references should be searched (e.g. a sketch line or result)
theReferenceFeatureKinda kind of the feature to be processed (e.g. coincidence constraint)
theAttributesa container of found point 2D attributes
theObjectFeatureKinda feature kind in object of attribute that satisfies the search
theObjectFeatureAttributea feature attribute in object that satisfies the search
isSkipFeatureAttributesa boolean value if coincidences to the feature attributes should be skipped
Returns
found point attribute or NULL

◆ getPointsInsideShape()

void ModelGeomAlgo_Point2D::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 
)
static

Removes attributes which points are out of the base shape.

Parameters
theBaseShapea shape of check
theAttributesa container of point 2D attributes
theOriginorigin of a plane to generate 3D point by 2D attribute point
theDirXplane X direction to generate 3D point by 2D attribute point
theDirYplane X direction to generate 3D point by 2D attribute point
thePointsa container of 3D points belong to the shape
theAttributeToPointa container of attribute to point

◆ getPointsInsideShape_p()

void ModelGeomAlgo_Point2D::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 
)
static

Removes attributes which points are out of the base shape.

Parameters
theBaseShapea shape of check
theAttributesa container of point 2D attributes
theOriginorigin of a plane to generate 3D point by 2D attribute point
theDirXplane X direction to generate 3D point by 2D attribute point
theDirYplane X direction to generate 3D point by 2D attribute point
thePointsa container of 3D points belong to the shape
theAttributeToPointa container of attribute to point

◆ isPointOnEdge()

bool ModelGeomAlgo_Point2D::isPointOnEdge ( const std::shared_ptr< GeomAPI_Shape theBaseShape,
const std::shared_ptr< GeomAPI_Pnt > &  thePoint,
std::shared_ptr< GeomAPI_Pnt > &  theProjectedPoint 
)
static

Finds projected point to the given shape line.

Parameters
theBaseShapea shape of check
thePoint[in] a point to project
theProjectedPoint[out] a projected point

◆ isInnerPointOnEdge()

bool ModelGeomAlgo_Point2D::isInnerPointOnEdge ( const std::shared_ptr< GeomAPI_Shape theBaseShape,
const std::shared_ptr< GeomAPI_Pnt > &  thePoint,
std::shared_ptr< GeomAPI_Pnt > &  theProjectedPoint 
)
static

Finds projected point to the given shape, which does not placed on the shape boundaries.

Parameters
theBaseShapea shape of check
thePoint[in] a point to project
theProjectedPoint[out] a projected point