几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   ObjectARX(C++) (http://www.dimcax.com/hust/forumdisplay.php?f=34)
-   -   【转帖】[求助]请教acdbcurve::getpointatdist执行失败原因 (http://www.dimcax.com/hust/showthread.php?t=6928)

yang686526 2009-04-16 05:21 PM

【转帖】[求助]请教acdbcurve::getpointatdist执行失败原因
 
[求助]请教acdbcurve::getpointatdist执行失败原因
[求助]请教acdbcurve::getpointatdist执行失败原因
我在代码里面使用下面语句:
acad::errorstatus espoly = acad::eok ;
espoly = m_ppolyline->getpointatdist( dlength, ptpos ) ; //m_ppolyline为acdb2dpolyline类型
执行后espoly的值是-858993460,但是如果我在执行getpointatdist前加上下面一句:
espoly = m_ppolyline->getfirstderiv( ptpos, vtzdir ) ;
则getpointatdist执行又是成功的,espoly值为acad::eok,请问这是什么原因?
另外,
double dlength = 0.0 ;
acgepoint3d ptend ;
m_ppolyline->getendpoint( ptend ) ;
m_ppolyline->getdistatpoint( ptend, dlength ) ;
acgepoint3d pt ;
acad::errorstatus espoly = m_ppolyline->getpointatdist( ptend, dlength ) ;
这里espoly 为什么返回的是acad::einvalidinput?是不是因为精度原因?


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