Extract materials for a single entity ON-DEMAND.
Uses the onDemandMaterialMap built during parsing.
Falls back to relationship graph when on-demand map is not available (e.g., server-loaded models).
Also checks type-level material assignments via IfcRelDefinesByType.
Resolves the full material structure (layers, profiles, constituents, lists).
Returns the entity's PRIMARY material (lowest-rel-express-id association);
use extractAllMaterialsOnDemand when every association matters.
Extract materials for a single entity ON-DEMAND. Uses the onDemandMaterialMap built during parsing. Falls back to relationship graph when on-demand map is not available (e.g., server-loaded models). Also checks type-level material assignments via IfcRelDefinesByType. Resolves the full material structure (layers, profiles, constituents, lists). Returns the entity's PRIMARY material (lowest-rel-express-id association); use extractAllMaterialsOnDemand when every association matters.