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

yang686526 2009-05-07 06:20 PM

【转帖】vectorization Error For Entity Oddbsequenceen
 
vectorization error for entity: oddbsequenceend
vectorization error for entity: oddbsequenceend
hi,
i am using the following code to vectorize entities:
odprintconsolestring(l"%s\n", pent->isa()->name().c_str());
if (pent.isnull()) return -1;
if (pent->iskindof(oddbsequenceend::desc())) return -1;
odstaticrxobject<myrenderer> dv;
odstaticrxobject<odgicontextfordbdatabase> gicontext;
gicontext.setdatabase(pent->database());
dv.setdrawcontext(&dv);
dv.setcontext(&gicontext);
dv.output().setdestgeometry(dv);
dv.draw(pent);
when the entity is a acdbsequenceend the vectorization gives assertion fault in dbentity.cpp line 1773. therefore i added the check:
if (pent->iskindof(oddbsequenceend::desc())) return -1;
to overcome this problem. i realize the documentation states: "these entities have no associated geometries" but should it give this error?
this is an assert, not an error. it is there to warn anyone who might inadvertently call worlddraw of a non-graphical entity.
vladimir
thanks for the info. what is the best way to check if the entity graphical or non-graphical?
i don't know.
non graphical entity is an exception, and generally you should not want to vectorize one. (where did you get it at all?)
if the entity is database resident, you may check if it's owner is block table record, because an entity should reside in a block. the exceptions are acdbblockbegin and acdbblockend
vladimir


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