(ifc_file: ifcopenshell.file, element: ifcopenshell.entity_instance)
| 680 | |
| 681 | |
| 682 | def get_connection_data(ifc_file: ifcopenshell.file, element: ifcopenshell.entity_instance) -> dict[str, Any]: |
| 683 | connection_type = ( |
| 684 | val(element.RelatingPort.ObjectType) |
| 685 | or val(element.RelatedPort.ObjectType) |
| 686 | or val(element.Description) |
| 687 | or val(element.Name) |
| 688 | ) |
| 689 | name = val(element.Name) |
| 690 | row_name1 = val(ifcopenshell.util.system.get_port_element(element.RelatingPort).Name) |
| 691 | row_name2 = val(ifcopenshell.util.system.get_port_element(element.RelatedPort).Name) |
| 692 | return { |
| 693 | "Name": name, |
| 694 | "CreatedBy": get_created_by(element), |
| 695 | "CreatedOn": get_created_on(element), |
| 696 | "ConnectionType": connection_type, |
| 697 | "SheetName": "Component", |
| 698 | "RowName1": row_name1, |
| 699 | "RowName2": row_name2, |
| 700 | "RealizingElement": val(element.RealizingElement.Name) if element.RealizingElement else None, |
| 701 | "PortName1": val(element.RelatingPort.Name), |
| 702 | "PortName2": val(element.RelatedPort.Name), |
| 703 | "ExternalSystem": get_external_system(element), |
| 704 | "ExternalObject": element.is_a(), |
| 705 | "ExternalIdentifier": element.GlobalId, |
| 706 | "Description": val(element.Description) or val(element.Name), |
| 707 | } |
| 708 | |
| 709 | |
| 710 | def get_spare_data(ifc_file: ifcopenshell.file, element: ifcopenshell.entity_instance) -> dict[str, Any]: |
nothing calls this directly
no test coverage detected