mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-18 19:30:25 +00:00
beb0db89e5
msp2ifc parsed the XML and built the IFC itself, so a programme read differently depending on whether it came out of MS Project or P6. It now parses only, and hands the parsed programme to ScheduleIfcGenerator the way p62ifc does. Calendars, statuses, task times and resources are therefore the shared ones, and a reader no longer has to know which tool planned the schedule. Three things MS Project does differently needed handling rather than sharing. It has no work breakdown structure: there is one flat task list and an OutlineLevel column, and a task with anything indented under it is a summary whose dates are rolled up rather than planned. Those become IfcTasks without an IfcTaskTime, as a P6 WBS node does. Summaries and leaves also interleave, and a planner expects a summary to stay where they put it, so the tree is walked in export order instead of through create_tasks, which sorts nodes ahead of activities. And a link may hang off a summary, which P6 cannot do, so create_rel_sequences resolves both ends against summaries too -- IfcRelSequence relates two IfcProcesses and does not require a time on either. Calendar handling flattens what MS Project stores as differences against a base calendar, since IfcWorkCalendar has no such notion, and reads holidays from whichever of the two spellings the export uses rather than both. Recurring exceptions are skipped, because the recurrence is not readable from the export and guessing wrong silently moves every date computed from the calendar. In common.py the UDF and activity-code property set names become class attributes. They keep their P6 names by default, but MS Project's extended attributes are not P6 user-defined fields and now land in MSP_ExtendedAttribute rather than under a name that says P6. IsMilestone likewise prefers a source that states it outright -- MS Project has a Milestone flag -- and falls back to the zero-duration test, which is all P6 gives us, so the other importers are unaffected. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>