Hi, where i can find a little sample of geometry creation by mouse-input (the function of all CAD's, ie: point'n'click then drag to get the circle....)?
now it is clear :) the problem is that the docs are very huge.. :) im reading them but i would like to have an idea of the "difficulty" of the opencascade package...
Sat, 08/18/2001 - 04:04
This pseudo code may help you.
//init ais Handle_AIS_InteractiveContext ctxt; Handle_V3d_Viewer viewer; Handle_V3d_View view; ...
//When click mouse Handle_AIS_MyObj =new AIS_MyObj(); ctxt->Display(AIS_MyObj); ...
//when mouse move int mx,my; //pixel coordinate double x,y //view coordinate view->Convert(mx,my,x,y) AIS_MyObj->DeformShape(x,y); ctxt->Redisplay(AIS_MyObj); ...
You must write your own 'Myobj' and implement 'DeformShape' member function. Be careful of graphic performance!
Sat, 08/18/2001 - 04:44
> You must write your own 'Myobj' and
> implement 'DeformShape' member function. Be
> careful of graphic performance!
thanx for the fast answer....
if i understood i create the object i want to create and then i "deform" it right?
but MyObj what is it? how i have to wriye it? is it like the "driver" in the OCAF sample?
Can i derive it from an existing class?
and to convert pixel in world coordinates?
Again thanx for the help!
Davide
Sat, 08/18/2001 - 06:42
No,No!!
'MyObj' is a class inherited from AIS_InteractiveObject. First,you had better read documents in OpenCascade .
Sat, 08/18/2001 - 16:56
now it is clear :) the problem is that the docs are very huge.. :) im reading them but i would like to have an idea of the "difficulty" of the opencascade package...
thanks for the help :)