bSI-InfraRoom / bSI-InfraRoom/IFC-Specification

IFC4.3 Legacy Issues part 2

Open
#475 4 comments 0 reactions 0 assignees View on GitHub
Legacy
Dominant language
No language data
Stars
27
Forks
24
PR merge metrics
No merged PRs in 30d

Description

EXPRESS function IfcBaseAxis has following code inside:

`
Factor := IfcDotProduct(Axis2, U[2]);

IF (Factor < 0.0) THEN (* Here is an untolerant comparison for REAL value *)

U[2].DirectionRatios[1] := -U[2].DirectionRatios[1];

U[2].DirectionRatios[2] := -U[2].DirectionRatios[2];

END_IF;
`

we've faced with issue when input vectors have 'slightly' negative values like:
#8130=IFCDIRECTION((1.,0.,-4.27642353614751E-50));
#8131=IFCDIRECTION((-4.48534439404616E-68,1.,0.));
so this comparison gets negative Factor, and the result of IfcBaseAxis is also incorrect.

This couldn't be solved on the interpretation level as specification says comparisons <, > etc. should be performed without precision taken into account. Here probably the way is to use tolerant comparisons in this and all similar places within schema, as we know the context of comparison.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the EXPRESS function IfcBaseAxis and the supplied IfcDirection vectors, then review similar REAL comparisons throughout the schema. Confirm the interpretation-level limitation described in the issue and define tolerant comparisons that prevent the incorrect IfcBaseAxis result for slightly negative values.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.