Repository navigation
OCP.wasm: OpenCascade in WebAssembly (build123d now runs in the browser) #1876
yeicor
started this conversation in
Show and tell
Replies: 1 comment
|
WASM OCCT is exciting for neutral STEP/IGES in-tab. The hard parts remain large assemblies, exact measure vs tessellation error, and proprietary natives (SLDPRT/CATPart/...) which usually still need a server-side or desktop kernel. Disclosure: I'm Ethan Tan, CADProps developer. We run a free browser viewer across 92 extensions / formats; native SolidWorks/CATIA/NX/Inventor files are processed on CADProps servers (we don't pretend those are pure client-side). |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I've successfully compiled OpenCascade and the OCP Python wrapper to WebAssembly using Pyodide, enabling build123d to run entirely in the browser. You can try it out here: 👉 Simple demo 👉 Complex demo.
(Note: the initial load is a bit slow, but editing and re-running code is faster.)
All the porting code and build artifacts are available here: 🔧 OCP.wasm.
The web-based viewer, which also supports CadQuery models (if not using the playground mode), is here: 🧰 Yet Another CAD Viewer.
This setup makes it possible to share editable parametric CAD models directly in the browser, making it ideal for:
Since both build123d and CadQuery use the same OCP wrapper, it's theoretically possible to get most of CadQuery running in the browser as well (note:
vtkis unsupported and has been removed from the build). I focused on ensuring build123d tests pass, which already required quite a bit of patching, so I won’t be extending this to CadQuery myself, but the groundwork is here if someone else wants to take it further.All reactions