高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】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
|