Skip to content

IFC surface styles: a material whose transparency was not read is written fully opaque (0) #1820

Closed

Description

@DrunkOnJava

What

step_writer writes a surface style for every material whose colour was read:

  • It sets IfcSurfaceStyleRendering.Transparency to mat.transparency.unwrap_or(0.0) (src/ifc/step_writer.rs, the material loop).
  • A material decoded from Global/Latest reads its colour and its transparency from two fields (elements::styling::Material::from_decoded), so its colour can be read with no transparency.
  • The IFC then states the material is fully opaque, a value no file gave. Revit's own export writes the material's own transparency (revit-ifc CategoryUtil).

IFC4's IfcSurfaceStyleRendering.Transparency is optional, so an unread transparency can be written $.

Found while reviewing #1818, which marks the same case alphaSource: "rvt-rs" in the GLB.

Done when

  • Count the materials of the Measure models whose colour is read and whose transparency is not. If there are none, record the zero here and close this issue.
  • Where there are some, write $ for their transparency.
  • Measure unfiltered against main: the only IFC lines that move are those materials' rendering entities, and material_colours_vs_ifc holds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions