You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Does not appear to handle chained transformations correctly #185
Oh I see what I did. I wasn't thinking of it as a tree. I had imagined that calling translate with a rotation argument would result in a callable that performs both operations and that if I called that operation on a sphere it would do both. What it actually does is to build a tree from the translation object with two children that are processed separately.
The code I was looking for was:
s.translate([-4, 0, 8])(
s.rotate([0, 20 + 9, 10])(
s.scale([1, 2, 0.5])(
s.sphere(r=10))))
Where every subsequent call creates a single branch from its predecessor.
Activity
jeff-dh commentedon Sep 19, 2021
Take a closer look at the parenthesis of your second code snippet.
I only reformated it:
And that's exactly the code (at least exp)Solid generates:
charlieb commentedon Sep 19, 2021
Oh I see what I did. I wasn't thinking of it as a tree. I had imagined that calling translate with a rotation argument would result in a callable that performs both operations and that if I called that operation on a sphere it would do both. What it actually does is to build a tree from the translation object with two children that are processed separately.
The code I was looking for was:
s.translate([-4, 0, 8])(
s.rotate([0, 20 + 9, 10])(
s.scale([1, 2, 0.5])(
s.sphere(r=10))))
Where every subsequent call creates a single branch from its predecessor.