From 7543836f33a4c295b345981e46e71e90a608d736 Mon Sep 17 00:00:00 2001 From: Bruno Postle Date: Fri, 27 Feb 2026 10:33:29 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20work=20schedule=20PredefinedType=20BASELI?= =?UTF-8?q?NE=20=E2=86=92=20PLANNED?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bonsai's Gantt chart code special-cases BASELINE schedules by following IsDeclaredBy[0].RelatingObject to find a parent comparison schedule. Our schedule has no such relationship, causing an IndexError that silently prevents the Gantt from rendering. PLANNED is the correct type for a forward-looking construction programme. Also updates the CLAUDE.md recipe to use PLANNED. --- CLAUDE.md | 2 +- _test_simple.ifc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 3feb9f4..4dfc44a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -264,7 +264,7 @@ Physical elements are linked to tasks via `IfcRelAssignsToProcess`. Task orderin ``` # Work plan and schedule ifc_edit("sequence.add_work_plan", '{"name": "Construction Plan", "predefined_type": "ACTUAL"}') -ifc_edit("sequence.add_work_schedule", '{"name": "Construction Schedule", "predefined_type": "BASELINE", "work_plan": ""}') +ifc_edit("sequence.add_work_schedule", '{"name": "Construction Schedule", "predefined_type": "PLANNED", "work_plan": ""}') # Phase (summary) tasks ifc_edit("sequence.add_task", '{"work_schedule": "", "name": "Foundations", "identification": "P1", "predefined_type": "CONSTRUCTION"}') diff --git a/_test_simple.ifc b/_test_simple.ifc index b5b6164..8c818e6 100644 --- a/_test_simple.ifc +++ b/_test_simple.ifc @@ -3581,7 +3581,7 @@ DATA; #3939=IFCQUANTITYLENGTH('Height',$,$,1.98333302140235,$); #3940=IFCQUANTITYLENGTH('Width',$,$,0.995000004768371,$); #3941=IFCWORKPLAN('1oOoanHin6f8fl3gUJuoYx',$,'Construction Plan',$,$,$,'2026-02-23T23:51:39.573925',$,$,$,$,'2026-02-23T23:51:39.574118',$,.ACTUAL.); -#3942=IFCWORKSCHEDULE('0gYQ15_sr4nwN2F_1efOoY',$,'Construction Schedule',$,$,$,'2026-02-23T23:51:47.596165',$,$,$,$,'2026-02-23T23:51:47.595572',$,.BASELINE.); +#3942=IFCWORKSCHEDULE('0gYQ15_sr4nwN2F_1efOoY',$,'Construction Schedule',$,$,$,'2026-02-23T23:51:47.596165',$,$,$,$,'2026-02-23T23:51:47.595572',$,.PLANNED.); #3943=IFCRELAGGREGATES('1PJwHSLpn3Mh49pzMn9Rem',$,$,$,#3941,(#3942)); #3944=IFCTASK('1Qs8dBzcLBfwZ1G_S9OLDO',$,'Foundations',$,$,'P1',$,$,$,.F.,$,#3981,.CONSTRUCTION.); #3945=IFCRELASSIGNSTOCONTROL('2n7hOA4qL2awNg9ByXtVkz',$,$,$,(#3944,#3946,#3947,#3948,#3949),$,#3942);