Correct task-product input/output semantics in ifcos-impl-sequence - #1
Open
PahlawanJoey wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
repro_ap10.py
Summary
This PR corrects the task-to-product relationship documented by the
ifcos-impl-sequenceskill.The current AP-10 guidance reverses IFC input/output semantics:
A product constructed or installed by a task is a task output and should be linked using
sequence.assign_product.A product used, consumed, demolished, maintained, or otherwise operated on by a task is a task input and should be linked using
sequence.assign_process.The affected guidance has been made consistent across the skill, examples, anti-patterns, and method reference.
Problem
AP-10 currently presents
sequence.assign_processas the standard way to link a construction task to the product it creates, while markingsequence.assign_productas incorrect.This contradicts:
the decision tree elsewhere in the same skill;
the existing
assign_productmethod reference;the official IfcOpenShell API documentation;
the behaviour of
ifcopenshell.util.sequence.It also incorrectly describes
assign_productas meaning that a product “controls” a task. IFC controls useIfcRelAssignsToControl, which is a different relationship.Correct IFC semantics
Purpose | IfcOpenShell API | IFC relationship | Standard query -- | -- | -- | -- Product built or installed by a task | sequence.assign_product(relating_product=product, related_object=task) | IfcRelAssignsToProduct | get_task_outputs(task) Product used or operated on by a task | sequence.assign_process(relating_process=task, related_object=product) | IfcRelAssignsToProcess / IfcTask.OperatesOn | get_task_inputs(task) Control assigned to a task | Control assignment API | IfcRelAssignsToControl | Separate control relationshipA minimal verification is:
Following the previous AP-10 recommendation causes a newly constructed wall to appear as an input in
OperatesOn, whileget_task_outputs(task)remains empty.Additional API correction
The general v0.8+ warning about passing products as a list incorrectly used
assign_processas an example.In IfcOpenShell 0.8.5:
sequence.assign_processaccepts onerelated_object;sequence.assign_productaccepts onerelated_object.The updated text names APIs that actually use list arguments and avoids applying that rule to APIs with singular parameters.
Files updated
skills/ifcopenshell/impl/ifcos-impl-sequence/SKILL.mdskills/ifcopenshell/impl/ifcos-impl-sequence/references/anti-patterns.mdskills/ifcopenshell/impl/ifcos-impl-sequence/references/examples.mdskills/ifcopenshell/impl/ifcos-impl-sequence/references/methods.mdReferences
IfcOpenShell
assign_productIfcOpenShell
assign_processIfcOpenShell sequence utilities
This is a documentation-only correction; no runtime code is changed.