-
Notifications
You must be signed in to change notification settings - Fork 178
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
Please add some multi-transform examples to the documentation #186
Comments
From the look of #185, it seems like you had some different expectations about how composed transformations would work. I think that SolidPython & OpenSCAD process those nested transformations identically. Can you think of a minimal example that would have made this more clear to you? I don’t think I quite understand the ambiguity you’d been seeing.
… On Sep 19, 2021, at 9:29 AM, Charlie Burrows ***@***.***> wrote:
There are no examples in the documentation of situations where you want to chain several transformations together e.g. s.translate([-4, 0, 8])(
s.rotate([0, 20 + 9, 10])(
s.scale([1, 2, 0.5])(
s.sphere(r=10))))
I think it would be instructive to have an example showing the correct way to do this.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#186>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAEWGLNQJAAI7K22QEQMATLUCXXWDANCNFSM5EKMVJUQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I don't disagree with you about the semantics. I've personally never used a construction where you have a simple transformation with a {} block after it in OpenSCAD so I guess it's no surprise that I don't expect it in python either. I've been missing a trick. What I expected from this code:
is that t would be a callable that would rotate then translate its argument. All that aside, I wouldn't have had to try come to any conclusions if there were examples the covered chained transformations. In fact I couldn't find any examples to follow that had more than a single transform applied to an object. I think if I had been able to find a simple example of chained transforms all this unpleasantness would have been avoided. |
so in Openscad this would be :
(Because they follow each other we don't need any |
One could add an translation of the basic OpenSCAD Tutorial (https://en.wikibooks.org/wiki/OpenSCAD_Tutorial/Chapter_1#Completing_your_first_model) The exp solid branch contains an example like it but with a different focus (and syntax): The intention was to give an example how to assemble more complex models and I think that's what you're asking for, right? |
It doesn't have to be that much, like that's a long tutorial, but yes I'm essentially asking for a snippet that demonstrates a few transforms in a chain. |
I thought about something like this:
This is "expSolid-Style" but should be easily translatable to Solid::master compatible code. |
So the code above, the dotted style won't build for me:
gives
That's a different issue (also no doubt my problem) but yes that instance of |
This is master compatible.... |
There are no examples in the documentation of situations where you want to chain several transformations together e.g.
I think it would be instructive to have an example showing the correct way to do this.
The text was updated successfully, but these errors were encountered: