@walpa said:
This is the question ... I don't know how it would work in Blender, but in FreeCAD it seems a little complicated to do a nested task with multiple workschedules (I may be mistaken).
With our assumption that we could control (or nested tasks since) based on the IfcWorkSchedules's predfined type , this is what I tried with ifcopenshell python:
import ifcopenshell
file = ifcopenshell.open(r'C:\Osarch\blenderbim.ifc')
workschedule_planned = file.createIfcWorkPlan(ifcopenshell.guid.new(),Name='WorkSchedule Construction - Planned Baseline',PredefinedType ='PLANNED')
workschedule_actual = file.createIfcWorkPlan(ifcopenshell.guid.new(),Name='WorkSchedule Construction - Actual Baseline',PredefinedType ='PLANNED')
task_slab_1 = file.createIfcTask(ifcopenshell.guid.new(),Name='Concrete Slab 1 Construction')
task_wall_1 = file.createIfcTask(ifcopenshell.guid.new(),Name='Masonery Wall 1 Construction')
actual_control_1 = file.createIfcRelAssignsToControl(ifcopenshell.guid.new(),Name='Actual Planning Control')
planned_control_1 = file.createIfcRelAssignsToControl(ifcopenshell.guid.new(),Name='Planned Scheduled Control')
actual_control_1.RelatingControl = workpschedule_actual
planned_control_1.RelatingControl = workpschedule_planned
actual_control_1.RelatedObjects = [task_slab_1, task_wall_1]
planned_control_1.RelatedObjects = [task_slab_1, task_wall_1]
When we query these task_slab_1
, this is returned:
for assignement in task_slab_1.HasAssignments:
print(assignement.RelatingControl)
120=IfcWorkPlan('0zbzDzhebAsuLBBS2k7Uq_',$,'WorkSchedule Construction - Actual Baseline',$,$,$,$,$,$,$,$,$,$,.PLANNED.)
119=IfcWorkPlan('1YKGOaG_L8HxsT$yMTgxzo',$,'WorkSchedule Construction - Planned Baseline',$,$,$,$,$,$,$,$,$,$,.PLANNED.)
When we query the workschedules' related objects, this is returned:
workschedule_planned.Controls[0].RelatedObjects
(#121=IfcTask('3J$46k5Hj4wfKeTIwViMvu',$,'Concrete Slab 1 Construction',$,$,$,$,$,$,$,$,$,$), #122=IfcTask('02hx9c7vL7DBwSHeUQzQlS',$,'Masonery Wall 1 Construction',$,$,$,$,$,$,$,$,$,$))
workschedule_actual.Controls[0].RelatedObjects
(#121=IfcTask('3J$46k5Hj4wfKeTIwViMvu',$,'Concrete Slab 1 Construction',$,$,$,$,$,$,$,$,$,$), #122=IfcTask('02hx9c7vL7DBwSHeUQzQlS',$,'Masonery Wall 1 Construction',$,$,$,$,$,$,$,$,$,$))
I'm still very hesitant with the assumptions regarding controling tasks based on the predefined type. I think we should perhaps take the problem the other way round and see what kind of IFC 4D data is currently exported from software like Synchro ( it seems like it exports IFC data, but I don't know if they include their planning within it? it appears they are also stuck on old IFC schemas).
Can we have a joint discussion on all this and more with @Moult, @duncan, @lukas , @iosvarms and interested individuals to discuss the best way forward? It would be good to build on Moult's existing efforts which are being integrated in BlenderBIM and incrementally increase the complexity of the 4D and 5D options.
I'd also love to join the conversion with the maker of chronaIFC if this is still planned?