Commit Graph

6 Commits

Author SHA1 Message Date
Petru Conduraru c424d1b480 ifcgeom: resolve default materials through the schema supertype chain (#473)
get_default_style did an exact-name map lookup, so subtypes like
IfcWallStandardCase or IfcSlabStandardCase never inherited the default
material of their parent type, falling through to the generic grey
DefaultMaterial instead. This was reported in 2018 (#473) and the fix
direction (walk up the supertype chain once the schema runtime made
supertypes available) was agreed there, but never implemented.

On an exact-match miss the lookup now walks decl->supertype() until a
mapped ancestor is found, caching the result under the leaf name for
O(1) subsequent lookups. The product's user-facing type string is
deliberately untouched; only the style lookup gained inheritance.
Applies equally to the built-in defaults and --default-material-file.

This change was written with AI assistance.
2026-07-21 17:43:06 +03:00
Cristian Ritter d714eca4ee replacing diffuse to get_color method 2024-08-20 11:44:20 -03:00
Thomas Krijnen c01263d721 shared_ptr styles all over #4833 2024-06-10 20:13:12 +02:00
Thomas Krijnen c32c88b1a0 Merge remote-tracking branch 'origin/v0.7.0' into v0.8.0 2023-03-29 12:55:05 +02:00
Thomas Krijnen c78b2893de Proceed with merge 2023-03-21 20:15:01 +01:00
Thomas Krijnen ccde605029 File renames, build script and cmake updates 2022-11-15 13:19:24 +01:00