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

yang686526 2009-05-07 03:29 PM

【转帖】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


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