![]() |
【转帖】axonometric projection
axonometric projection
axonometric projection i'm trying to apply an axonometric projection matrix, in 2d, to a block using setblocktransform, but i can't make it work. what should i do to make it work ? - jukkas i'm not sure i understand your problem... if you want to project a block on plane using oddbblockreference::setblocktransform() note that scale of block reference must not have zero component. sergey slezkin axonometric projection perhaps i should have said that i'm trying to mofidy a block reference ? i tried this: odgematrix3d xform; xform(0,0) = 0.7071; xform(1,0) = 0.0; xform(2,0) = 0.7071; xform(3,0) = 0.0; xform(0,1) = 0.4082; xform(1,1) = 0.8166; xform(2,1) = -0.4082; xform(3,1) = 0; xform(0,2) = 0.0; xform(1,2) = 0.0; xform(2,2) = 0.0; xform(3,2) = 0.0; xform(0,3) = 0.0; xform(1,3) = 0.0; xform(2,3) = 0.0; xform(3,3) = 1.0; oddbblockreferenceptr insert = oddbblockreference::createobject(); insert->setblocktransform(xform); the matrix produces one kind of isometric projection (sample matrix is taken from ). but matrix does not seem to have any effect on the resulting block reference. the matrix we use is even simpler, (1.0, 0.7071, 0.0, 0.0 0.0, 0.7071, 0.0, 0.0 0.0, 0.0, 0.0, 0.0 0.0, 0.0, 0.0, 1.0) but it has no effect etiher. when using simple matrixes, like translation and rotating, and setblocktransform, there's no problem what so ever. - jukka oddbblockreference actually stores (in dwg file) not transformation matrix but position (insertion point), normal vector, scale factors, and rotation angle. not any matrix can be decomposed into these values. in your case oddbblockreference::setblocktransform() returns ecannotscalenonortho result. sergey slezkin |
所有的时间均为北京时间。 现在的时间是 08:17 PM. |