OCCT in the browser

We have a research project where we need to implement certain CAD functionalities in the browser. We plan to build a chrome web app using three.js for 3d visualization. However, we also need to perform various geometric operations (e.g. loft, intersections, booleans, etc), and we therefore need a modelling kernel.

The plan is to investigate whether we could use OCCT for this, compiled as a Portable Native Client (PNaCl). We would only require a subset of the OCCT library, in particular the 2D and 3D geometric modelling toolkits. Javascript functions in the webapp would invoke the compiled OCCT modelling functions.


Before embarking on this, is there anything we should know? Has anyone tried something like this before? Any suggestions would be greatly appreciated.

Daniel Park's picture

Hi Patrick,
You might look at these:
https://npmjs.org/package/node-occ - MIT License

phtj's picture

thanks daniel
I will look into it

Sebastian Alff's picture

Hi, I have been starting to work on a project that compiles OpenCascade into Web-Assembly code, that can run in a web browser or in a NodeJS instance on the server. Feel free to check it out:

Repository: https://github.com/donalffons/opencascade.js
Examples repository: https://github.com/donalffons/opencascade.js-examples
Live preview bottle example: https://donalffons.github.io/opencascade.js-examples/
theRealSuperMario's picture

I just checked it out and I am having heavy performance issues - is it me doing something wrong?

Running on macOS - the tab complains about significant memory requirements.