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

Function _serialize_entity

src/ifcedit/ifcedit/run.py:140–148  ·  view source on GitHub ↗

Serialize an entity instance to a summary dict.

(entity: ifcopenshell.entity_instance)

Source from the content-addressed store, hash-verified

138
139
140def _serialize_entity(entity: ifcopenshell.entity_instance) -> dict:
141 """Serialize an entity instance to a summary dict."""
142 result = {
143 "id": entity.id(),
144 "type": entity.is_a(),
145 }
146 if hasattr(entity, "Name") and entity.Name:
147 result["name"] = entity.Name
148 return result

Callers 1

serialize_resultFunction · 0.85

Calls 2

idMethod · 0.45
is_aMethod · 0.45

Tested by

no test coverage detected