Framework-agnostic IFC builder library for architecture and infrastructure
Project description
ifckit
Framework-agnostic IFC builder library for architecture and infrastructure.
Build valid IFC files in pure Python — no CAD host required. Works standalone, from Grasshopper, or via the JSON/CLI interface.
Files created can be viewed in its companion IfcViewer
Live: maucworks.github.io/web-ifc-viewer
Install
pip install ifckit[ifc] # with ifcopenshell (full functionality)
pip install ifckit # without ifcopenshell (JSON/schema tools only)
Requires Python 3.10+.
Quick start: building
from ifckit import IfcModel, IfcSchema, PendingWall, Vec, Plane
model = IfcModel(name="My Project", schema=IfcSchema.IFC4, author="you")
floor = model.add_site("Site A").add_building("Building 1").add_storey("Ground Floor", elevation=0.0)
wall = PendingWall(
footprint=[Vec(0, 0, 0), Vec(10, 0, 0), Vec(10, 0.3, 0), Vec(0, 0.3, 0)],
plane=Plane.world_xy(),
height=3.0,
name="North Facade",
)
floor.add(wall)
model.save("project.ifc")
See examples/quickstart.py and examples/simple_building.py for fuller examples.
Quick start: bridge
from ifckit import IfcModel, IfcSchema, LengthUnit, PendingBeam, Vec, Line, BridgePartType, IBeamProfile
model = IfcModel(name="Bridge", schema=IfcSchema.IFC4X3, author="you", unit=LengthUnit.MILLIMETRE)
deck = model.add_site("Site A").add_bridge("Main Bridge").add_bridge_part("Deck", BridgePartType.DECK.value)
profile = IBeamProfile(height=600, width=300, web_thickness=10, flange_thickness=10)
beam = PendingBeam(axis=Line(Vec(0, 0, 0), Vec(3000, 0, 0)), profile=profile, name="Main Girder")
deck.add(beam)
model.save("bridge.ifc")
See examples/quickstart_bridge.py and examples/simple_bridge.py for fuller examples including alignments.
Supported schemas and element types
| Element | Class | IFC4 | IFC4X3 |
|---|---|---|---|
| Wall | PendingWall |
✓ | |
| Slab | PendingSlab |
✓ | |
| Column | PendingColumn |
✓ | |
| Beam | PendingBeam |
✓ | ✓ |
| Space | PendingSpace |
✓ | |
| Alignment | PendingAlignment |
✓ |
Profiles: IBeamProfile, LBeamProfile, SteelProfile, and arbitrary polygon profiles.
JSON build
Build an IFC file from a JSON description — useful for CLI pipelines and REST APIs:
from ifckit.json_build import build
build("model.json", "output.ifc")
Or from the command line:
python -m ifckit model.json output.ifc
The JSON schema mirrors the Python API. See examples/example_building.json for a full example.
Grasshopper
Grasshopper Script components are in grasshopper/src/. Each component is a
standalone Python file with @component / @input / @output annotations.
To regenerate the .gh file from source, run grasshopper/script/build_gh.py
inside the Rhino ScriptEditor with Grasshopper open.
Installing ifckit in Rhino 8
Rhino 8 ships with its own CPython 3.9 environment. Install ifckit into it
from the Rhino ScriptEditor (EditPythonScript) or a Script component:
import subprocess, sys
subprocess.run([sys.executable, "-m", "pip", "install", "ifckit[ifc]"], check=True)
ifcopenshell is bundled with Rhino 8, so the [ifc] extra will install it
only if it is not already present.
To install a local development checkout instead:
import subprocess, sys
subprocess.run(
[sys.executable, "-m", "pip", "install", "-e", r"C:\path\to\ifckit"],
check=True,
)
After installing, restart Rhino once to make the package available in all Script components.
Development
pip install -e ".[dev]"
pytest tests/ # run tests
ruff check ifckit/ # lint
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ifckit-0.2.1.tar.gz.
File metadata
- Download URL: ifckit-0.2.1.tar.gz
- Upload date:
- Size: 195.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f4ed8a0861763e3f21fc5853cd088a65d077a2f0f15d6a7e381448a31c447ba
|
|
| MD5 |
3a9ba70eec1f890413ae3b0362268fe8
|
|
| BLAKE2b-256 |
97bcaed1016fe0e3097c3281ff19bc0fdc68f39f2e4841561751fd9683d5493d
|
Provenance
The following attestation bundles were made for ifckit-0.2.1.tar.gz:
Publisher:
publish.yml on maucworks/ifckit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ifckit-0.2.1.tar.gz -
Subject digest:
5f4ed8a0861763e3f21fc5853cd088a65d077a2f0f15d6a7e381448a31c447ba - Sigstore transparency entry: 1503591499
- Sigstore integration time:
-
Permalink:
maucworks/ifckit@7939d87ff7a70f249dfbec780b969216c0f38df8 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/maucworks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7939d87ff7a70f249dfbec780b969216c0f38df8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ifckit-0.2.1-py3-none-any.whl.
File metadata
- Download URL: ifckit-0.2.1-py3-none-any.whl
- Upload date:
- Size: 202.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a339463ed9969e6e93919c533a7066556b26dd929e405366d038379361799e2
|
|
| MD5 |
7fb6f0d9d9f51986d6413aa3eeddd3f8
|
|
| BLAKE2b-256 |
8f46193780746833f7a6ec0329945a081117aba02c9c9bf2652f67b1b5a90b9f
|
Provenance
The following attestation bundles were made for ifckit-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on maucworks/ifckit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ifckit-0.2.1-py3-none-any.whl -
Subject digest:
4a339463ed9969e6e93919c533a7066556b26dd929e405366d038379361799e2 - Sigstore transparency entry: 1503592363
- Sigstore integration time:
-
Permalink:
maucworks/ifckit@7939d87ff7a70f249dfbec780b969216c0f38df8 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/maucworks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7939d87ff7a70f249dfbec780b969216c0f38df8 -
Trigger Event:
push
-
Statement type: