(ifc_file: ifcopenshell.file, element: ifcopenshell.entity_instance)
| 352 | |
| 353 | |
| 354 | def get_floor_data(ifc_file: ifcopenshell.file, element: ifcopenshell.entity_instance) -> dict[str, Any]: |
| 355 | height_names = { |
| 356 | "Height", |
| 357 | "NetHeight", |
| 358 | "GrossHeight", |
| 359 | "Net Height", |
| 360 | "Gross Height", |
| 361 | "StoreyHeight", |
| 362 | "Storey Height", |
| 363 | "FloorHeight", |
| 364 | "Floor Height", |
| 365 | } |
| 366 | |
| 367 | height = None |
| 368 | for _, props in ifcopenshell.util.element.get_psets(element).items(): |
| 369 | if height is not None: |
| 370 | break |
| 371 | for name, value in props.items(): |
| 372 | if name in height_names and val(value): |
| 373 | height = str(value) |
| 374 | break |
| 375 | |
| 376 | elevation = getattr(element, "Elevation", "") |
| 377 | elevation = "" if elevation is None else str(elevation) |
| 378 | |
| 379 | return { |
| 380 | "Name": val(element.Name), |
| 381 | "CreatedBy": get_created_by(element), |
| 382 | "CreatedOn": get_created_on(element), |
| 383 | "Category": get_category(element), |
| 384 | "ExternalSystem": get_external_system(element), |
| 385 | "ExternalObject": element.is_a(), |
| 386 | "ExternalIdentifier": element.GlobalId, |
| 387 | "Description": val(element.Description), |
| 388 | "Elevation": val(elevation), |
| 389 | "Height": height, |
| 390 | } |
| 391 | |
| 392 | |
| 393 | def get_space_data(ifc_file: ifcopenshell.file, element: ifcopenshell.entity_instance) -> dict[str, Any]: |
nothing calls this directly
no test coverage detected