几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   SolidWorks二次开发 (http://www.dimcax.com/hust/forumdisplay.php?f=111)
-   -   【转帖】dynamically change the view (http://www.dimcax.com/hust/showthread.php?t=4702)

yang686526 2009-04-12 08:45 PM

【转帖】dynamically change the view
 
dynamically change the view
hello everyone,
i'm presently working on a c# addin and i'm trying to dynamically move the view (called modelview i guess). i can't manage to obtain a fluid and nice result with the method i'm using now. here is what i'm doing :
doc = swapp.iactivedoc2;
view = doc.iactiveview;
view.enablegraphicsupdate = false;
view.translateby(tx, ty);
view.zoombyfactor(1 + tz);
view.rotateaboutcenter(rx, ry);
view.enablegraphicsupdate = true;
view.rollby(rz);
doc.windowredraw();
this method offers me the best framerate i could obtain for now. using doc.graphicsredraw2(); seems to be worse, but does not induce flickering of the menus due to the whole window refresh i guess.
have you got an idea of how i could get a better framerate as well as edge simplification that occurs when moving the view thanks to the standard middle mouse click ?
cheers,
edited: 03/03/2009 at 05:51 am by eric delattre
quick


所有的时间均为北京时间。 现在的时间是 06:34 AM.