几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】explode dimension in block (http://www.dimcax.com/hust/showthread.php?t=16170)

yang686526 2009-05-05 10:06 AM

【转帖】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.