AIS_ListOfInteractive aDisplayedList;
ic->DisplayedObjects( aDisplayedList );
- for ( AIS_ListIteratorOfListOfInteractive it( aDisplayedList ); it.More(); it.Next() )
- {
- Handle(AIS_InteractiveObject) anAIS = it.Value();
- if ( anAIS.IsNull() )
- continue;
- Handle(AIS_Point) anAISPoint = Handle(AIS_Point)::DownCast( anAIS );
- if ( anAISPoint.IsNull() )
- continue;
- TopoDS_Vertex aVertex = TopoDS::Vertex( anAISPoint->Vertex() );
+ SectionToPointList::const_iterator anIt = thePoints.begin(), aLast = thePoints.end();
+ SectionToPoint aSToPoint;
+ for( ; anIt != aLast; anIt++ ) {
+ aSToPoint = *anIt;
- if ( aVertex.IsNull() )
- continue;
+ for ( AIS_ListIteratorOfListOfInteractive it( aDisplayedList ); it.More(); it.Next() )
+ {
+ Handle(AIS_InteractiveObject) anAIS = it.Value();
+ if ( anAIS.IsNull() )
+ continue;
+ Handle(AIS_Point) anAISPoint = Handle(AIS_Point)::DownCast( anAIS );
+ if ( anAISPoint.IsNull() )
+ continue;
+
+ TopoDS_Vertex aVertex = TopoDS::Vertex( anAISPoint->Vertex() );
+
+ if ( aVertex.IsNull() )
+ continue;
- gp_Pnt aPnt = BRep_Tool::Pnt( aVertex );
+ gp_Pnt aPnt = BRep_Tool::Pnt( aVertex );
- SectionToPointList aPoints;
- findSectionsToPoints( aPnt.X(), aPnt.Y(), aPoints );
+ SectionToPointList aPoints;
+ findSectionsToPoints( aPnt.X(), aPnt.Y(), aPoints );
- SectionToPointList::const_iterator anIt = aPoints.begin(), aLast = aPoints.end();
- SectionToPoint aPoint;
- for ( ; anIt != aLast; anIt++ ) {
- aPoint = *anIt;
- if ( contains( thePoints, aPoint ) )
- aListToSelect.Append( anAIS );
+ SectionToPointList::const_iterator anIt = aPoints.begin(), aLast = aPoints.end();
+ SectionToPoint aPoint;
+ for ( ; anIt != aLast; anIt++ ) {
+ aPoint = *anIt;
+ if ( aPoint.first == aSToPoint.first && aPoint.second == aSToPoint.second )
+ aListToSelect.Append( anAIS );
+ }
}
}