revit-ifc icon indicating copy to clipboard operation
revit-ifc copied to clipboard

ENH: Show Fraction for IfcMaterialConstituent

Open andydandy74 opened this issue 2 years ago • 4 comments

Enhancement Description

While the IFC4 export supports the IfcMaterialConstituent data type, it is exported without the (optional, I know) Fraction attribute. Having that attribute included would help with material take-offs especially for loadable families.

grafik

Minimal model to reproduce: https://github.com/andydandy74/MyIssues/blob/master/RevitIFC651/130_IFC_IfcMaterialConstituentWithoutFraction.rvt

Tested in IFC4 RVArch

Revit Version

2023.1.x

IFC for Revit Addon Version

23.3.0

Windows Version

10 22H2

andydandy74 avatar Jun 15 '23 08:06 andydandy74

@andydandy74 I would argue, that this is a bug, not a missing feature. Without the fraction, there is no connection between the material layers and their width, making volume calculations impossible.

The calculation of the fraction is completely missing from the code. As the code is currently organised, the total amount of width is not known when the constituent is written to file, so the fraction is simply ignored.

Moreover, the export outputs an arbitrary IFCPHYSICALCOMPLEXQUANTITY+ IFCQUANTITYLENGTH pair, which is only connected to the original material by name. It also messes up the overall quantity calculation, as the widths are now duplicated (#158 + #160 + #164).

#155=IFCMATERIAL('Normalbeton C35/37',$,'Materials');
#156=IFCMATERIAL('Insulation - Fiberglass',$,'Materials');

#157=IFCMATERIALCONSTITUENT('Normalbeton C35/37',$,#155,$,'Materials');
#158=IFCQUANTITYLENGTH('Width',$,$,100.,$);

#159=IFCMATERIALCONSTITUENT('Insulation - Fiberglass',$,#156,$,'Materials');
#160=IFCQUANTITYLENGTH('Width',$,$,200.,$);

#161=IFCMATERIALCONSTITUENTSET('Basic Wall:Sandwich 300mm',$,(#157,#159));
#162=IFCPHYSICALCOMPLEXQUANTITY('Normalbeton C35/37',$,(#158),'Layer',$,$);
#163=IFCPHYSICALCOMPLEXQUANTITY('Insulation - Fiberglass',$,(#160),'Layer',$,$);

#164=IFCQUANTITYLENGTH('Width',$,$,300.,$);

This should look like this maybe:

#155=IFCMATERIAL('Normalbeton C35/37',$,'Materials');
#156=IFCMATERIAL('Insulation - Fiberglass',$,'Materials');
#157=IFCMATERIALCONSTITUENT('Normalbeton C35/37',$,#155, IFCNORMALISEDRATIOMEASURE(0.3),'Materials');
#158=IFCMATERIALCONSTITUENT('Insulation - Fiberglass',$,#156, IFCNORMALISEDRATIOMEASURE(0.7),'Materials');
#159=IFCMATERIALCONSTITUENTSET('Basic Wall:Sandwich 300mm',$,(#157,#158));
#160=IFCQUANTITYLENGTH('Width',$,$,300.,$);

eriadam avatar May 14 '24 13:05 eriadam

Given that the fraction is optional and not required, I'd have to side with the "feature" argument. That said, the request is noted and we will file an item for it.

AngelVelezSosa avatar May 14 '24 13:05 AngelVelezSosa

REVIT-222071

parrela avatar May 14 '24 14:05 parrela

@AngelVelezSosa @parrela Thank you! Our team would be very happy to contribute to the project. Could we somehow discuss our possible involvement?

eriadam avatar May 16 '24 13:05 eriadam

Hello @andydandy74,

Investigation Update: Our comprehensive analysis across various Revit versions (2023, 2024, 2025, 2026) has revealed a phased resolution for the reported issues:

  • Revit 2023 (IFC Exporter 23.4.1.0):

    • Fraction attribute for IfcMaterialConstituent was missing (exported as NULL).
    • Quantity duplication (e.g., IFCQUANTITYLENGTH for each constituent) was present.
  • Revit 2024 (IFC Exporter 24.3.20.0):

    • Fraction attribute for IfcMaterialConstituent was still missing (exported as NULL).
    • The quantity duplication issue was resolved; the exporter began outputting aggregated quantities (e.g., NetSurfaceArea, NetVolume) for the overall element.
  • Revit 2025 (IFC Exporter 25.4.0.27):

    • Fraction attribute for IfcMaterialConstituent was still missing (exported as NULL).
    • The quantity duplication issue remained resolved.
  • Revit 2026 (IFC Exporter 26.1.0.23):

    • The Fraction attribute for IfcMaterialConstituent is now correctly exported with a numerical value.
    • The quantity duplication issue remains resolved.

Conclusion: This enhancement request/bug has been addressed through a phased implementation:

  • The quantity duplication issue was resolved starting with Revit 2024.
  • The missing Fraction attribute for IfcMaterialConstituent was resolved starting with Revit 2026.

Therefore, the original issues are no longer reproducible in Revit 2026 and later versions with their respective latest IFC Exporter add-ons.

Best regards

Testing environment:

  • Autodesk Revit 2023 (IFC 23.4.1.0)
  • Autodesk Revit 2024 (IFC 24.3.20.0)
  • Autodesk Revit 2025 (IFC 25.4.0.27)
  • Autodesk Revit 2026 (IFC 26.1.0.23)
Image

ArtemHnatko avatar Aug 06 '25 09:08 ArtemHnatko