Hi,
look here:
http://www.opencascade.com/community/forum/thread_3173/
Best regards,
Commenter-1 Müller
Archived discussion
My apologies for the naive question, but simply put : How may I move a selected object within AIS? Specifically, what is the best method for implementing a "click and drag" function to allow simple interactive movement of objects on the user's screen?
A snippet of code that I have currently been trying is:
V3d_Coordinate x0,y0,z0,x1,y1,z1;
gp_Trsf trsf;
...
trsf.SetTranslation(gp_Pnt(x0,y0,z0), gp_Pnt(x1,y1,z1));
for(CurrentIC->InitCurrent();CurrentIC->MoreCurrent();CurrentIC->NextCurrent()){
Handle(AIS_Shape) m_hSelected=new AIS_Shape(CurrentIC->SelectedShape());
BRepBuilderAPI_Transform myTrsf(m_hSelected->Shape(),trsf,Standard_False);
TopoDS_Shape aShape= myTrsf.Shape();
m_hSelected->Set(aShape);
CurrentIC->Display(m_hSelected);
}
But this merely creates replicas of the moving object, rather than moving the original object.
Thanks for the help.
A.T.
Discussion
Posts are displayed in their archived order.
Hi,
look here:
http://www.opencascade.com/community/forum/thread_3173/
Best regards,
Commenter-1 Müller