TA的每日心情 | 开心 昨天 06:36 |
---|
签到天数: 15 天 [LV.4]偶尔看看III
管理员
- 积分
- 1308
|
- static void test(void)
- {
- ads采用name ent;
- AcGePoint3d pickPt(0, 0, 0);
- if(acedEntSel(采用T("/n请选择圆、圆弧或椭圆对象:"), ent,
- asDblArray(pickPt)) != RTNORM)
- {
- return;
- }
- AcDbObjectId entId;
- acdbGetObjectId(entId, ent);
- AcDbEntity *pEnt;
- acdbOpenAcDbEntity(pEnt, entId, AcDb::kForWrite);
- pEnt->close();
- AcGePoint3dArray snapPts;
- AcDbIntArray geomIds;
- pEnt->getOsnapPoints(AcDb::kOsModeCen, 0, pickPt, pickPt,
- AcGeMatrix3d::kIdentity, snapPts, geomIds);
- for(int i = 0; i < snapPts.length(); i++)
- {
- acutPrintf(采用T("/n您点取的点是: %.4f, %.4f, %.4f"), pickPt.x,
- pickPt.y, pickPt.z );
- acutPrintf(采用T("/n您捕捉到的点是: %.4f, %.4f, %.4f"), snapPts[0].x,
- snapPts[0].y, snapPts[0].z );
- }
- }
复制代码 |
|