- {
- std::set<std::shared_ptr<GeomDataAPI_Point2D> >::const_iterator anIt = theAttributes.begin(),
- aLast = theAttributes.end();
- for (; anIt != aLast; anIt++) {
- std::shared_ptr<GeomDataAPI_Point2D> anAttribute = *anIt;
- std::shared_ptr<GeomAPI_Pnt2d> aPnt2d = anAttribute->pnt();
- std::shared_ptr<GeomAPI_Pnt> aPoint = aPnt2d->to3D(theOrigin, theDirX, theDirY);
- std::shared_ptr<GeomAPI_Pnt> aProjectedPoint;
- if (isPointOnEdge(theBaseShape, aPoint, aProjectedPoint)) {
- if (thePointToAttributeOrObject.find(aProjectedPoint) != thePointToAttributeOrObject.end())
- thePointToAttributeOrObject.at(aProjectedPoint).first.push_back(anAttribute);
- else {
- //std::list< std::shared_ptr<GeomDataAPI_Point2D> > anAttributes;
- //anAttributes.push_back(anAttribute);
- //thePointToAttributeOrObject.insert(aProjectedPoint, anAttributes);
-
- std::list<std::shared_ptr<GeomDataAPI_Point2D> > anAttributes;
- std::list<std::shared_ptr<ModelAPI_Object> > anObjects;
- anAttributes.push_back(anAttribute);
- thePointToAttributeOrObject[aProjectedPoint] = std::make_pair(anAttributes, anObjects);
- }
- //thePoints.push_back(aProjectedPoint);
- //theAttributeToPoint[anAttribute] = aProjectedPoint;
+{
+#ifdef DEBUG_POINT_INSIDE_SHAPE
+ std::cout << "ModelGeomAlgo_Point2D::getPointsInsideShape:" << std::endl;
+#endif
+ std::set<std::shared_ptr<GeomDataAPI_Point2D> >::const_iterator anIt = theAttributes.begin(),
+ aLast = theAttributes.end();
+ for (; anIt != aLast; anIt++) {
+ std::shared_ptr<GeomDataAPI_Point2D> anAttribute = *anIt;
+ std::shared_ptr<GeomAPI_Pnt2d> aPnt2d = anAttribute->pnt();
+ std::shared_ptr<GeomAPI_Pnt> aPoint = aPnt2d->to3D(theOrigin, theDirX, theDirY);
+ std::shared_ptr<GeomAPI_Pnt> aProjectedPoint;
+ if (isInnerPointOnEdge(theBaseShape, aPoint, aProjectedPoint)) {
+ if (thePointToAttributeOrObject.find(aProjectedPoint) != thePointToAttributeOrObject.end())
+ thePointToAttributeOrObject.at(aProjectedPoint).first.push_back(anAttribute);
+ else {
+ std::list<std::shared_ptr<GeomDataAPI_Point2D> > anAttributes;
+ std::list<std::shared_ptr<ModelAPI_Object> > anObjects;
+ anAttributes.push_back(anAttribute);
+ thePointToAttributeOrObject[aProjectedPoint] = std::make_pair(anAttributes, anObjects);