@brunopostle I got the file to work with the following javascript changes:
--- a/src/pyodide/demo-app/index.html
+++ b/src/pyodide/demo-app/index.html
@@ -285,7 +285,7 @@
let it = ifcopenshell_geom.iterator.callKwargs({
'settings': s,
'file_or_filename': ifc,
- 'exclude': ['IfcSpace', 'IfcOpeningElement'],
+ 'exclude': ['IfcSpace', 'IfcOpeningElement', 'IfcStructuralItem'],
'geometry_library': 'hybrid-cgal-simple-opencascade'
});
@@ -297,7 +297,9 @@
// obj.type appears to be overwritten by pyodide, returning the typename of the C++ class?
let ty = ifc.by_id(obj.id).is_a()
- generateMesh(last_mesh_id, obj);
+ if (obj.context !== 'Clearance') {
+ generateMesh(last_mesh_id, obj);
+ }
if (!it.next()) {
break;
I know where this fails, but I don't know why. The structural items have a face topology representation that is not supported well by cgal and throws an exception, but under normal usage this is happily caught, but not in wasm somehow. It seems the old behaviour from before still prevails that some caught exceptions seemingly arbitrarily cause pyodide to fail :(
The geometry you see near the windows is just the clearance context though, other viewers will give you a similar view.
@semhustej Your file loads for me in firefox, but crashes chrome.
All in all, I'm ready to say this is beginning to look like something usable.
I guess this stability still needs some work and a better understanding of the exception handling in wasm. But we'll get there over time