-
Notifications
You must be signed in to change notification settings - Fork 84
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
Getting Face UVBounds #21
Comments
Hi, this is one of the limitations coming from the differences of how JavaScript and C++ work. The C++ function In my understanding, there is currently no way to achieve this without modifying the OpenCascade API (with some Getter functions) and recompiling the library against this change. A change can be applied as a patch, so that there is a chance that it won't break with new releases of OpenCascade. There are already some similar patches in the 1.1.1 version of OpenCascade.js, like this one. I will open an issue in the Emscripten repository and ask if someone has a better workaround for this issue. If not, I will create the patch, which will then become part of the upcoming 2.0 release. |
Thank you for the explanation and for looking into it! There's no urgency, and it's super nice that it will be addressed in 2.0. Also nice to know that there are ways to patch these things, I hope Emscripten team will have some ideas as well ;) Your answer definitely saves me from banging against the wall. I suspected that there's something different about this one. Otherwise opencascade.js works amazing so far... Have to integrate few more basic features and will ship first experimental release. |
Very happy to hear that 🙂! |
Have a look at this post with an example on how to achieve this using a custom build. |
Hey guys, I'm trying to get UVBounds of the face. OCC documentation method is in occ.BRepTools.UVBounds_1.
https://dev.opencascade.org/doc/refman/html/class_b_rep_tools.html#a2223e42bb10997431eb16296ae740ea4
Method writes to passed Umin, Umax, Vmin and Vmax Standard_Real references, I'm a bit lost how to call this from javascript.
I saw that Standard_Real is defined in TKernel, but the closest I could find in occ.js was TDataStd_Real, not sure what's the difference. I tried smth like this with no success:
TypeError: Cannot convert "[object Object]" to double
I sort of get that, but yeah, double is not even a thing in javascript anyway ;)
Anything else gives
RuntimeError: call_indirect to a signature that does not match (evaluating 'cppInvokerFunc.apply(null,invokerFuncArgs)')
Any ideas?
The text was updated successfully, but these errors were encountered: