高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】how to use dwgdirect to retrieve geometry objects
how to use dwgdirect to retrieve geometry objects?
how to use dwgdirect to retrieve geometry objects?
hi,
i am newly client of dwgdirect. someone can tell me which class i must use to get all the geometry base class of a dwg file.
i mean :
for all line, get a line geometry and his atttributes ( color, type..)
for all polyline, get n vertex and theirs attributes..
....
i have parsed the exemple odreadex but the entity dump methode does not respond entirely my need.
i have to implement an import dwg in my application,so.
thanks.
mlp
hello -
if you go back to the readex example - take a look into the file exprotocolextension.cpp. in there you will find the instantiation of the following classes ...and many more ...
oddb2dpolylineptr
oddb3dpolylineptr
oddbpolyfacemeshptr
oddbblockreferenceptr
oddbminsertblockptr
oddbsplineptr
each of these encasulates the data you are seeking.
hi walt,
thanks for your rapid reponse, but as i said, this 'ptr is given in the exemple in the mecanism of entity dumper. and i constate that treat sequencially objects in the order they are created.
i mean that if i create 1 line, a polyline and next a line.
the dump mecanism will dump : line (1), a polyyline (2) and next a line (3). and i do not known how to get their attribute as color or type.
i want to implement an algorithm as below:
open a dwg file,
for each object type ( line, polyline,mesh, face,3d )
get n, a number of object type,
and finally:
a methode to retrieve data ( geometry and attribute ) of an n-th objet.
thanks more.
mlp
mlp
|