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

Function _ref

src/ifcquery/ifcquery/clash.py:31–36  ·  view source on GitHub ↗

Serialize an element to a compact reference dict.

(element: ifcopenshell.entity_instance)

Source from the content-addressed store, hash-verified

29
30
31def _ref(element: ifcopenshell.entity_instance) -> dict[str, Any]:
32 """Serialize an element to a compact reference dict."""
33 result: dict[str, Any] = {"id": element.id(), "type": element.is_a()}
34 if hasattr(element, "Name") and element.Name:
35 result["name"] = element.Name
36 return result
37
38
39def _get_scope_elements(

Callers 2

_format_clashFunction · 0.70
clashFunction · 0.70

Calls 2

idMethod · 0.45
is_aMethod · 0.45

Tested by

no test coverage detected