高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】strange Behaviour With Dwfimpor
strange behaviour with dwfimport
strange behaviour with dwfimport
hi,
i noticed a strange behaviour when importing a 3d dwf file into an oddbdatabase, using dd_dwf7import module. in autocad 2008, i just creates a tore on a yellow layer named 'torelayer' and i exports as a dwf.
as a result, i got the following model space (tried to represent a tree) :
model space
_include library_1
*u2
acdbpolyfacemesh
3
4
_include library_1
*u2
acdbpolyfacemesh
whereas the dwg model space looks like this :
model space
acdb3dsolid
as you can see, blockreference named _include library_1 is inserted 2 times in model space and nothing tells me that the first insertion is hidden or should not be constructed (or i missed something).
moreover, i think layers are lost with the import; the 'torelayer' is no more in the database (only the layer 0).
any thoughts on this ? am i doing something wrong ? are they some parameters i should put in the properties of oddwfimport ?
attached files
imported file shows 3d dwf structure, it is quite complex, and there is no round-trip info. (it's just not designed for it).
double insertion is a bug in dwf import - library block should be skipped.
(you may fix it yourself - in \imports\dwf7import\source\dwf7importimpl.cpp, 672 in line
code:
if (segname.left(17) != l"_include library_" || segname.left(15) != l"_style library_")|| condition is wrong, && should be used instead
code:
if (segname.left(17) != l"_include library_" && segname.left(15) != l"_style library_"))
layer info is lost in export. there is a convention in current version of autocad 3d dwf export, to group objects by layers, but these groups have no properties, and may be of various origin.
vladimir
thank you very much vladimir.
will this bug be fixed in the next maintenance release ?
of course it will.
vladimir
thanks vladimir
i have another question about this behaviour :
if i put the tore in a block named 'toreblock' and i put this block in the layer named 'torelayer', i got this tree in autodesk design review :
torelayer (1)
bloc - toreblock
but when i use dwf import, i got this tree :
3
4
_include library_1
*u2
acdbpolyfacemesh
why block names are lost ? is this during dwf import in database ? also, are names '3', '4', '*u2' in the dwf file itself ?
3d dwf is a set of nested segments. in import segments are converted to blocks, with the same names.
there is usually some metainformation in the file (put there by acad 3d dwf export), that gives legible names to segments.
currently we do not load this information from dwf. perhaps we should.
moreover - there are some naming conventions that current version of 3d export follow - that is - layers are exported as top level segments and preserve layer names, enities are nested segments. entities segments are given names of the entities types. block inserts are additionally given names of blocks.
this information may be interpreted to restore some of the original drawing structure, but i really doubt it to be worthwhile - these are just conventions - any other (quite valid) 3d dwf export may ignore them or invent its own.
vladimir
|