Skip to content

IFC unit assignment declares Revit's display units, and millimetres when none are recovered, while values are written in SI metres #403

Closed

Description

@DrunkOnJava

Measured

The STEP writer writes every length in metres (it converts Revit's feet at the emit boundary), but the IfcUnitAssignment it declares does not always say metres:

  • No units recovered (every corpus/tier1 synthetic, every family in the 2016-2026 sample corpus, and any IfcModel a library caller builds without units): the fallback declares IFCSIUNIT(*,.LENGTHUNIT.,.MILLI.,.METRE.). Placements, extrusions and storey elevations are metres, so a reader scales the model down 1000 times. The committed tests/fixtures/synthetic-project.ifc is an example: its 20 ft north wall is 6.096000 in a millimetre file.
  • Units recovered from a real file: the assignment is built from the most frequent autodesk.unit.* identifier per category in the partitions, which are Revit's display units, not what the writer writes. On Snowdon Towers, Einhoven and the MIT tutorial house the export declares area SQUARE_INCH, volume CUBIC_INCH, plane angle DEGREE and mass POUND; on Projeto1 and teste_export_2025, area and volume carry a CENTI prefix. Length happens to come out METRE on all eleven real models measured, and no value in those exports is written as an area, volume, angle or mass measure yet, so today the mismatch is latent there, but the first property that writes one (room area, a stair's angle) would be misread by the declared factor.

What would close it

Declare what the writer writes: metre, square metre, cubic metre, radian, and the SI units for mass and time, regardless of the file's display units. Report the recovered display units in the export diagnostics, where they describe the source model, not the IFC's values. Check with IfcOpenShell that a known length (the synthetic fixture's 20 ft wall) reads as 6.096 m.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions