高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】vectorization And Scaling Problems
vectorization and scaling problems
vectorization and scaling problems
dd_1.14.02_lnxx86_gcc4.
i have two drawings that were originally drawn on 8.5x11 inch paper.
one we drawn under acad 2006 from a r14 template (this matters because
that means that there is no papersize). the other was drawn in 92, i suspect under r9.
using the code from odvectorizeex as a starting basis, the first driswing is
too small. i find that i have to premultiply the onsize rectangle by 1.65 to get it to the expected size. ok, weird, and there is presumably a better way, but i can live with that.
but the second drawing is not vectorizing in a reasonable way. it looks to be centered, but is way too large. it looks to be centered, but looks to be roughly twice as large as expected, and is cropped as a result.
any suggestions on how to handle this?
is there a well-known recipe that will build a transfomation matrix that
will generate lower left corner (0,0) and upper right hand corner (612, 792) [assuming aspect ration is right]?
thanks
jim penny
i ended up simply taking two passes at the drawing. pass 0 simply captures the (lower-left, upper-right) corners of the generated data.
pass 1 uses the corners and the desired plot size to do translation and scaling directly.
this is inefficient and shows a deep lack of understanding on my part. it is, however, precise and easy to control.
note that all view-related classes (oddbviewtablerecord, oddbviewporttablerecord, oddbviewport, gsview) have abstractviewpe protocol extension which has viewextents() and zoomextents() methods.
sergey slezkin
|