MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / schema

Method schema

src/ifcopenshell-python/ifcopenshell/file.py:778–789  ·  view source on GitHub ↗

General IFC schema version: IFC2X3, IFC4, IFC4X3.

(self)

Source from the content-addressed store, hash-verified

776
777 @property
778 def schema(self) -> ifcopenshell.util.schema.IFC_SCHEMA:
779 """General IFC schema version: IFC2X3, IFC4, IFC4X3."""
780 prefixes = ("IFC", "X", "_ADD", "_TC")
781 reg = "".join(f"(?P<{s}>{s}\\d+)?" for s in prefixes)
782 match = re.match(reg, self.wrapped_data.schema)
783 version_tuple = tuple(
784 map(
785 lambda pp: int(pp[1][len(pp[0]) :]) if pp[1] else None,
786 ((p, match.group(p)) for p in prefixes),
787 )
788 )
789 return "".join("".join(map(str, t)) if t[1] else "" for t in zip(prefixes, version_tuple[0:2]))
790
791 @property
792 def schema_identifier(self) -> str:

Callers 2

printMethod · 0.45
processMethod · 0.45

Calls 3

joinMethod · 0.45
matchMethod · 0.45
groupMethod · 0.45

Tested by

no test coverage detected