Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
 

how to get the shape in AIS_InteractiveContext

how to get the shape in AIS_InteractiveContext
WuXuan 2012/09/18 15:50
i want to get the shape when i click on the item of the treectrl. and the ais_shape will be hilight.

i try this:
AIS_ListOfInteractive aList;
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next())
{
     myAISContext->SetSelected(aListIterator.Value());
TopoDS_Shape S =myAISContext->SelectShape(); this step will have error.
}

what shall i do?
Dmitry Kidyaev 2012/09/21 23:38
1. To highlight I use hilight metohd.
2. To get the shape which corresponds to AIS_Shape. write ((AIS_shape*)aListIterator.Value())->Shape();     
WuXuan 2012/09/28 08:45
      thank
 
 
Latest news
  • OCCT Applications
  • Open CASCADE Technology 6.8.0 is available for download!
  • New features to enhance the development process

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map