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

yang686526 2009-05-06 08:46 PM

【转帖】odgiextcalc
 
odgiextcalc
odgiextcalc
hi,
is there any way do ignore some kind of entities while computing extents using odgiextcalc? i've tried to override dodraw but it's not called. cextentscalc derives from odgiextcalc.
code:
odrxobjectimpl<cextentscalc> extcalc;
extcalc.setcontext(pdwgcontext);
extcalc.draw(pspace);
extcalc.getextents(extents);
tia
regards,
micha? ?liwka
quote:
originally posted by sliwka
hi,
is there any way do ignore some kind of entities while computing extents using odgiextcalc? i've tried to override dodraw but it's not called. cextentscalc derives from odgiextcalc.
code:
odrxobjectimpl<cextentscalc> extcalc;
extcalc.setcontext(pdwgcontext);
extcalc.draw(pspace);
extcalc.getextents(extents);
tia
regards,
michal sliwka
this message does not appear in my forum search result, so i post it again.
regards,
michal sliwka
this is implementation of odgiextcalc::draw
code:
void odgiextcalc::draw(const odgidrawable* pdrawable)
{
m_bboxset = false;
pdrawable->setattributes(this);
pdrawable->worlddraw(this);
m_bboxset = false;
}
it call worlddraw. worlddraw will call ::draw() inside and ....
so it seems that you should add check inside void odgiextcalc::draw(const odgidrawable* pdrawable), not inside dodraw.


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