GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - IfcOpenShell/wasm-preview

This repository was archived by the owner on Jan 12, 2025. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

22 Commits
22 Commits

Folders and files

NameName
Last commit message
Last commit date
examples
examples
 
 
IfcOpenShell-0.7.0-py3-none-any.whl
IfcOpenShell-0.7.0-py3-none-any.whl
 
 
README.md
README.md
 
 
index.html
index.html
 
 

Repository files navigation

IfcOpenShell WASM

Live version: https://ifcopenshell.github.io/wasm-preview/

This is a technological preview of an IfcOpenShell WASM python module for use in pyodide. It uses emscripten to compile the C/C++ (of the python interpreter, IfcOpenShell and its dependencies respectively) into a WebAssembly (WASM) module. WebAssembly can be used in the browser or other JavaScript runtimes such as NodeJS.

Approach

This approach of supporting IFC within the browser is rather heavy as it depends on a python interpreter loading the wasm-compiled monolithic IfcOpenShell wheel on demand. But nevertheless, we see this as the most powerful approach of enabling IfcOpenShell in the browser.

Over time, Python code has surpassed C++ as the predominant language in IfcOpenShell and has become the defacto standard for the IfcOpenShell API. We wouldn't want browser-based usage to require duplicating this powerful set of APIs.

Wrapping the full IfcOpenShell-python module results in a feature rich module, that makes for example, IFC validation, visualization, but also authoring a breeze because any pre-existing pure python module can be leveraged.

Usage

Pyodide proxy objects

Allows direct usage of python objects in JavaScript code.

Example: https://github.com/IfcOpenShell/wasm-preview/blob/master/index.html#L99-L101

Python code evaluation by Pyodide

Allows running actual python code with the ability for JavaScript to easily reflect on global variables.

Example: https://github.com/IfcOpenShell/wasm-preview/blob/master/index.html#L114-L117

In-line python code using PyScript

Allows running inline python code in HTML script tags

Limitations

  • Performance of loading and running code is not optimal.
  • C++ exception handling in the IfcOpenShell dependencies seems to cause issues in WASM.

Future work

The overall IfcOpenShell roadmap of modularizing the geometry libraries, providing alternative implementations (CGAL, Eigen) and providing a more plug-in like interface will alleviate most of the issues WASM-IfcOpenShell users will experience as emscripten can load shared libraries on demand.

Stay tuned!

About

No description, website, or topics provided.

Resources

Readme
Activity
Custom properties

Stars

45 stars

Watchers

4 watching

Forks

11 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.