高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】scaling Block Reference With Non-uniform Scale
scaling block reference with non-uniform scale
scaling block reference with non-uniform scale
i need to scale block references with different x- and y-scaling values, but it doesn't seem to work. i use odgematrix3d and transformby. seems that block reference is not scaled at all, when it's opened to acad.
sample code:
oddbblockreferenceptr insert = oddbblockreference::createobject();
// . . .
odgepoint3d odinsertion = ...
odgematrix3d scalem = odgematrix3d::scaling(odgescale3d(2.0, 3.0, 1.0), odinsertion);
insert->transformby(scalem);
insert->setposition(odinsertion);
workaround is to create a new block, where entities are scaled, but that can create much larger files.
what's wrong ?
- jukkas
oddbblockrefernce can't be transformed by non-uniscale matrix and its transformby() returns ecannotscalenonuniformly.
but you can use:
oddbblockreference::setscalefactors(odgescale3d)
or
oddbblockrefernce::setblocktransform(odgematrix3d)
sergey slezkin
|