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

yang686526 2009-05-04 07:43 PM

【转帖】dimensions wrong for some files with 2.7.1
 
dimensions wrong for some files with 2.7.1
dimensions wrong for some files with 2.7.1
for 3 of the dwf input files in our test suite, the dimensions reported by version 2.7.1 are reversed from the dimensions reported by previous versions of the libraries. the dimensions reported by the previous versions seem to be correct because they match the sheet size reported by audodesk design review.
we determine the dimensions as follows:
playout->getgeomextents(extents);
extmin = extents.minpoint();
extmax = extents.maxpoint();
pcadlayouts->width = extmax.x - extmin.x;
pcadlayouts->height = extmax.y - extmin.y;
the dimensions as reported by the previous versions of the library and version 2.7.1 are as follows
file name layout dimensions(library v2.6.1) dimensions(library v2.7.1)
blocksandtables d-size plot 36x24 24x36
asadvertisignsign model 44x34 34x44
canadiantireisometricview model 44x34 34x44
the files are attached.
attached files
hello, has anyone had a chance to look at this yet?
there is also paper orientation flag in the imported layout.
see oddbplotsettings:lotrotation()
some papers are not present in both portrait and landscape modes for dwf device.
vladimir
i am sorry but i do not understand your response.
i have changed nothing in my application except for using release 2.7.1 and i get reversed dimensions for the specified drawings. has something changed in the library that would cause this to happen? furthermore, it appears that the dimensions reported by the previous release were correct, so if something has changed, it appears to be an erroneous change.
are you suggesting that in order to determine the correct dimensions, we now have to do something with oddbplotsettings::plotrotation()? could you please explain exactly how i should use this and what i need to add to my application.
thank you.
when exporting layout to dwf, exporting application also takes into account layout plot rotation flag, by rotating paper, because that flag has no correspondence in dwf.
in some cases we cannot correctly restore rotation flag during import, because in the list of dwf papers (there is a list of predefined dwf papers) - both rotated an non-rotated papers are present. if, howewer, there is no corresponding paper in the list, but we can obtain one by rotating one of the available - it means that in the original dwg, plot rotation flag was not 0.
when that was not handled - incorrect paper might be selected for the imported file.
you should just take into account layout plotrotation() value after import.
(oddblayout inherits from oddbplotsettings)
vladimir
last edited by vkalinin; 24th february 2009 at 11:06 amfff">.


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