![]() |
【转帖】oo Many Oddbpoint During An Impor
too many oddbpoint during an import
too many oddbpoint during an import i'm importing a dwg file and i'm getting too many oddbpoint objects to display. sometimes, i see that they should be there. i.e. when i open the dwg in our project or in autocad, both show the points. other points that come in the dump from the database should not be displayed. i.e. they do not show when i open the dwg in autocad, but they still show up in the dump from the database. does anyone know of a way to distinguish between the points that should be displayed and the ones that shouldn't? i tried ppoint->visibility() but that shows visible for all points. here's the beginning of the code to give you an idea of the import and what to call everything. class oddbpoint_dumper : public oddbentity_dumper { public: void dump( oddbentity *pent, int indent ) const { try { oddbpointptr ppoint = pent; are the extra points visible in odamfcapp sample? where are a number of possible reasons why entities may be not displayed: -they are on invisible or frozen layer -they are inside a block and block reference has spatial clip -they are outside of viewport -they are inside a block which is not inserted (no block reference exists) - ... sergey slezkin not much help but here's what i have so far // open model viewport table oddbviewporttableptr pvpt = pent->database( )->getviewporttableid( ).safeopenobject( oddb::kforread ); // open active model viewport oddbviewporttablerecordptr pvptr = pvpt->getactiveviewportid( ).safeopenobject( ); odgeextents3d extents; odgepoint3d zposition( ppoint->position( ) ); if ( eok == pvptr->getgeomextents( extents ) ) { if ( !extents.contains( zposition ) ) return; } getgeomextents always returns einvalidextents, hence this code is wrong somehow. the next code looks ok but fails to catch any points and i can't figure how to see if the layer if invisible from the oddblayertablerecord class. oddblayertablerecordptr player = pent->layerid( ).safeopenobject( ); if ( player->isfrozen( ) /* or invisible */ ) return; i don't understand what "inside a block and block reference has spatial clip" or "inside a block which is not inserted (no block reference exists)" means or how to question it of my point. i'll email you the part, can't share it here since it's proprietary. |
所有的时间均为北京时间。 现在的时间是 06:32 AM. |