[WIP] Implementing new unit tests for IFC4X3_ RC4#478
[WIP] Implementing new unit tests for IFC4X3_ RC4#478Elvira2227 wants to merge 11 commits intotumcms:developmentfrom
Conversation
pjanck
left a comment
There was a problem hiding this comment.
General comment: test for IfcSpiral and IfcCurveSegment (or how it's called) in the HasEssentialIfcEntity tests.
...mas/IFC4X3_RC4/bloss-curve_100.0_300_1000_1_Meter/src/bloss-curve_100.0_300_1000_1_Meter.cpp
Outdated
Show resolved
Hide resolved
...s/IFC4X3_RC4/circular-arc_100.0_300_1000_1_Meter/src/circular-arc_100.0_300_1000_1_Meter.cpp
Outdated
Show resolved
Hide resolved
...s/Schemas/IFC4X3_RC4/clothoid_100.0_300_1000_1_Meter/src/clothoid_100.0_300_1000_1_Meter.cpp
Outdated
Show resolved
Hide resolved
| #pragma once | ||
| #ifndef F7302D7B_948F_445E_8DB9_C722295B8E2E | ||
| #define F7302D7B_948F_445E_8DB9_C722295B8E2E | ||
|
|
||
| #if !defined OIP_NAMESPACE_UNITTESTS_SCHEMA_IFC4X3_RC4_BEGIN | ||
| #define OIP_NAMESPACE_UNITTESTS_SCHEMA_IFC4X3_RC4_BEGIN \ | ||
| namespace OpenInfraPlatform {\ | ||
| namespace UnitTests {\ | ||
| namespace Schema {\ | ||
| namespace IFC4X3_RC4 { | ||
| #endif | ||
|
|
||
| #if !defined OIP_NAMESPACE_UNITTESTS_SCHEMA_IFC4X3_RC4_END | ||
| #define OIP_NAMESPACE_UNITTESTS_SCHEMA_IFC4X3_RC4_END \ | ||
| }\ | ||
| }\ | ||
| }\ | ||
| } | ||
|
|
||
| #endif | ||
| #endif /* F7302D7B_948F_445E_8DB9_C722295B8E2E */ |
There was a problem hiding this comment.
Are these defines used anywhere?
jschlenger
left a comment
There was a problem hiding this comment.
Generally take a closer look on which IfcEntities are really essential to make the UT work.
...s/IFC4X3_RC4/cosine-curve_100.0_300_1000_1_Meter/src/cosine-curve_100.0_300_1000_1_Meter.cpp
Outdated
Show resolved
Hide resolved
UnitTests/Schemas/IFC4X3_RC4/cubic_100.0_300_1000_1_Meter/src/cubic_100.0_300_1000_1_Meter.cpp
Outdated
Show resolved
Hide resolved
...IFC4X3_RC4/helmert-curve_100.0_300_1000_1_Meter/src/helmert-curve_100.0_300_1000_1_Meter.cpp
Outdated
Show resolved
Hide resolved
...hemas/IFC4X3_RC4/sine-curve_100.0_300_1000_1_Meter/src/sine-curve_100.0_300_1000_1_Meter.cpp
Outdated
Show resolved
Hide resolved
...IFC4X3_RC4/viennese-bend_100.0_300_1000_1_Meter/src/viennese-bend_100.0_300_1000_1_Meter.cpp
Outdated
Show resolved
Hide resolved
|
In the last commit new unit tests were added for
And some screen shots: |
|
And there is a question about how does the |
jschlenger
left a comment
There was a problem hiding this comment.
As discussed live:
- only top view (all the other views can be deleted because there are only 2D lines)
- new issue for IfcSine (since we are missing the corresponding GetDirection and GetPoint function)
- Files that produce error messages have missing references in the IFC file
|
In the last commit
|
jschlenger
left a comment
There was a problem hiding this comment.
The name of circular-arc_100.0_300_1000_1_Meter_top123.png should be changed slightly since we just put that name for a quick test (or maybe the file isn't needed anymore then you should delete it).
Although the unit tests for cosine curve, sine curve, vienesse bend, and cubic curve do not work yet I would suggest to adapt the UTs to compare only the top view.
jschlenger
left a comment
There was a problem hiding this comment.
Looks fine to me. Except for the four UTs that are still missing a couple of functions to work properly all of the UTs are passing?
| buw::storeImage(testPath("circular-arc_100.0_300_1000_1_Meter_right.png").string(), image_right); | ||
| buw::storeImage(testPath("circular-arc_100.0_300_1000_1_Meter_back.png").string(), image_back); | ||
| */ | ||
| //buw::storeImage(testPath("circular-arc_100.0_300_1000_1_Meter_top123.png").string(), image_top); |
There was a problem hiding this comment.
A ...top123 image is committed as well. Is there a specific reason? Remove otherwise.
| #34 = IFCRELNESTS('1FNFyHAJeHwuDtwDZHIYIj', $, $, $, #21, (#30)); | ||
| #35 = IFCCOMPOSITECURVE((#36), .F.); | ||
| #36 = IFCCURVESEGMENT(.DISCONTINUOUS., #42, IFCPARAMETERVALUE(0.), IFCPARAMETERVALUE(100.), #45); | ||
| #36 = IFCCURVESEGMENT(.DISCONTINUOUS., #42, IFCPARAMETERVALUE(0.), IFCNONNEGATIVELENGTHMEASURE(100.), #45); |
There was a problem hiding this comment.
Is there a reason that we had to change this?
There was a problem hiding this comment.
I thought there was a mistake there, because in other ifc's always come IFCPARAMETERVALU and than IFCNONNEGATIVELENGTHMEASURE. Is it correct?
There was a problem hiding this comment.
In this case it doesn't matter, so you can leave it as is or change it: I only have a preference to not change the original file if not necessary.



Some unit tests have been added as an example for the version IFC4X3_ RC4
All tests are missing a
IFCHasAnEssentialEntitytest, please addNo screenshots were taken. For example, only the one main screenshot is defined for a clothoid, an error is generated for the rest.
NOTE: this pull request was created to replace the old #477, because the old PR was showing changes from other reguest, which is an error