How to select object one by one

Hello,
I'm trying to write codes to realize boolean operations among objects. I could create objects, the problem is how to select those created objects one by one, such that I could do boolean operation next.
Could anyone give me any advices? Thanks in advance for your kind help!
Helen

nido_de's picture

Are there anyone who could help me out? Thanks.

heXus's picture

// Handle(AIS_InteractiveContext) myAISContext;

void MyCanvas::ShiftSelectObject ( const Standard_Integer flag)
{
// flag == 1 button down
// flag == 0 move

if (flag == 0)
myAISContext->ShiftSelect(myXmin, myYmin, xMouse, yMouse, cView);

if (flag == 1)
myAISContext->ShiftSelect();
}

void MyCanvas::SelectObject(const Standard_Integer flag)
{

// flag == 1 button down
// flag == 0 move

if (flag == 0)
myAISContext->Select(myXmin, myYmin, xMouse, yMouse, cView);

if (flag == 1)
myAISContext->Select();
}

Then you can retrieve selected objects from "myAISContext", or you can copy each selected object and then use boolean operations.

nido_de's picture

Thank you for ur suggestion.
I'll try to work it out!