几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】conversion of proxy objects (http://www.dimcax.com/hust/showthread.php?t=15472)

yang686526 2009-05-04 06:11 PM

【转帖】conversion of proxy objects
 
conversion of proxy objects
conversion of proxy objects
hi,
i've used the dwgdirect example "odcopyex" to create a console project (vc++ 6.0) for win32. we use the dwgdirect/dwg toolkit only to convert dwg files to r14-dxf files which are then imported by our own filter.
is there a "simple" way to convert proxy objects to standard entities with dwgdirect?
any help is appreciated.
olaf kassner
if you mean how to convert oddbproxyentity to a set of entities like lines, arcs etc. you can you explode() or explodetoowner() methods.
limitations:
if proxy entity graphic representation is absent in file you'll get nothing.
if proxy entity graphic representation uses clip primitives you'll get wrong results (unclipped geometry).
sergey slezkin
dear sergey,
thanks for your answer!
is there a sample source code which demonstrates how to use oddbproxyentity::explode(), i.e. what to do between
"pdb = svcs.readfile( sourcefile );" and
"pdb->writefile( &fb, filetype, outver );"?
thank you!
olaf kassner
look into odamfcapp sample.
dwgview.cpp
cdwgview::onexplode() function
btw, i mentioned explodetoowner() function in previous post by mistake. i meant oddbentity::explodetoblock() function.
to perform the operation for all proxy entities in drawing you need to iterate through all blocks checking entity type and call explodetoblock() for all oddbproxyentities.
sergey slezkin


所有的时间均为北京时间。 现在的时间是 11:08 AM.