(ifc_file: ifcopenshell.file, element: ifcopenshell.entity_instance)
| 644 | |
| 645 | |
| 646 | def get_assembly_data(ifc_file: ifcopenshell.file, element: ifcopenshell.entity_instance) -> dict[str, Any]: |
| 647 | rel, relating_object, related_object = element |
| 648 | |
| 649 | if relating_object.is_a("IfcMaterialLayerSet"): |
| 650 | name = val(relating_object.LayerSetName) |
| 651 | parent_name = name |
| 652 | if name: |
| 653 | name += " assembly" |
| 654 | assembly_type = "Layer" |
| 655 | sheet_name = "Type" |
| 656 | description = val(relating_object.LayerSetName) |
| 657 | else: |
| 658 | name = val(relating_object.Name) |
| 659 | parent_name = name |
| 660 | assembly_type = "Fixed" |
| 661 | sheet_name = get_sheet_name(relating_object) |
| 662 | description = val(rel.Description) or val(rel.Name) |
| 663 | |
| 664 | child_name = val(related_object.Name) |
| 665 | history = get_history(ifc_file) |
| 666 | |
| 667 | return { |
| 668 | "Name": name, |
| 669 | "CreatedBy": get_email_from_history(history) if history else None, |
| 670 | "CreatedOn": ifcopenshell.util.date.ifc2datetime(history.CreationDate).isoformat() if history else None, |
| 671 | "SheetName": sheet_name, |
| 672 | "ParentName": parent_name, |
| 673 | "ChildNames": child_name, |
| 674 | "AssemblyType": assembly_type, |
| 675 | "ExternalSystem": history.OwningApplication.ApplicationFullName if history else None, |
| 676 | "ExternalObject": rel.is_a() if rel else relating_object.is_a(), |
| 677 | "ExternalIdentifier": rel.GlobalId if rel else None, |
| 678 | "Description": description, |
| 679 | } |
| 680 | |
| 681 | |
| 682 | def get_connection_data(ifc_file: ifcopenshell.file, element: ifcopenshell.entity_instance) -> dict[str, Any]: |
nothing calls this directly
no test coverage detected