-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ALS016 Industry best practice for horizontal alignment geometric cont…
…inuity (IVS-20) (#243) * initial wip checkpoint for ALS016 implementation * revise for row-major ordering of transform returned from ifcos * fix test data * remove curvature considerations for rule version 1; remove duplicate code in step implementation * Update features/steps/thens/alignment.py per review comment Co-authored-by: Thomas Krijnen <[email protected]> * Break "pairwise" into a separate step Co-authored-by: Thomas Krijnen <[email protected]> * add clarity on toloerances used to determine continuity * address review comments. New step implementation needs additional work to limit amount of tuple unpacking * fix for failing tests; address additional review comments * - Edit unit test files to only fail a single scenario - Edit geometry calculations to accomodate multiple types of placements (previously they assumed IfcAxis2Placement2D or IfcAxis2Placement3D, which wouldn't accomodate other valid placement types such as IfcAxis2PlacementLinear) --------- Co-authored-by: Thomas Krijnen <[email protected]>
- Loading branch information
Showing
10 changed files
with
1,616 additions
and
7 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
features/ALS016_Alignment-horizontal-segment-geometric-continuity.feature
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
@industry-practice | ||
@ALS | ||
@version1 | ||
|
||
Feature: ALS016 - Alignment horizontal segment geometric continuity | ||
|
||
The rule verifies that there is geometric continuity between segments in an IfcCompositeCurve. | ||
The calculated end position and tangent vector of segment `n` is compared to the provided placement of segment `n + 1`. | ||
A warning is emitted if the calculated difference is greater than the applicable tolerance. | ||
The tolerance for positional continuity is taken from the precision of the applicable geometric context. | ||
The tolerance for tangential continuity is taken from the precision of the applicable geometric context and | ||
adjusted based on the length of the alignment segment. | ||
|
||
Background: | ||
|
||
Given A model with Schema "IFC4.3" | ||
Given An IfcAlignment | ||
Given Its attribute Representation | ||
Given Its attribute Representations | ||
Given RepresentationType = 'Curve2D' | ||
Given All referenced instances | ||
Given Its Entity Type is 'IfcCompositeCurve' | ||
Given Its attribute Segments | ||
Given Its Entity Type is 'IfcCurveSegment' | ||
Given The values grouped pairwise at depth 1 | ||
|
||
Scenario: Geometric continuity in position | ||
|
||
Then Each segment must have geometric continuity in position | ||
|
||
Scenario: Geometric continuity in tangency | ||
|
||
Then Each segment must have geometric continuity in tangency |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
import itertools | ||
|
||
from validation_handling import gherkin_ifc | ||
from . import ValidationOutcome, OutcomeSeverity | ||
|
||
|
||
@gherkin_ifc.step("Its values") | ||
@gherkin_ifc.step("Its values excluding {excluding}") | ||
def step_impl(context, inst, excluding = None): | ||
yield ValidationOutcome(instance_id=inst.get_info(recursive=True, include_identifier=False, ignore=excluding), severity=OutcomeSeverity.PASSED) | ||
def step_impl(context, inst, excluding=None): | ||
yield ValidationOutcome(instance_id=inst.get_info(recursive=True, include_identifier=False, ignore=excluding), | ||
severity=OutcomeSeverity.PASSED) | ||
|
||
|
||
@gherkin_ifc.step("The values grouped pairwise at depth 1") | ||
def step_impl(context, inst): | ||
inst = itertools.pairwise(inst) | ||
yield ValidationOutcome(instance_id=inst, severity=OutcomeSeverity.PASSED) |
This file contains 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
This file contains 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
Oops, something went wrong.