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

yang686526 2009-05-05 11:21 AM

【转帖】getecs90
 
getecs()
getecs()
hi, i have a drawing that contains inserts with non-standard extrusions but the getecs() function always returns an identity matrix. is there another way to get the extrusion of an entity?

to get wcs to ocs transformation matrix use
odgematrix3d::wordtoplane(normal)
to get ocs to wcs -
odgematrix3d: lanetoworld(normal)
oddbblockreference has method blocktransform() which returns matrix composed of translation, rotation, scaling and normal (extrusion) direction - everything except block base point.
sergey slezkin
blocktransform
hi, i have used blocktransform() to find world coordinates, i made also a translation with position(), but it seems the transformation is incomplete, i suspect i should make another translation (maybe due to scale or rotation reference point)
thanks in advance
blocktransform matrix includes position(), rotation(), scale() and normal(). no need in processing them separately. if block's base point is non-zero it should be taken into consideration:
base point translation should be applied first.
note that if you have nested blocks you need to apply all blocktransforms() - use transformation stack.
sergey slezkin
thanks
it works!!!
thanks for such a quick answer.
my problem was that i was using the transposed matrix...


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