(model, field_label, name, element, field_type)
| 118 | |
| 119 | |
| 120 | def get_element_result_data(model, field_label, name, element, field_type): |
| 121 | points = get_element_data(model, name, element)["points"] |
| 122 | if field_type == "InternalForces": |
| 123 | if element["geometry_type"] == "Edge": |
| 124 | return { |
| 125 | "N": [round(model.point_data[field_label][p][0], 4) for p in points], |
| 126 | "VY": [round(model.point_data[field_label][p][1], 4) for p in points], |
| 127 | "VZ": [round(model.point_data[field_label][p][2], 4) for p in points], |
| 128 | "MT": [round(model.point_data[field_label][p][3], 4) for p in points], |
| 129 | "MFY": [round(model.point_data[field_label][p][4], 4) for p in points], |
| 130 | "MFZ": [round(model.point_data[field_label][p][5], 4) for p in points], |
| 131 | } |
| 132 | |
| 133 | elif element["geometry_type"] == "Face": |
| 134 | if len(model.point_data[field_label][points[0]]) == 8: |
| 135 | offset = 0 |
| 136 | elif len(model.point_data[field_label][points[0]]) == 14: |
| 137 | offset = 6 |
| 138 | else: |
| 139 | assert ( |
| 140 | False |
| 141 | ), f"Internal force field with {len(model.point_data[field_label][points[0]])} field values for {field_label} and {element['Name']} " |
| 142 | |
| 143 | return { |
| 144 | "NXX": [round(model.point_data[field_label][p][offset + 0], 4) for p in points], |
| 145 | "NYY": [round(model.point_data[field_label][p][offset + 1], 4) for p in points], |
| 146 | "NXY": [round(model.point_data[field_label][p][offset + 2], 4) for p in points], |
| 147 | "MXX": [round(model.point_data[field_label][p][offset + 3], 4) for p in points], |
| 148 | "MYY": [round(model.point_data[field_label][p][offset + 4], 4) for p in points], |
| 149 | "MXY": [round(model.point_data[field_label][p][offset + 5], 4) for p in points], |
| 150 | "QX": [round(model.point_data[field_label][p][offset + 6], 4) for p in points], |
| 151 | "QY": [round(model.point_data[field_label][p][offset + 7], 4) for p in points], |
| 152 | } |
| 153 | |
| 154 | if field_type == "Displacements": |
| 155 | return { |
| 156 | "DX": [round(model.point_data[field_label][p][0], 4) for p in points], |
| 157 | "DY": [round(model.point_data[field_label][p][1], 4) for p in points], |
| 158 | "DZ": [round(model.point_data[field_label][p][2], 4) for p in points], |
| 159 | "DRX": [round(model.point_data[field_label][p][3], 4) for p in points], |
| 160 | "DRY": [round(model.point_data[field_label][p][4], 4) for p in points], |
| 161 | "DRZ": [round(model.point_data[field_label][p][5], 4) for p in points], |
| 162 | } |
| 163 | |
| 164 | |
| 165 | def results_to_ifc(ifc_file, ifc_model, rmed_path, global_case, field_types, data): |
no test coverage detected