
Wed, 07/13/2011 - 13:07
Forums:
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
Mon, 07/18/2011 - 06:38
Are there anyone who could help me out? Thanks.
Mon, 07/18/2011 - 09:53
// 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.
Mon, 07/18/2011 - 12:37
Thank you for ur suggestion.
I'll try to work it out!