(
ifc_file: ifcopenshell.file, settings: ifcopenshell.geom.settings, elements: list[ifcopenshell.entity_instance]
)
| 375 | |
| 376 | @staticmethod |
| 377 | def create_iterators( |
| 378 | ifc_file: ifcopenshell.file, settings: ifcopenshell.geom.settings, elements: list[ifcopenshell.entity_instance] |
| 379 | ) -> list[Union[ifcopenshell.geom.iterator, IteratorForTypes]]: |
| 380 | elements_sorted: defaultdict[bool, list[ifcopenshell.entity_instance]] = defaultdict(list) |
| 381 | iterators = [] |
| 382 | for element in elements: |
| 383 | elements_sorted[element.is_a("IfcTypeProduct")].append(element) |
| 384 | if True in elements_sorted: |
| 385 | iterators.append(IteratorForTypes(ifc_file, settings, elements_sorted[True])) |
| 386 | if False in elements_sorted: |
| 387 | iterators.append( |
| 388 | ifcopenshell.geom.iterator(settings, ifc_file, multiprocessing.cpu_count(), include=elements) |
| 389 | ) |
| 390 | return iterators |
| 391 | |
| 392 | @classmethod |
| 393 | def get_segment_length(cls, element: ifcopenshell.entity_instance) -> Union[float, None]: |
no test coverage detected