Skip to main content

High-performance Python bindings for the ifc-lite IFC parser

Project description

ifc-lite

High-performance Python bindings for the ifc-lite IFC parser.

Relationship with upstream

This Python version is not released or maintained by the original authors of ifc-lite. It is a modified version, released under the same licence.

The Rust code is basically copied from upstream, but with some changes:

  • The MeshData object exposes property_sets as an attribute, and the Rust code has been changed to populate this for all elements.

These changes are based on the current needs of the maintainers, and are provisional, while we are still in the evaluation stage for this new library.

Installation

pip install ifc-lite

Quick Start

import ifc_lite

# Load an IFC file
model = ifc_lite.process_file("building.ifc")

# List all IFC types in the model
print(model.ifc_types)

# Get all reinforcing bars
bars = model.elements_by_type("IfcReinforcingBar")
for bar in bars:
    print(f"{bar.name}: {bar.vertex_count} vertices, {bar.triangle_count} triangles")
    print(f"  Properties: {bar.properties}")

# Access geometry (vertex positions, normals, triangle indices)
for mesh in model.meshes:
    positions = mesh.positions  # flat list of x,y,z triplets
    normals = mesh.normals      # flat list of nx,ny,nz triplets
    indices = mesh.indices      # triangle indices
    color = mesh.color          # RGBA tuple

API

Module-level functions

  • ifc_lite.process_file(path) – Load and process an IFC file from disk
  • ifc_lite.process_text(content) – Process IFC content from a string
  • ifc_lite.version() – Get the native library version

IfcModel

  • model.meshes – List of all MeshData elements
  • model.ifc_types – All distinct IFC type names
  • model.elements_by_type(type_name) – Filter elements by IFC type
  • model.element_by_express_id(id) – Lookup by express ID
  • model.element_by_global_id(gid) – Lookup by IFC GlobalId
  • model.metadata – Schema version, entity counts, coordinate info
  • model.stats – Processing timing statistics

MeshData

  • mesh.express_id, mesh.ifc_type, mesh.global_id, mesh.name
  • mesh.positions, mesh.normals, mesh.indices, mesh.color
  • mesh.properties – IFC property set values (dict or None)
  • mesh.vertex_count, mesh.triangle_count

License

MPL-2.0 (same as upstream ifc-lite)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ifc_lite-0.2.0.tar.gz (321.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ifc_lite-0.2.0-cp312-abi3-win_amd64.whl (636.1 kB view details)

Uploaded CPython 3.12+Windows x86-64

ifc_lite-0.2.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (718.0 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ x86-64

ifc_lite-0.2.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (678.4 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ ARM64

ifc_lite-0.2.0-cp312-abi3-macosx_11_0_arm64.whl (653.7 kB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

ifc_lite-0.2.0-cp312-abi3-macosx_10_12_x86_64.whl (679.8 kB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

Details for the file ifc_lite-0.2.0.tar.gz.

File metadata

  • Download URL: ifc_lite-0.2.0.tar.gz
  • Upload date:
  • Size: 321.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ifc_lite-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c63509a7ad5723a485e065ec66ab076444808ca3da2db0a15567e1539ffdba7a
MD5 0d26ff6e1ebc7ced769903e181af7065
BLAKE2b-256 c7c554b7a0b3902fe7b73fe052bded2f567156ffebdab2eda15df966b5c747eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for ifc_lite-0.2.0.tar.gz:

Publisher: release.yml on spookylukey/ifc-lite-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ifc_lite-0.2.0-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: ifc_lite-0.2.0-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 636.1 kB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ifc_lite-0.2.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3e5277425e86e433994a9f57d2380e1fa026d1e4ebc729022a4183b2cc5021b7
MD5 3866ebcaa313d7b61bdaa4cb2c01044f
BLAKE2b-256 0bd7a49b3b3b9a8459a507b1695f96d95224ed2ef73ad463c83fc8e3af02c776

See more details on using hashes here.

Provenance

The following attestation bundles were made for ifc_lite-0.2.0-cp312-abi3-win_amd64.whl:

Publisher: release.yml on spookylukey/ifc-lite-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ifc_lite-0.2.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ifc_lite-0.2.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8f9be09cb0618b09f020f33ec4bccff6763f19d90afc475d592e35a97bc22ee1
MD5 cb3dfbe461e35700e9810ece98352cba
BLAKE2b-256 e1de2b5992feb9408394c40987d6fdc94da95dabba15c8f63ad3ea81cef5e36c

See more details on using hashes here.

Provenance

The following attestation bundles were made for ifc_lite-0.2.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on spookylukey/ifc-lite-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ifc_lite-0.2.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for ifc_lite-0.2.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a274a680accd56cc7b5ec8b4de96c7309ca673306231ff0a82a7d1256175efde
MD5 0e8086c363aea2705597645554918584
BLAKE2b-256 33eb123cebd7e11decd44fbb5097f2ccd48c1fb398ae0df3017facbfd42b7999

See more details on using hashes here.

Provenance

The following attestation bundles were made for ifc_lite-0.2.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on spookylukey/ifc-lite-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ifc_lite-0.2.0-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ifc_lite-0.2.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4d023a8d1af9611246b9d5ea4608736d2d3849dd014d12e7445e74934d25d470
MD5 2f294342aff728c9e874891c77cd0ed4
BLAKE2b-256 3a39dc5055dd56a069606c577f0672ce05140f664336c49a026b1bf7caad1070

See more details on using hashes here.

Provenance

The following attestation bundles were made for ifc_lite-0.2.0-cp312-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on spookylukey/ifc-lite-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ifc_lite-0.2.0-cp312-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for ifc_lite-0.2.0-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f37301bf3e90ca80f29238ea1e672f3e56adc49c32deee4f4a605624eedd62ef
MD5 4ef9dee975983cbcf0f73ac2ea86c59b
BLAKE2b-256 4acbc0560a56d6f06b9b8cc2a496ea4adce602fa9925e39c4b0600f7949ec4db

See more details on using hashes here.

Provenance

The following attestation bundles were made for ifc_lite-0.2.0-cp312-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on spookylukey/ifc-lite-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page