Skip to content

[Feat]: Make IFC schema alias matching case-insensitive (support lowercase x in schema versions) #1762

@ynnob

Description

@ynnob

What is your idea?

Currently, the IFC schema version check relies on exact, case-sensitive matches against entries defined in schema_aliases.ts:

type SchemaAlias = { schemaName: string, alias: string }

const schemaAliases: Array<SchemaAlias> = [
  { schemaName: "IFC2X_FINAL", alias: "IFC2X3" },
  { schemaName: "IFC4X1", alias: "IFC4X3" },
  { schemaName: "IFC4X2", alias: "IFC4X3" },
  { schemaName: "IFC4X3_RC3", alias: "IFC4X3" },
  { schemaName: "IFC4X3_RC4", alias: "IFC4X3" },
  { schemaName: "IFC4X3_RC1", alias: "IFC4X3" },
  { schemaName: "IFC4X3_RC2", alias: "IFC4X3" },
  { schemaName: "IFC4X3_ADD2", alias: "IFC4X3" },
  { schemaName: "IFC4X3_ADD1", alias: "IFC4X3" }
];

export default schemaAliases;

This comparison is case-sensitive, which causes parsing to fail when IFC files or authoring tools use a lowercase x in the schema version string.

Problem
Some IFC files declare schema versions using a lowercase x, for example:

IFC2x3 instead of IFC2X3

When this occurs, the schema alias check fails and parsing does not proceed, even though simply normalizing the case (changing x to X) allows the file to be parsed successfully.

I myself have received multiple IFC files in the past where this issue occurred.

Proposed Solution
Make the schema alias matching case-insensitive, or normalize schema version strings before comparison (e.g. converting them to uppercase).

This would:

Improve robustness when handling IFC files from different tools

  • Avoid unnecessary parsing failures
  • Maintain backward compatibility
  • Introduce no known negative side effects

Even if this behavior is not strictly aligned with the IFC standard’s schema declaration format, allowing it does not cause harm and significantly improves interoperability.

Additional Context

  • Manually changing IFC2x3 → IFC2X3 resolves the issue (see attached example)
  • This behavior has been discussed in the community

Reference discussion:
https://people.thatopen.com/c/ask-the-community/unsupported-schema-ifc2x3#comment_wrapper_91653296

Examples:
IFC_Schema_Examples.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions