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

Method parse_combination_loads

src/ifc2ca/ifc2ca.py:683–696  ·  view source on GitHub ↗
(self, elements, load_combinations, load_case_ids)

Source from the content-addressed store, hash-verified

681 data["loadsLC"]["FZ"][iLC] += FZ * load_group_coeff * load_case_coeff * force_projection_coeff
682
683 def parse_combination_loads(self, elements, load_combinations, load_case_ids):
684 for element in elements:
685 if element["loads"] is not None:
686 for key, _ in element["loads"]["loadsCOMB"].items():
687 element["loads"]["loadsCOMB"][key] = np.array([0.0 for _ in load_combinations])
688
689 for iComb, comb in enumerate(load_combinations):
690 comb_factors = self.get_combination_factors(comb, load_case_ids)
691 # print(comb_factors)
692 for element in elements:
693 if element["loads"] is None:
694 continue
695 for key, load in element["loads"]["loadsLC"].items():
696 element["loads"]["loadsCOMB"][key][iComb] = round(comb_factors.dot(load), 4)
697
698 def get_combination_factors(self, load_combination, load_case_ids: list[int]):
699 comb_coeff = 1.0 if load_combination.Coefficient is None else load_combination.Coefficient

Callers 1

parse_modelMethod · 0.95

Calls 2

itemsMethod · 0.45

Tested by

no test coverage detected