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

yang686526 2009-05-07 05:43 PM

【转帖】uninitialized Values Passed To Circleproc90
 
uninitialized values passed to circleproc()
uninitialized values passed to circleproc()
hi,
we are using dd libs 1.14.02.
for the attached r12 file, when we import "layout 1", the values passed for center and normal paramertes to one of the calls to my circleproc() by the vectorizor are what looks to be uninitialized.
here is a dump of the watch window from vc8.
code:
- center {korigin={...} x=-1.#ind000000000000 y=-1.#ind000000000000 ...} const odgepoint3d &
+ korigin {korigin={...} x=0.00000000000000000 y=0.00000000000000000 ...} odgepoint3d
x -1.#ind000000000000 double
y -1.#ind000000000000 double
z -1.#ind000000000000 double
radius 0.057718428674495441 double
- normal {kxaxis={...} kzaxis={...} x=-1.#ind000000000000 ...} const odgevector3d &
+ kxaxis {kxaxis={...} kzaxis={...} x=1.0000000000000000 ...} odgevector3d
+ kzaxis {kxaxis={...} kzaxis={...} x=0.00000000000000000 ...} odgevector3d
x -1.#ind000000000000 double
y -1.#ind000000000000 double
z -1.#ind000000000000 double
- pextrusion 0x00000000 {kxaxis={...} kzaxis={...} x=??? ...} const odgevector3d *
+ kxaxis {kxaxis={...} kzaxis={...} x=1.0000000000000000 ...} odgevector3d
+ kzaxis {kxaxis={...} kzaxis={...} x=0.00000000000000000 ...} odgevector3d
x cxx0030: error: expression cannot be evaluated
y cxx0030: error: expression cannot be evaluated
z cxx0030: error: expression cannot be evaluated
in circle import i call the perpvector() method which throws an invalid input exception with the following stack:
code:
kernel32.dll!7c81eb33()
[frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
kernel32.dll!7c81eb33()
...!odrefcounter::operator--() line 295 + 0x10 bytes c++
...!odrxobjectimpl<oddefaulterrorcontext,oddefaulterrorcontext>::release() + 0x37 bytes
...!odsmartptr<oddefaulterrorcontext>::release() + 0x20 bytes
e06d7363()
...!odgevector3d::normalize() + 0x37 bytes
...!odgevector3d::normal() + 0x21 bytes
...!odgevector3d::operator-=() + 0x87 bytes
...!odgevector3d::perpvector() + 0x1f bytes
...!ccircleimport::ccircleimport(const odgepoint3d & center={...}, double radius=0.057718428674495441, const odgevector3d & normal={...}, bool & outdosimplify=false) line 146 c++
...!exgssimpledevice::circleproc(const odgepoint3d & center={...}, double radius=0.057718428674495441, const odgevector3d & normal={...}, const odgevector3d * pextrusion=0x00000000) line 129 + 0x23 bytes c++
...!odgixformimpl::circleproc() + 0xf7 bytes
...!odgixformimpl::circleproc() + 0xf7 bytes
...!odgibasevectorizer::circle() + 0x83 bytes
...!oddbcircle::worlddraw() + 0x62 bytes
...!odgibasevectorizer::dodraw() + 0x1a bytes
...!odgsbasevectorizeview::dodraw() + 0x17 bytes
...!odgibasevectorizer::draw() + 0x31c bytes
...!exsimpleview::draw(const odgidrawable * pdrawable=0x22885598) line 598 c++
...!oddbblocktablerecord::worlddraw() + 0x1cc bytes
...!odgibasevectorizer::dodraw() + 0x1a bytes
...!odgsbasevectorizeview::dodraw() + 0x17 bytes
...!odgibasevectorizer::draw() + 0x31c bytes
...!exsimpleview::draw(const odgidrawable * pdrawable=0x16f49648) line 617 c++
...!odgsbasevectorizeview::display() + 0x1c3 bytes
...!odgsbasevectorizeview::update() + 0xe9 bytes
...!exsimpleview::update() line 644 c++
...!odgsbasevectorizedevice::update() + 0x6e bytes
...!exgssimpledevice::update(odgsdcrect * pupdatedrect=0x00000000) line 483 c++
...!odgspaperlayouthelperimpl::update() + 0xac7 bytes
the problem is happening with the xcode build as well.
when i save the file with autocad 2005 into autocad 2004 or 2000 file format and open the file, it imports without any problem.
can you guys help identify the problem?
thanks,
varun
attached files
hi,
any updates on this?
thanks,
varun
is it possible to reproduce the problem in any of our samples? odamfcapp seems to render the layout correctly.
probably you have not set up view properly.
sergey slezkin
hi sergey,
you were right! the setwidth() and setheight() of overallviewport were being called with zero values.
the values returned by getlimmin() and getlimmax() for this layout are zero. why does this happen for some files? and how can we find out the width and height of the paperspace layout correctly?
thanks,
varun
limmin - limmax can be set to zero even in autocad.
they simply store grid limits.
what do you mean by "width and height of the paperspace layout"?
- extents of paper space entities?
- size of paper?
- overall view (area visible on screen)?
they are different.
sergey slezkin
i was referring to the first one: extents of paper space entities. it would be very instructive to me if you could enumerate how to get all three of them.
thanks,
varun
hi,
now i am using oddbviewport::height() and oddbviewport::width() instead of limmin and limmax. however i am still confused over the following points:
1. what is zoomextents() supposed to do when called on a overall viewport of a paperspace layout?
2. comments above functions oddbviewport::height() and oddbviewport::width() say that the value returned must be divided by a factor of 1.058 for overall viewport. why is this? what does this new value signify?
thanks,
varun
last edited by varunsnair; 19th may 2006 at 07:31 amfff">.


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