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

yang686526 2009-05-06 11:25 PM

【转帖】problem with oddbblockreference and scaling
 
problem with oddbblockreference and scaling
problem with oddbblockreference and scaling
i'm trying to scale a oddbblockreference with the function transformby(xform).
xform is filled with xform.settoscaling(odgescale3d(scalex, scaley, scalez))
i'm using version 1.14.05
the result is ok when scalex == scaley == scalez, but if one is different the result is that no scaling is done.
how can i get passed this problem?
jochem
hi,
oddbblockreference::transformby() throws ecannotscalenonuniform error when trying to scale non-uniform. i think non-uniform scaling is not supported with transformby() method for oddbblockreference.
i find oddbblockreference::setscalefactors() function useful for non-uniform scaling.i hope it works for your situation too.
good luck.
oddbblockrefernce::transformby() requires uniscale and ortho matrix.
you can use oddbblockreference::gettransformedcopy(), setblocktransform() or setscalefactors() but note that:
- not all blocks allow non-uniform scaling (see oddbblocktablerecord::blockscaling())
- setblocktransform() and setscalefactors() do not transform attributes attached to block reference and its xdata.
sergey slezkin


所有的时间均为北京时间。 现在的时间是 04:56 AM.