OOML icon indicating copy to clipboard operation
OOML copied to clipboard

Setting colour changes geometry

Open mox-mox opened this issue 5 years ago • 0 comments

Setting the colour of a component seems to reset its reference system. Consider the following example:

Component a(Cube(3,250,20));
a.color(1,0,0);
a.relRotate(0.0,0.0,40.0);
//a.color(1,0,0); // <-----= uncomment this line

Component b(a);
b.relTranslate(20,0,0);
b.color(0,1,0);

IndentWriter writer;
writer << a << b;

This gives me two parallel boards, with board b shifted somewhat along the X and Y axes (by 20 along the 40° line in the XY plane) as expected. If, however, I un-comment the marked line, board a's transformation matrix is reset. Thus, the second board (b) is shifted by 20 along the X axis. I am no expert, but to me, this looks like a bug.

Best regards, mox

mox-mox avatar Sep 20 '19 01:09 mox-mox