opencascade.js icon indicating copy to clipboard operation
opencascade.js copied to clipboard

Project Maintenance Status?

Open josheppinette opened this issue 1 year ago • 6 comments

Does anyone know the maintenance status of this project. Is it time to investigate a fork since there hasn't been a published release in a year, and it is beginning to lag significantly behind OCCT.

josheppinette avatar Mar 05 '24 23:03 josheppinette

I wonder too, these two forks are ahead of master: https://github.com/TheTechCompany/opencascade.js https://github.com/ashmna/opencascade.js

goswinr avatar Mar 06 '24 15:03 goswinr

Another way forward to allow us to use the most recent version of OCCT is to design a web worker in C++ that your web app talks to using emscripten and OpenCascade (C++ version) and only embind/expose your message processing function for your web worker instead of exposing the entire opencascade API. The message processing function is just a function that takes a string and returns a string.

The final wasm build from emscripten would then only contain the wasm code for the opencascade methods (and their dependencies) you touched in your message processing functions for your web worker. (Smaller wasm file.)

clinuxrulz avatar Jun 27 '24 11:06 clinuxrulz

Here a sample for reference:

https://dev.opencascade.org/doc/overview/html/occt_samples_webgl.html

You'd just need to be happy with writing your Web Worker in C++ is all.

clinuxrulz avatar Jun 27 '24 11:06 clinuxrulz

This is what I mean:

https://github.com/clinuxrulz/psf-toolbox-occt-webworker/blob/main/main.cpp

Rather than make your web worker in JavaScript/Typescript and embind/ffi a hundred thousand functions. Just write your webworker in C++ using the latest official opencascade, then compile it all to wasm using emscripten and only embind/ffi the one function that takes and returns a string (std::string process_message(std::string message);)

The file size went from a 50mb wasm down to a 30mb wasm. The wasm file will auto-shrink to only include what functions process_message depends on, and you still get full access to everything in opencascade while coding.

clinuxrulz avatar Jul 02 '24 12:07 clinuxrulz

@clinuxrulz this looks interesting... Any progress on the topic?

cesarecaoduro avatar Sep 12 '24 20:09 cesarecaoduro

In honesty I went back to just using opencascade.js , because debugging your code that uses opencascade is way easier. opencascade.js suits my needs for now.

But the "write your web worker in C++, and use regular opencascade" technique does work. I tested it, and it works well.

clinuxrulz avatar Sep 14 '24 09:09 clinuxrulz