[求助]getOsnapPoin和explode函数怎么使用
各位大虾一定要帮忙啊,我的毕业设计中要用到这两个函数,急啊。<br/>1。PEnt->getOsnapPoin()函数怎么使用?怎么捕捉不到点阿?<br/> AcGePoint3dArray snapPoints;<br/> AcDbIntArray geomIds;<br/> AcGePoint3d pp;<br/> acedGetPoint(NULL,_T("选择附近点"),asDblArray(pp));<br/> <br/> Acad::ErrorStatus es = pEnt1->getOsnapPoints(AcDb::kOsModeCen, 0, pp, pp, AcGeMatrix3d::kIdentity, snapPoints, geomIds);<br/> for(int i = 0;i<snapPoints.length();i++)<br/> {<br/> acutPrintf(_T("\nthe point is %f,%f,%f/n"),snapPoints.x ,snapPoints.y,snapPoints.z );<br/> }<br/> pEnt1->close();<br/>运行没有结果,不知何故。<br/>我就是想得到捕捉的点坐标:(<br/>2。我想将一个块炸开,然后将炸开得到的实体中的直线获得。下面作怎么不行啊?<br/>if(pEnt1->isKindOf(AcDbBlockReference::desc()))<br/> { if (pEnt1->upgradeOpen()!=Acad::eOk)<br/> return;<br/> AcDbVoidPtrArray entitySet1;<br/> Acad::ErrorStatus es;<br/> es=AcDbBlockReference::cast(pEnt1)->explode(entitySet1);<br/> int i=entitySet1.length();<br/> <br/> acutPrintf(_T("number%d"), i);<br/>}<br/>怎么块不能分解呢?而且实体个数 i 没有数值显示。<br/>先谢谢各位了!帮帮我把。
页:
[1]