Skip to content

Releases: CyrilWaechter/python-materialsdb

v0.3.2

Choose a tag to compare

@CyrilWaechter CyrilWaechter released this 15 Sep 07:27

v0.3.2

Fixes styling of materials pushed into an open Bonsai model, and gives
colour-less materials a colour from a category scheme.

Pushed materials now show their colour

  • Styles are actually applied. The add-on passed an IfcColourRgb entity
    where ifcopenshell expects a dict, so style.add_surface_style always
    raised inside a swallowed except and no colour was ever applied.
  • No more invalid styles. The style is now built in one shot; a
    mid-way failure could previously leave an IfcSurfaceStyle with
    Styles=$ (invalid IFC4 SET [1:?]), which was then re-used and could
    crash ifcopenshell's style loader on the next model open.
  • Re-used materials get styled too. Materials already present in the
    model (found by their materialsdb identity) were never styled when a push
    re-used them. Third-party styles are preserved; only ours are refreshed.
  • Bonsai viewport. Styles added to an already-open model are now
    registered as Blender materials (created, linked, coloured) like an
    import would, so layer walls display their colours and the style editor
    no longer fails on the missing material.

Category colour schemes

  • Surface styles keep the producer colour when a material defines one
    (color <int>); otherwise they take the colour of their category from a
    named scheme — default Lesosai (category <Category>,
    material_builder.SCHEMES).
  • IfcColourRgb components are normalised to 0–1 (they were written as
    0–255). Construction exports now style their materials as well.

Full changelog: v0.3.1...v0.3.2

v0.3.1

Choose a tag to compare

@CyrilWaechter CyrilWaechter released this 12 Sep 14:10

v0.3.1

Performance release: a full worst-case cache refresh (download all producers,
rebuild the whole index) drops from ~16 s to ~4.5 s on a typical
connection.

Faster everywhere

  • Producer downloads run on a bounded thread pool (measured 6.5x on the
    45-producer corpus: 4.0 s → 0.62 s). Progress and cancel semantics are
    preserved (cancel stops new submissions, partial reports unchanged).
    Optional max_workers keyword on materialsdb.cache.update_producers_data
    (default 8).
  • Store indexing is ~3x faster (11.9 s → 3.9 s on the same corpus): the
    deserialiser memoises its per-type-hint machinery and the tag-name
    lookup — pure caching, output identical by construction.

No behavior change

Same endpoints, same payloads, same UI; downloads and ingestion only go
faster. The ProcessPoolExecutor route for multi-core ingest remains
parked in docs/superpowers/backlog.md.

Full changelog: v0.3.0...v0.3.1

v0.3.0

Choose a tag to compare

@CyrilWaechter CyrilWaechter released this 12 Sep 11:44

v0.3.0

Third release, a few weeks of work since v0.2.0: construction-composer
improvements, thermally informative pushes to Bonsai, and a self-service
refresh in the GUI (download + progress + cancellable).

New in the construction composer

  • Replace any layer's material in one go: pencil button or double-click
    on the material cell opens the chooser in replace mode — placeholder
    ("model material") layers convert to normal materialsdb layers, thickness
    preserved.
  • Pushed constructions now enrich the model: the computed U-value is
    written as ThermalTransmittance in the matching
    Pset_WallCommon / Pset_SlabCommon / Pset_RoofCommon pset of each
    pushed type, computed per heat-flow direction (wall / floor / roof
    Rsi/Rse per ISO 6946 / SIA 180). Re-sending updates the value in place.
    Unresolved λ → the pset is simply skipped.

New in the GUI

  • Refresh actually refreshes: the button now downloads newer producer
    files from materialsdb.org (incremental, per the producers' version
    stamps) before re-indexing the local store — fresh installs get a
    populated list in one click.
  • Progress overlay with Cancel: the refresh runs as a background job;
    the modal dialog shows the download progress (12/48 …) and can be
    cancelled between downloads. Status and errors land in the status line
    ("cache update failed: …"), and the store is never wiped by a failed
    run.
  • Notices:
    • an empty materials list shows "No materials cached yet — click
      Refresh …";
    • a banner appears when materialsdb.org offers newer data (checked once
      at server startup, and after each successful refresh).

Fixes & internals

  • Fresh pip install no longer shows a permanently empty list (the
    refresh button used to ingest only already-cached files).
  • The refresh job can no longer wedge as "running" on unexpected errors;
    a second refresh click while one is running answers
    409 already running instead of queueing a mystery job.
  • Layer rows keep their DOM stable across selection clicks (double-click
    target survives); the progress callback and update availability are
    CI-covered (no network in tests).

Full changelog: v0.2.0...v0.3.0

v0.2.0

Choose a tag to compare

@CyrilWaechter CyrilWaechter released this 09 Sep 20:23

v0.2.0

Second published release, five months of work: a local indexed store, a web
GUI (material picker + construction maker), and a full Bonsai (Blender)
integration — installable as a Blender extension repository.

Highlights

  • materialsdb-gui: a stdlib-only local web application to browse, filter
    and sort all cached materials, inspect them, and export a standalone
    .ifc or append into an already-open session. Start it with
    materialsdb-gui (or python -m materialsdb.gui).
  • Construction maker: compose thermal constructions from materialsdb
    materials with live U-value computation (ISO 6946 / SIA 180 surface
    resistances), save them as JSON, and export them as IfcMaterialLayerSet.
  • Bonsai integration (Blender extension, materialsdb_listener):
    • extension repository at
      https://cyrilwaechter.github.io/python-materialsdb/ — install and
      update from Preferences ▸ Get Extensions
    • start the GUI server from the panel (interpreter configurable in
      preferences)
    • push picked materials straight into the open model (identity + per-layer
      property sets, surfaces styles), undoable via Ctrl+Z
    • push constructions as IfcWallType/IfcSlabType/IfcRoofType with
      their IfcMaterialLayerSet
    • round-trip: push an existing type's layer set back into the composer,
      edit it (even layers whose material is not a materialsdb one — kept as
      "model material" placeholders) and push it back into the same set
  • Query store (schema v3): SQLite index of cached materials with
    type-aware summaries, fast parsing (3.9-4.7x), cross-producer duplicate
    reporting, per-producer ver/crd freshness.
  • Single-material IFC builder: append one or more materialsdb materials
    (or selected layer thicknesses) into an existing ifcopenshell file,
    idempotent, or build standalone files.

Fixes & internals

  • ruff + ty toolchain, CI (lint/format/type/tests) on push
  • store refresh survives corrupt producers; geometry/thermal data resolved
    per configured country everywhere
  • client-disconnect-safe HTTP server; Blender extension zippable with
    version injection for releases

Full changelog: v0.1.0...v0.2.0

v0.1.0

Choose a tag to compare

@CyrilWaechter CyrilWaechter released this 24 Aug 23:27

Indexed query layer + performance core

New:

  • SQLite material store (materialsdb.store.MaterialStore): instant filtered/sorted listing of all cached materials, single-material fetch by id, incremental per-producer refresh
  • query module rewritten as a facade: query.search(...), query.get_material(id), query.refresh() (BREAKING: old SOURCES/get_by_name/get_by_producer removed)
  • MaterialSummary extraction (names/descriptions in all languages, lambda/thickness ranges per country, usage flags)

Performance:

  • Parsing 3.9-4.7x faster (type-hints caching); parallel multi-producer parsing available
  • Full 46-producer cold build: ~12s -> ~2.5s; sorted listing of all materials ~0.14ms; single material fetch ~1.5ms

Tooling/tests:

  • pytest-benchmark suite with committed baselines; committed test fixtures (fresh clones now pass)

v0.0.2

Choose a tag to compare

@CyrilWaechter CyrilWaechter released this 30 Apr 12:08
bump version

materialsdb_IFC4

materialsdb_IFC4 Pre-release
Pre-release

Choose a tag to compare

@CyrilWaechter CyrilWaechter released this 30 Apr 09:10

Available files:

  • materialsdb_IFC4_fr_CH : Compilation des matériaux materialsdb en IFC4 pour la Suisse en langue française.
  • materialsdb_IFC4_de_CH : Zusammenstellung der Materialien materialsdb in IFC4 für die Schweiz in deutscher Sprache.

First release

First release Pre-release
Pre-release

Choose a tag to compare

@CyrilWaechter CyrilWaechter released this 19 Jun 14:54
  • Read and write materialsdb XMLs
  • Conversion to IFC (IfcProjectLibrary)