chuyuan 发表于 2008-12-18 18:04:00

[求助]请教AcDbCurve::getPointAtDist执行失败原因

<p>我在代码里面使用下面语句:</p><p>Acad::ErrorStatus esPoly = Acad::eOk ;</p><p>esPoly = m_pPolyline-&gt;getPointAtDist( dLength, ptPos ) ; //m_pPolyline为AcDb2dPolyline类型</p><p>执行后esPoly的值是-858993460,但是如果我在执行getPointAtDist前加上下面一句:</p><p>esPoly = m_pPolyline-&gt;getFirstDeriv( ptPos, vtZDir ) ;</p><p>则getPointAtDist执行又是成功的,esPoly值为Acad::eOk,请问这是什么原因?</p><p>另外,</p><p>&nbsp;&nbsp;&nbsp;double dLength = 0.0 ;<br/>&nbsp;&nbsp;&nbsp;AcGePoint3d ptEnd ;<br/>&nbsp;&nbsp;&nbsp;m_pPolyline-&gt;getEndPoint( ptEnd ) ;<br/>&nbsp;&nbsp;&nbsp;m_pPolyline-&gt;getDistAtPoint( ptEnd, dLength ) ;<br/>&nbsp;&nbsp;&nbsp;AcGePoint3d pt ;<br/>&nbsp;&nbsp;&nbsp;Acad::ErrorStatus esPoly = m_pPolyline-&gt;getPointAtDist( ptEnd, dLength ) ;<br/>这里esPoly 为什么返回的是Acad::eInvalidInput?是不是因为精度原因?</p><p><br/></p>
页: [1]
查看完整版本: [求助]请教AcDbCurve::getPointAtDist执行失败原因