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

yang686526 2009-05-06 05:15 PM

【转帖】loading paper space entities
 
loading paper space entities
loading paper space entities
hello,
when loading a dwg/dxf file, i would like to load the paper space entities in such a way that their coordinates line up with the model space entities. searching through this forum, it looks like i need to construct a transform matrix from the viewports that are associated with the paper space blocks, and transform each paper space entity using that matrix. (i found the code to make the matrix from an oddbviewport object. thank you to the people who posted this code.)
my questions are:
1) is my basic premise correct (that i need to construct a matrix from the viewports, etc.)? if not, then how does this work?
2) it appears that each paper space block contains two viewport objects. do i need to make a matrix for each one, then transform each entity using both matrices? do i just use the first one?
cheers,
bob
one of oddbviewport entities on ps is overall viewport containing viewing information for ps entities.
other oddbviewports display ms entities.
where may be any number of ms viewports in paper space displaying different views of ms (left, front, top, isometric etc.)
it's impossible to convert ps entities into ms coordinates in general case.
sergey slezkin


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