Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting colour changes geometry #15

Open
mox-mox opened this issue Sep 20, 2019 · 0 comments
Open

Setting colour changes geometry #15

mox-mox opened this issue Sep 20, 2019 · 0 comments

Comments

@mox-mox
Copy link

mox-mox commented Sep 20, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant