几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】rouble With 1.14 Setsnapincremen (http://www.dimcax.com/hust/showthread.php?t=18822)

yang686526 2009-05-07 05:19 PM

【转帖】rouble With 1.14 Setsnapincremen
 
trouble with 1.14 setsnapincrement
trouble with 1.14 setsnapincrement
i'm upgrading my program from 1.12 to 1.14, and a call to oddbviewport::setsnapincrement() that used to work is now throwing an exception:
stdmethodimp ccaddata::addviewport(double dllx, double dlly, double durx, double dury, double dviewcenterx, double dviewcentery, double dscale)
{
afx_manage_state(afxgetstaticmodulestate())
assert(!m_pdb.isnull());
oddbblocktablerecordptr pps = m_pdb->getpaperspaceid().safeopenobject(oddb::kforwrite) ;
oddbviewportptr pvp = oddbviewport::createobject();
pvp->setcenterpoint(odgepoint3d((durx+dllx)/2.0, (dury+dlly)/2.0, 0.0));
pvp->setwidth(durx-dllx);
pvp->setheight(dury-dlly);
pvp->setviewtarget(odgepoint3d(0.0, 0.0, 0.0));
pvp->setviewdirection(odgevector3d(0.0, 0.0, 1.0));
pvp->setviewheight(dscale);
pvp->setlenslength(50.0);
pvp->setviewcenter(odgepoint2d(dviewcenterx, dviewcentery));
pvp->setsnapincrement(odgevector2d(0.0, 0.5));
pvp->setgridincrement(odgevector2d(0.0, 0.5));
pvp->setcirclesides(oduint16(100));
pps->appendoddbentity(pvp);
return s_ok;
}
any idea why?
snap increment must be positive and non-zero.
sergey slezkin
last edited by mmuratov; 5th january 2006 at 07:37 amfff">.
thanks...
thanks... i pulled that line from an earlier version of examples\odwriteex\dbfiller.cpp. i see that the version 1.14 example has now changed.


所有的时间均为北京时间。 现在的时间是 11:52 PM.