-
Notifications
You must be signed in to change notification settings - Fork 136
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
Add a Mirror
command
#122
Add a Mirror
command
#122
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/zalo/cascade-studio/27syGMeef1UnQ4wRq2X9tJY49Qed |
Thanks for the PR! Looking at this thread, it seems like I have the wrong overload of the SetMirror transformation exposed… I’ll look into fixing that since I know funny things/edge cases can happen when solids are buried under too many transformations. (Due to the version of OCC in the main branch, only one overload of a function (per # of arguments) is exposed at a time; the embind branch fixes this at the cost of a bit of extra overhead) The build for that is happening here: |
Oh, I was wondering how that worked. I can reopen a new PR when that's changed, or update this one as you like. |
I just committed the new WASM and simplified mirroring function. For reference, how that works is I make a commit to this repo (an ancient fork of opencascade.js that I like because it's smallish, loads fastish, and doesn't mangle the names of the functions) and Github Actions commits the build products back into it: The latest OpenCascade.js integrates in this branch, and it handles all of the function overloads (at the cost of appending numbers to the function names). Either way, this PR is looking good now, so I'm merging it... |
Thank you! |
Adds a Mirror command.
I feel like this should be doable with a single transformation, but I could not manage to get
SetMirror
with gp_ax2 argument to actually mirror the shape, rather than creating a rotation.It looks like passing a single Point to SetMirror does work, but requires rotating, and reversing the faces afterward.
Example