![]() |
【转帖】determining extents when creating entities
determining extents when creating entities
determining extents when creating entities in the previous version, which i downloaded february 9, 2005, i was able to add extents for an entity using addblockext(). in 1.13, this method apparently does not exist. what is the recommended approach for determinig the extents of an individual entity? for the entire drawing? my previous code is: code: oddbblocktablerecordptr pblock = blockid_.saveopenobject (oddb::kforwrite); oddbcircleptr pcircle = oddbcircle::createobject(); pblock->appendoddbentity(pcircle); pcircle->setcenter(centerf); pcircle->setradius(radiusf); extents_.addblockext (pblock); thanks for any help. both oddbentity and oddbblocktablerecord have getgeomextents() method. oddbblocktablerecord::getgeomextents() iterates through entities so it's better to call it once after all entities are appended. if you want to perform zoom extents getgeomextents() is not the best way. some entities may have viewport-dependent geometry, in a viewport some entities may be invisible because their layer is frozen etc. oddbviewport, oddbviewporttablerecord, oddbviewtablerecord and odgsview have odabstractviewpe protocol extension which has methods viewextents(), zoomextents() to perform zoom extents in paper viewport (oddbviewport) or model viewport (oddbviewporttablerecord) its better to use odabstractviewpe::zoomextents(). sergey slezkin |
所有的时间均为北京时间。 现在的时间是 10:43 PM. |