查看单个帖子
旧 2009-05-04, 06:11 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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:nexplode() 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
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)