Тема: вопрос по getOsnapPoints
Изучаю как работает сабж для entity. вот код:
AcDbObjectId createLine()
{
AcGePoint3d startPt(4.0, 2.0, 0.0);
AcGePoint3d endPt(100.0, 100.0, 0.0);
AcDbLine *pLine = new AcDbLine(startPt, endPt);
AcDbBlockTable *pBlockTable;
acdbHostApplicationServices()->workingDatabase()
->getSymbolTable(pBlockTable, AcDb::kForRead);
AcDbBlockTableRecord *pBlockTableRecord;
pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord,
AcDb::kForWrite);
pBlockTable->close();
AcDbObjectId lineId;
pBlockTableRecord->appendAcDbEntity(lineId, pLine);
pBlockTableRecord->close();
pLine->close();
return lineId ;
}
void osnapline()
{
AcGePoint3d lastPoint,pickPoint,Pt(90.0, 10.0, 0.0);
AcGeMatrix3d mat;mat.setToIdentity();
AcGePoint3dArray pSnaps;
AcDbEntity* pEnt = NULL;
AcDbIntArray gomIDs;
pickPoint = Pt;
lastPoint = pickPoint;
AcDbObjectId id = createLine();
acdbOpenAcDbEntity(pEnt,id,AcDb::kForRead);
pEnt->getOsnapPoints(AcDb::kOsModeEnd,0,pickPoint,lastPoint,mat,pSnaps,gomIDs);
for (int i=0; i< pSnaps.length(); i++) {
acutPrintf(_T("\np[%d]=(%g,%g,%g)"),i+1,pSnaps[i][X],pSnaps[i][Y],pSnaps[i][Z]);
}
pEnt->close();
}
The pickPoint argument provides the point (in WCS coordinates) that started this osnap operation. Вот это не совсем понимаю. Какой смысл у pickPoint?