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

yang686526 2009-05-06 11:33 PM

【转帖】problem with rotateddimension
 
problem with rotateddimension
problem with rotateddimension
i'm trying to export dimensions and i'm having a problem with rotated dimensions.
i've simplified the problem down to the following: if "type" is linearaligned, the code works, however if not (the else clause), the program crashes on the closing brace ("}") - i assume in one of the destructors...
surely i'm doing something obvious wrong - please tell me what it is.
if (type == linearaligned)
{
oddbaligneddimensionptr paligneddimension = oddbaligneddimension::createobject ();
// open the block to which new entities will be added.
oddbblocktablerecordptr pblock = blockid.safeopenobject (oddb::kforwrite);
pblock->appendoddbentity (paligneddimension);
}
else
{
oddbrotateddimensionptr protateddimension = oddbrotateddimension::createobject ();
// open the block to which new entities will be added.
oddbblocktablerecordptr pblock = blockid.safeopenobject (oddb::kforwrite);
pblock->appendoddbentity (protateddimension);
}
smart pointer destructor activated dimension "close" operation. at this moment dimension block is created. this operation crashes because you have not set dimension points specifying extension and dimension lines - they all are (0,0,0).
sergey slezkin


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