Skip to content

IfcPropertyBoundedValue tests #371

Open
@atomczak

Description

@atomczak

The test cases for bounded property values (IfcPropertyBoundedValue) make no sense to me. It might be that I'm not getting how it should work.

My intuition is that if someone puts a value in IDS for such a property, it should apply to the "setpoint" value (last attribute), is that true? And if someone puts IDS restrictions with min/max, they should not exceed the upper/lower bounds of the property. edit: And if someone puts IDS restrictions with min/max, the bounds in IFC should be within the IDS bounds (IDS: 100-200, IFC: 120-140 --> pass; IDS: 100-200, IFC: 90-110 --> fail). See the question from #372 (comment).

However, the test cases called "any_matching_value_in_a_bounded_property_will_pass" have those set values:

  • pass-any_matching_value_in_a_bounded_property_will_pass_1_4.ids --> 1
  • pass-any_matching_value_in_a_bounded_property_will_pass_2_4.ids --> 5
  • pass-any_matching_value_in_a_bounded_property_will_pass_3_4.ids --> 3
  • fail-any_matching_value_in_a_bounded_property_will_pass_4_4.ids --> 2

and they are all checked against the same IFC model, just with different names:

  • pass-any_matching_value_in_a_bounded_property_will_pass_1_4.ifc
  • pass-any_matching_value_in_a_bounded_property_will_pass_2_4.ifc
  • pass-any_matching_value_in_a_bounded_property_will_pass_3_4.ifc
  • fail-any_matching_value_in_a_bounded_property_will_pass_4_4.ifc

which contains the following attributes:

  • UpperBoundValue=5000
  • LowerBoundValue=1000
  • SetPointValue=3000

I get that the IFC is using a millimetre unit, while the IDS is in metres, so we are comparing 1, 5, 3, 2 with >=1; <=5; ==3. To me, all four tests should fail.

I tested those four pairs with IfcTester, and all yielded the expected results, so I must be missing something.

@Moult, did you write those? Can you shed some light?

Metadata

Metadata

Assignees

No one assigned

    Labels

    agreeddocumentationImprovements or additions to documentationplease contributeA PR is welcome for this issue. Please target the `development` branch.tests

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions