高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】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.
|