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

yang686526 2009-05-07 05:13 PM

【转帖】ransforming Te
 
transforming text
transforming text
if i am transforming a piece of text by
pent->transformby(transform); // where pent is a text entity, then if i have a scale factor in the transformation matrix, the text doesn't seem to be transformed correctly. other entities such as lines appear to work correctly however.
in the big picture, i am importing the attached dwg file into my software, by reading the xref it contains. i get the transformation matrix of the xref and apply it to each entity in the xref block to get the new coords of the transformed entities. all the text is way out, but only when i apply a scale to the xref (in this case of 5). if it were 1, the text is positioned correctly.
any ideas?
attached files
text entity can be transformed only by uniscaled-ortho matrix.
scale (5,5,5) is ok but (5,5,1) is not.
text is not the only entity which can't be transformed by any matrix. so the status returned from transformby() must be checked.
btw, gettransformedcopy() is less difficult to please with the matrix passed.
where may be entities which can't be transformed at all (custom ones for example)


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