![]() |
【转帖】explode dimension in block
explode dimension in block
explode dimension in block i tried to explode dimension in block. not correct coordinates of the exploded entity. i use dd 1.14.02. (1.13 no problem) code: oddbblockreference* pblk; ... odrxobjectptrarray ary; odresult err = pblk->explode( ary ); for( uint i=0; i<ary.size(); i++ ) { oddbentityptr pent = oddbentity::cast( ary.getat(i) ); if( pent->iskindof( oddbdimension::desc() ) ) { oddbdimensionptr pdim = pent; odrxobjectptrarray dary; for( uint j=0; j<dary.size(); j++ ) { oddbentityptr pdiment = oddbentity::cast( dary.getat(j) ); if( pdiment->iskindof( oddbline::desc() ) ) // first entity { oddblineptr pline = pdiment; odgepoint3d ttt = psrc->startpoint(); // this point ! ... } } } } oddbblockreference:: position() is not considered. return startpoint() x: 0 y: 0.625 (first point of first entity ) but dd 1.13 x: 500 y: 500.625 why? here a drawing with dimension example. attached files this is result of bug introduced in 1.14. as a workaround call recomputedimblock() before exploding the dimension: code: odrxobjectptrarray dary; pdim->recomputedimblock(); err = pdim->explode(dary); but note that recomputedimblock() will create a new anonymous block. sergey slezkin thank you. i wait for the next release. |
所有的时间均为北京时间。 现在的时间是 06:47 AM. |