mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
test_copy_work_schedule - cover ifc2x3 support
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
import datetime
|
||||
import ifcopenshell.util.date
|
||||
import ifcopenshell.util.element
|
||||
from math import floor
|
||||
from functools import cache
|
||||
from typing import Union, Literal, Optional
|
||||
@@ -280,7 +281,7 @@ def get_task_work_schedule(task: ifcopenshell.entity_instance) -> Union[ifcopens
|
||||
|
||||
|
||||
def get_nested_tasks(task: ifcopenshell.entity_instance) -> list[ifcopenshell.entity_instance]:
|
||||
return [object for rel in task.IsNestedBy or [] for object in rel.RelatedObjects if object.is_a("IfcTask")]
|
||||
return [obj for obj in ifcopenshell.util.element.get_components(task) if obj.is_a("IfcTask")]
|
||||
|
||||
|
||||
def get_parent_task(task: ifcopenshell.entity_instance) -> Union[ifcopenshell.entity_instance, None]:
|
||||
|
||||
Reference in New Issue
Block a user