Skip to main content

Framework-agnostic IFC builder library for architecture and infrastructure

Project description

ifckit

Framework-agnostic IFC builder library for architecture and infrastructure.

Tests PyPI

Build valid IFC files in pure Python — no CAD host required. Works standalone, from Grasshopper, or via the JSON/CLI interface.

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.

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

ifckit-0.1.1.tar.gz (107.3 kB view details)

Uploaded Source

Built Distribution

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

ifckit-0.1.1-py3-none-any.whl (105.5 kB view details)

Uploaded Python 3

File details

Details for the file ifckit-0.1.1.tar.gz.

File metadata

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

File hashes

Hashes for ifckit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7c96c4197226a03ad7090dc0ceaa30bd516273a8112bb9c09837680ef0f9f219
MD5 244e5571860196c6317c869815bacd3d
BLAKE2b-256 4ad1e1109dd181811f2b7f93f4543e4c4f770b7737916017d962afbd181327ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for ifckit-0.1.1.tar.gz:

Publisher: publish.yml on maucworks/ifckit

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

File details

Details for the file ifckit-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ifckit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 105.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ifckit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 36ad848bf9993f8d13e1d703bfeed8af459fa3ff5f0d27b786662262a177ec51
MD5 1d6071700adc6ea4c135c5881134d7a6
BLAKE2b-256 a1b92dfe16325bf933f35df128a19fcc8ac08e66f0802f77727f41033004dbeb

See more details on using hashes here.

Provenance

The following attestation bundles were made for ifckit-0.1.1-py3-none-any.whl:

Publisher: publish.yml on maucworks/ifckit

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