IFC viewer anywidget
Display an IFC model in your Jupyter/marimo notebook.
- Displays an
ifcopenshell.fileobject using the IFCLite viewer - returns the list of
GlobalIds of the selected elements viaselected_guidsattribute
install
If you're using marimo in sandbox mode, skip this part. Marimo will detect the import and ask you to install the package.
If you're running JupyterLab, add the library to your environment:
pip install ifc-anywidget
if you're using uv (highly recommended), run
uv add ifc-anywidget
usage
from ifc_anywidget import IfcViewer
import ifcopenshell
model = ifcopenshell.open("my-awesome-model.ifc")
viewer = IfcViewer(ifc_model=model) # for marimo: wrap it with mo.ui.anywidget()
viewer
IfcVewer supports the following attributes:
ifc_model: theifcopenshell.fileinstance to showhide_sites: whether to hide IfcSite elements (default: False)hide_spaces: whether to hide IfcSpace elements (default: True)hide_spatial_zones: whether to hide IfcSpatialZone elements (default: True)hide_opening_elements: whether to hide IfcOpeningElement elements (default: True)hide_annotations: whether to hide IfcAnnotation elements (default: True)hide_grids: whether to hide IfcGrid elements (default: True)
Using marimo, you can set these attributes reactively (for instance, with a toggle widget).
Take a look at the tests/test_marimo.py notebook to see an example.
development
Clone the repo and run uv sync to initialize the environment with all the needed dependencies.
For testing within marimo, just run
uv run marimo edit tests/test_marimo.py
For testing within jupyter lab, run
uv run jupyter lab tests/test_jupyter.ipynb
Metadata
Release files for ifc-anywidget 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ifc_anywidget-0.5.0.tar.gz | 4.6 kB | Without provenance | Details for ifc_anywidget-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ifc_anywidget-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for ifc_anywidget-0.5.0-py3-none-any.whl |
Total release size: 9.9 kB
Release files / ifc_anywidget-0.5.0.tar.gz
| Download URL | ifc_anywidget-0.5.0.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75b2607e8eee10d2cad1c83e5ca7a91b32cd92530dee53d27fbc3665ba07af50
|
|
BLAKE2b-256 checksum How to use checksums |
77f662ce8abfe5a20aaf8ce2631777a4b08be553366a6a6614b2fa248a57faa7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / ifc_anywidget-0.5.0-py3-none-any.whl
| Download URL | ifc_anywidget-0.5.0-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1195812a05feff14927348068e675e797a2eccf38cfaf4b0b478aeea531da28b
|
|
BLAKE2b-256 checksum How to use checksums |
d2857e70d22d509f26d818fd4b362c1fb2b4a1824ad470e1c136bcf3481d4695
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for ifc-anywidget 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.