MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / get_load_combinations

Method get_load_combinations

src/ifc2ca/ifc2ca.py:216–230  ·  view source on GitHub ↗
(self, model: ios.entity_instance | None = None)

Source from the content-addressed store, hash-verified

214 return [item for item in self.file.by_type("IfcStructuralLoadCase") if item.PredefinedType == "LOAD_CASE"]
215
216 def get_load_combinations(self, model: ios.entity_instance | None = None):
217 if model is not None:
218 if model.LoadedBy is None:
219 return []
220 load_groups = [
221 item
222 for item in model.LoadedBy
223 if (item.is_a("IfcStructuralLoadGroup") and item.PredefinedType == "LOAD_COMBINATION")
224 ]
225 load_groups.sort(key=lambda x: x.id())
226 return load_groups
227
228 return [
229 item for item in self.file.by_type("IfcStructuralLoadGroup") if item.PredefinedType == "LOAD_COMBINATION"
230 ]
231
232 def get_combination_assignments(self, load_combination: ios.entity_instance):
233 return [

Callers 3

get_load_casesMethod · 0.95
parse_modelMethod · 0.95
get_infoMethod · 0.95

Calls 4

sortMethod · 0.80
is_aMethod · 0.45
idMethod · 0.45
by_typeMethod · 0.45

Tested by

no test coverage detected