Closed borioan closed 3 years ago
Hi,
thanks for your bug reports!
Regarding the outdated webpack configuration: I'll put it on my list. If you have a fixed version ready and working, a pull request would be much appreciated. Otherwise, I will look into the issue over the holidays.
Regarding the STEP file issue: This is a weird one! I tested this, too and with the current version (1.1.1) of OpenCascade.js some STEP-files work, some don't. With the previous major version of OpenCascade.js (0.1.19) (which is used in CascadeStudio), all my test STEP files work. The error comes from within the OpenCascade library, which responds with an error code when reading the problematic step files.
I'm currently working on a new version of OpenCascade.JS and have written down some ideas about it here. One of the main issues with the current version is, that compilation times are insanely long (about 8h on my fairly modern dev machine). This (and the fact that WASM debugging tools are really just starting to become useful - at least in my experience) make it extremely painful to debug issues like the STEP file issue you mentioned. So, for the moment, I would recommend to wait for the new release. There are several Emscripten-related problems that are currently blocking the new version. However, the support from the Emscripten team has been great and I'm confident that the remaining issues can be resolved, soon.
Also: This project needs more tests :slightly_smiling_face:.
Hi! I'm very early in using web application development technologies, so before I can make any improvements I have to learn a lot! The starting point in my project was exactly CascadeStudio, where I got to its source - OpenCascade.js. I was also surprised to find that CascadeStudio imports STP / STEP files much more correctly than OpenCascade.js, now the reason is clear! Regarding the new version, I consider that the new module splitting approach is an excellent one along with porting to the latest version of OpenCascade!! For my project I just need to display some STEP files in the browser, so a simplified version of using the new OpenCascade.JS would have helped me a lot, somewhat similar in approach in StudioCascade in which no webpacks are used. Maybe you can consider this idea an create a new separated updated OpenCascade.JS examples without webpack! I would definitely like to get involved in testing new versions of OpenCascade.JS! Thank you for your effort and time involved in this project!
Thanks for your suggestions. Let's keep this open to track those issues.
Sure! :-)
The issue of not being able to load certain STEP files has been fixed. The related issue is here.
Hello! I try to test you example exactly how it is in this example (the same file structure) and generate the following errors message:
PS D:\OpenCascade.js_teste\00> npm start
WARNING in ./node_modules/opencascade.js/dist/opencascade.wasm.js 11:59916-59933 Module not found: Error: Can't resolve 'crypto' in 'D:\OpenCascade.js_teste\00\node_modules\opencascade.js\dist'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
ERROR in ./node_modules/opencascade.js/dist/opencascade.wasm.js 11:1147-1170 Module not found: Error: Can't resolve 'path' in 'D:\OpenCascade.js_teste\00\node_modules\opencascade.js\dist'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
ERROR in ./node_modules/opencascade.js/dist/opencascade.wasm.js 11:1288-1301 Module not found: Error: Can't resolve 'fs' in 'D:\OpenCascade.js_teste\00\node_modules\opencascade.js\dist' @ ./node_modules/opencascade.js/index.js 1:0-53 5:13-24 @ ./src/demos/bottle - visualize/index.js 8:0-49 30:0-15
webpack 5.10.3 compiled with 2 errors and 1 warning in 9041 ms i 「wdm」: Failed to compile.
"scripts": { "start": "webpack-dev-server", ... }
"scripts": { "start": "webpack serve", .. }