-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alb999 rail alignment value constraints #37
base: main
Are you sure you want to change the base?
Changes from all commits
887e60e
bc748b1
cca7b3a
d1c1dfb
8a33377
50e65d8
f1501a7
7df2ab7
a19d839
3044bad
5272bcd
7563038
287a576
d84ff3a
5501255
58c942b
ca8bf07
c3b4a2c
e2d5cfa
0b67572
08ae8d6
a488fe3
45690e3
427fbf0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
__pycache__ | ||
/.vscode | ||
/.vscode |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@implementer-agreement | ||
@ALB | ||
Feature: IfcAlignment start station | ||
|
||
An IfcAlignment must have a start station, which is instantiated as an IfcReferent | ||
with PredefinedType set to REFERENCEMARKER or STATION. The IfcReferent must have the | ||
property Pset_Stationing.Station. | ||
|
||
Scenario: An alignment must nest at least one referent | ||
|
||
Given An IfcAlignment | ||
Then A relationship IfcRelNests exists from IfcAlignment to IfcReferent | ||
|
||
Scenario: At least one of these referents must have type REFERENCEMARKER or STATION | ||
|
||
Given An IfcAlignment | ||
And A relationship IfcRelNests from IfcAlignment to IfcReferent and following that | ||
And Its attribute PredefinedType | ||
|
||
Then at least "1" value must be "REFERENCEMARKER" or "STATION" | ||
|
||
Scenario: At least one of these referents typed REFERENCEMARKER or STATION must have a value for Pset_Stationing.Station | ||
|
||
Given An IfcAlignment | ||
And A relationship IfcRelNests from IfcAlignment to IfcReferent and following that | ||
And PredefinedType = "REFERENCEMARKER" or "STATION" | ||
And Its value for property Pset_Stationing.Station | ||
|
||
Then at least "1" value must exist |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@implementer-agreement | ||
@ALB | ||
Feature: Rail Alignment value constraints | ||
|
||
Background: Rail alignment | ||
|
||
Given An IfcAlignment | ||
And A relationship IfcRelReferencedInSpatialStructure to IfcAlignment from IfcRail | ||
|
||
Scenario: Agreement on allowed values for horizontal segment types | ||
|
||
Given A relationship IfcRelNests from IfcAlignment to IfcAlignmentHorizontal and following that | ||
Given A relationship IfcRelNests from IfcAlignmentHorizontal to IfcAlignmentSegment and following that | ||
Given Its attribute DesignParameters | ||
Given Its attribute PredefinedType | ||
Comment on lines
+12
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you meant There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no functional difference between that. |
||
|
||
Then the value must be "LINE" or "CIRCULARARC" or "CLOTHOID" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@informal-proposition | ||
@GEM | ||
Feature: GEM003 - Unique Representation Identifier | ||
|
||
Scenario: A Shape Representation identifier must not be used twice within the product representation of an IfcProduct element | ||
|
||
Given An IfcProduct | ||
And Its attribute Representation | ||
And Its attribute Representations | ||
And Its attribute RepresentationIdentifier | ||
|
||
Then The values must be unique |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@implementer-agreement | ||
@OJP | ||
Feature: OJP001 - Relative placement for elements aggregated to another element | ||
|
||
Scenario: Agreement on the relative placement of IfcElements being a part of another IfcElement through the relationship IfcRelAggregates | ||
|
||
Given A file with Schema Identifier "IFC2X3" | ||
And An IfcElement | ||
And A relationship IfcRelAggregates from IfcElement to IfcElement | ||
Then The relative placement of that IfcElement must be provided by an IfcLocalPlacement entity | ||
Comment on lines
+9
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Which There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not going to reply here, this feature shows up here, because my PR was based on two un-merged PRs. See #27. |
||
And The PlacementRelTo attribute must point to the IfcLocalPlacement of the container element established with IfcRelAggregates relationship | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What if the container is placed by |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,13 @@ | |
from behave.model import Scenario | ||
|
||
def before_feature(context, feature): | ||
# @tfk we have this strange issue between stack frames blending over | ||
# between features so we need to preserve only the bottom two stack | ||
# frames when beginning a new feature. | ||
context._stack = context._stack[-2:] | ||
Comment on lines
5
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Aah, that explains it .. I tried to add context._push() with at the 'Its values' statement to retrieve it later and run into exactly this (another feature somehow not working anymore ..). |
||
|
||
context.model = ifcopenshell.open(context.config.userdata["input"]) | ||
Scenario.continue_after_failed_step = True | ||
|
||
def before_step(context, step): | ||
context.step = step |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is
and following that
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, I've updated the PR description. You can find the answer under "traversal". In short it means that, in the first case without
and following that
thea relationship ...
statement checks whether such a relationship exists, but keeps the context on the previously active node (alignment). In the second case we actually descend according to the nesting structure, so that the attribute DesignParameters is read from the IfcAlignmentSegment.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes a lot of sense, nice to see that this approach is useful for more rules (also referring to your explanation in the top of this PR). For the 0.6 sprint we are encountering a rule (briefly discussed in a previous meeting) for which we will need attributes for both the previously activate node and the following elements. That seems to be possible this way. Or maybe we will need to make it more explicit.