Convert a material entity to a summary dict.
(material: ifcopenshell.entity_instance | None)
| 175 | |
| 176 | |
| 177 | def _material_to_dict(material: ifcopenshell.entity_instance | None) -> dict[str, Any] | None: |
| 178 | """Convert a material entity to a summary dict.""" |
| 179 | if material is None: |
| 180 | return None |
| 181 | result: dict[str, Any] = { |
| 182 | "id": material.id(), |
| 183 | "type": material.is_a(), |
| 184 | } |
| 185 | if hasattr(material, "Name"): |
| 186 | result["name"] = material.Name |
| 187 | return result |
| 188 | |
| 189 | |
| 190 | def info(model: ifcopenshell.file, element: ifcopenshell.entity_instance) -> dict[str, Any]: |