Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion features/resources/IFC2X3/pset_definitions.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
property_set_name,applicable_entities,applicable_type_value,property_definitions
Name,applicable_entities,applicable_type_value,property_definitions
Pset_ActionRequest,['IfcActionRequest'],,"[{'property_name': 'RequestSourceType', 'property_type': 'IfcPropertyEnumeratedValue', 'data_type': {'instance': 'PEnum_RequestSourceType', 'values': ['Email', 'Fax', 'Phone', 'Post', 'Verbal', 'Other', 'NotKnown', 'Unset']}}, {'property_name': 'RequestSourceLabel', 'property_type': 'IfcPropertySingleValue', 'data_type': {'instance': 'IfcLabel', 'unit_type': 'None'}}, {'property_name': 'RequestSourceName', 'property_type': 'IfcPropertyReferenceValue', 'data_type': {'instance': 'IfcPerson'}}, {'property_name': 'RequestDescription', 'property_type': 'IfcPropertySingleValue', 'data_type': {'instance': 'IfcText', 'unit_type': 'None'}}, {'property_name': 'RequestComments', 'property_type': 'IfcPropertySingleValue', 'data_type': {'instance': 'IfcText', 'unit_type': 'None'}}, {'property_name': 'Status', 'property_type': 'IfcPropertyEnumeratedValue', 'data_type': {'instance': 'PEnum_RequestStatus', 'values': ['Hold', 'NoAction', 'Schedule', 'Urgent', 'Other', 'NotKnown', 'Unset']}}]"
Pset_ActorCommon,['IfcActor'],,"[{'property_name': 'NumberOfActors', 'property_type': 'IfcPropertySingleValue', 'data_type': {'instance': 'IfcCountMeasure', 'unit_type': 'None'}}, {'property_name': 'Category', 'property_type': 'IfcPropertySingleValue', 'data_type': {'instance': 'IfcLabel', 'unit_type': 'None'}}, {'property_name': 'SkillLevel', 'property_type': 'IfcPropertySingleValue', 'data_type': {'instance': 'IfcLabel', 'unit_type': 'None'}}]"
Pset_ActuatorTypeCommon,['IfcActuatorType'],,"[{'property_name': 'FailPosition', 'property_type': 'IfcPropertyEnumeratedValue', 'data_type': {'instance': 'PEnum_FailPosition', 'values': ['FailOpen', 'FailClosed', 'NotKnown', 'Unset']}}, {'property_name': 'ManualOverride', 'property_type': 'IfcPropertySingleValue', 'data_type': {'instance': 'IfcBoolean', 'unit_type': 'None'}}]"
Expand Down
13 changes: 13 additions & 0 deletions features/resources/IFC2X3/valid_ConversionBasedUnits.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Name,UnitType,ConversionFactor,SIUnitPrefix,SIUnitName,Description
inch,LENGTHUNIT,25.4,MILLI,METRE
foot,LENGTHUNIT,304.8,MILLI,METRE
yard,LENGTHUNIT,914.,MILLI,METRE
mile,LENGTHUNIT,1609.,,METRE
acre,AREAUNIT,4046.86,,SQUARE_METRE
litre,VOLUMEUNIT,0.001,,CUBIC_METRE
pint UK,VOLUMEUNIT,0.000568,,CUBIC_METRE
pint US,VOLUMEUNIT,0.000473,,CUBIC_METRE
gallon UK,VOLUMEUNIT,0.00454,,CUBIC_METRE
gallon US,VOLUMEUNIT,0.003785,,CUBIC_METRE
ounce,MASSUNIT,28.35,,GRAM
pound,MASSUNIT,0.454,KILO,GRAM
2 changes: 1 addition & 1 deletion features/resources/IFC4/pset_definitions.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
property_set_name,template_type,applicable_entities,applicable_type_value,property_definitions
Name,template_type,applicable_entities,applicable_type_value,property_definitions
Pset_ActionRequest,PSET_TYPEDRIVENOVERRIDE,['IfcActionRequest'],IfcActionRequest,"[{'property_name': 'RequestSourceLabel', 'property_type': 'IfcPropertySingleValue', 'data_type': {'instance': 'IfcLabel', 'unit_type': 'None'}}, {'property_name': 'RequestSourceName', 'property_type': 'IfcPropertyReferenceValue', 'data_type': {'instance': 'IfcPerson'}}, {'property_name': 'RequestComments', 'property_type': 'IfcPropertySingleValue', 'data_type': {'instance': 'IfcText', 'unit_type': 'None'}}]"
Pset_ActorCommon,PSET_TYPEDRIVENOVERRIDE,['IfcActor'],IfcActor,"[{'property_name': 'NumberOfActors', 'property_type': 'IfcPropertySingleValue', 'data_type': {'instance': 'IfcCountMeasure', 'unit_type': 'None'}}, {'property_name': 'Category', 'property_type': 'IfcPropertySingleValue', 'data_type': {'instance': 'IfcLabel', 'unit_type': 'None'}}, {'property_name': 'SkillLevel', 'property_type': 'IfcPropertySingleValue', 'data_type': {'instance': 'IfcLabel', 'unit_type': 'None'}}]"
Pset_ActuatorPHistory,PSET_PERFORMANCEDRIVEN,['IfcActuator'],IfcActuator,"[{'property_name': 'Position', 'property_type': 'IfcPropertyReferenceValue', 'data_type': {'instance': 'IfcTimeSeries'}}, {'property_name': 'Quality', 'property_type': 'IfcPropertyReferenceValue', 'data_type': {'instance': 'IfcTimeSeries'}}, {'property_name': 'Status', 'property_type': 'IfcPropertyReferenceValue', 'data_type': {'instance': 'IfcTimeSeries'}}]"
Expand Down
2 changes: 1 addition & 1 deletion features/resources/IFC4/qto_definitions.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
property_set_name,template_type,applicable_entities,applicable_type_value,property_definitions
Name,template_type,applicable_entities,applicable_type_value,property_definitions
Qto_BuildingBaseQuantities,QTO_OCCURRENCEDRIVEN,['IfcBuilding'],IfcBuilding,"[{'property_name': 'Height', 'property_type': 'IfcQuantityLength'}, {'property_name': 'EavesHeight', 'property_type': 'IfcQuantityLength'}, {'property_name': 'FootprintArea', 'property_type': 'IfcQuantityArea'}, {'property_name': 'GrossFloorArea', 'property_type': 'IfcQuantityArea'}, {'property_name': 'NetFloorArea', 'property_type': 'IfcQuantityArea'}, {'property_name': 'GrossVolume', 'property_type': 'IfcQuantityVolume'}, {'property_name': 'NetVolume', 'property_type': 'IfcQuantityVolume'}]"
Qto_BuildingStoreyBaseQuantities,QTO_OCCURRENCEDRIVEN,['IfcBuildingStorey'],IfcBuildingStorey,"[{'property_name': 'GrossHeight', 'property_type': 'IfcQuantityLength'}, {'property_name': 'NetHeigtht', 'property_type': 'IfcQuantityLength'}, {'property_name': 'GrossPerimeter', 'property_type': 'IfcQuantityLength'}, {'property_name': 'GrossFloorArea', 'property_type': 'IfcQuantityArea'}, {'property_name': 'NetFloorArea', 'property_type': 'IfcQuantityArea'}, {'property_name': 'GrossVolume', 'property_type': 'IfcQuantityVolume'}, {'property_name': 'NetVolume', 'property_type': 'IfcQuantityVolume'}]"
Qto_OpeningElementBaseQuantities,QTO_OCCURRENCEDRIVEN,['IfcOpeningElement'],IfcOpeningElement,"[{'property_name': 'Width', 'property_type': 'IfcQuantityLength'}, {'property_name': 'Height', 'property_type': 'IfcQuantityLength'}, {'property_name': 'Depth', 'property_type': 'IfcQuantityLength'}, {'property_name': 'Area', 'property_type': 'IfcQuantityArea'}, {'property_name': 'Volume', 'property_type': 'IfcQuantityVolume'}]"
Expand Down
33 changes: 33 additions & 0 deletions features/resources/IFC4/valid_ConversionBasedUnits.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Name,UnitType,ConversionFactor,SIUnitPrefix,SIUnitName,Description
inch,LENGTHUNIT,25.4,MILLI,METRE
foot,LENGTHUNIT,304.8,MILLI,METRE
yard,LENGTHUNIT,914.,MILLI,METRE
mile,LENGTHUNIT,1609.,,METRE
square inch,AREAUNIT,0.0006452,,SQUARE_METRE
square foot,AREAUNIT,0.09290,,SQUARE_METRE
square yard,AREAUNIT,0.83612736,,SQUARE_METRE
acre,AREAUNIT,4046.86,,SQUARE_METRE
square mile,AREAUNIT,2588881.,,SQUARE_METRE
cubic inch,VOLUMEUNIT,0.00001639,,CUBIC_METRE
cubic foot,VOLUMEUNIT,0.02832,,CUBIC_METRE
cubic yard,VOLUMEUNIT,0.7636,,CUBIC_METRE
litre,VOLUMEUNIT,0.001,,CUBIC_METRE
fluid ounce UK,VOLUMEUNIT,0.0000284130625,,CUBIC_METRE
fluid ounce US,VOLUMEUNIT,0.00002957353,,CUBIC_METRE
pint UK,VOLUMEUNIT,0.000568,,CUBIC_METRE
pint US,VOLUMEUNIT,0.000473,,CUBIC_METRE
gallon UK,VOLUMEUNIT,0.004546,,CUBIC_METRE
gallon US,VOLUMEUNIT,0.003785,,CUBIC_METRE
degree,PLANEANGLEUNIT,0.017453292519943295,,RADIAN
ounce,MASSUNIT,28.35,,GRAM
pound,MASSUNIT,0.454,KILO,GRAM
ton UK,MASSUNIT,1016.0469088,KILO,GRAM,also known as long ton or gross ton or shipper's ton
ton US,MASSUNIT,907.18474,KILO,GRAM,also known as short ton or net ton
lbf,FORCEUNIT,4.4482216153,,NEWTON,also known as pound-force
kip,FORCEUNIT,4448.2216153,,NEWTON,also known as kilopound-force
psi,PRESSUREUNIT,6894.7572932,,PASCAL,also known as pound-force per square inch
ksi,PRESSUREUNIT,6894757.2932,,PASCAL,also known as kilopound-force per square inch
minute,TIMEUNIT,60.,,SECOND
hour,TIMEUNIT,3600.,,SECOND
day,TIMEUNIT,86400.,,SECOND
btu,ENERGYUNIT,1055.056,,JOULE, also known as British Thermal Unit
2 changes: 1 addition & 1 deletion features/resources/IFC4X3/pset_definitions.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
property_set_name,template_type,applicable_entities,applicable_type_value,property_definitions
Name,template_type,applicable_entities,applicable_type_value,property_definitions
Pset_ActionRequest,PSET_OCCURRENCEDRIVEN,['IfcActionRequest'],IfcActionRequest,"[{'property_name': 'RequestSourceLabel', 'property_type': 'IfcPropertySingleValue', 'data_type': {'instance': 'IfcLabel', 'unit_type': 'None'}}, {'property_name': 'RequestSourceName', 'property_type': 'IfcPropertyReferenceValue', 'data_type': {'instance': 'IfcPerson'}}, {'property_name': 'RequestComments', 'property_type': 'IfcPropertySingleValue', 'data_type': {'instance': 'IfcText', 'unit_type': 'None'}}]"
Pset_ActorCommon,PSET_OCCURRENCEDRIVEN,['IfcActor'],IfcActor,"[{'property_name': 'NumberOfActors', 'property_type': 'IfcPropertySingleValue', 'data_type': {'instance': 'IfcCountMeasure', 'unit_type': 'None'}}, {'property_name': 'ActorCategory', 'property_type': 'IfcPropertySingleValue', 'data_type': {'instance': 'IfcLabel', 'unit_type': 'None'}}, {'property_name': 'SkillLevel', 'property_type': 'IfcPropertySingleValue', 'data_type': {'instance': 'IfcLabel', 'unit_type': 'None'}}]"
Pset_ActuatorPHistory,PSET_PERFORMANCEDRIVEN,['IfcActuator'],IfcActuator,"[{'property_name': 'PositionHistory', 'property_type': 'IfcPropertyReferenceValue', 'data_type': {'instance': 'IfcTimeSeries'}}, {'property_name': 'QualityHistory', 'property_type': 'IfcPropertyReferenceValue', 'data_type': {'instance': 'IfcTimeSeries'}}, {'property_name': 'StatusHistory', 'property_type': 'IfcPropertyReferenceValue', 'data_type': {'instance': 'IfcTimeSeries'}}]"
Expand Down
2 changes: 1 addition & 1 deletion features/resources/IFC4X3/qto_definitions.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
property_set_name,template_type,applicable_entities,applicable_type_value,property_definitions
Name,template_type,applicable_entities,applicable_type_value,property_definitions
Qto_ActuatorBaseQuantities,QTO_TYPEDRIVENOVERRIDE,"['IfcActuator', 'IfcActuatorType']","IfcActuator,IfcActuatorType","[{'property_name': 'GrossWeight', 'property_type': 'IfcQuantityWeight'}]"
Qto_AirTerminalBaseQuantities,QTO_TYPEDRIVENOVERRIDE,"['IfcAirTerminal', 'IfcAirTerminalType']","IfcAirTerminal,IfcAirTerminalType","[{'property_name': 'GrossWeight', 'property_type': 'IfcQuantityWeight'}, {'property_name': 'Perimeter', 'property_type': 'IfcQuantityLength'}, {'property_name': 'TotalSurfaceArea', 'property_type': 'IfcQuantityArea'}]"
Qto_AirTerminalBoxTypeBaseQuantities,QTO_TYPEDRIVENOVERRIDE,"['IfcAirTerminalBox', 'IfcAirTerminalBoxType']","IfcAirTerminalBox,IfcAirTerminalBoxType","[{'property_name': 'GrossWeight', 'property_type': 'IfcQuantityWeight'}]"
Expand Down
34 changes: 34 additions & 0 deletions features/resources/IFC4X3/valid_ConversionBasedUnits.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Name,UnitType,ConversionFactor,SIUnitPrefix,SIUnitName,Description
inch,LENGTHUNIT,25.4,MILLI,METRE
foot,LENGTHUNIT,304.8,MILLI,METRE
US survey foot,LENGTHUNIT,304.80060960122,MILLI,METRE,the approximate value of 1200/3937 meters
yard,LENGTHUNIT,914.,MILLI,METRE
mile,LENGTHUNIT,1609.,,METRE
square inch,AREAUNIT,0.0006452,,SQUARE_METRE
square foot,AREAUNIT,0.09290,,SQUARE_METRE
square yard,AREAUNIT,0.83612736,,SQUARE_METRE
acre,AREAUNIT,4046.86,,SQUARE_METRE
square mile,AREAUNIT,2588881.,,SQUARE_METRE
cubic inch,VOLUMEUNIT,0.00001639,,CUBIC_METRE
cubic foot,VOLUMEUNIT,0.02832,,CUBIC_METRE
cubic yard,VOLUMEUNIT,0.7636,,CUBIC_METRE
litre,VOLUMEUNIT,0.001,,CUBIC_METRE
fluid ounce UK,VOLUMEUNIT,0.0000284130625,,CUBIC_METRE
fluid ounce US,VOLUMEUNIT,0.00002957353,,CUBIC_METRE
pint UK,VOLUMEUNIT,0.000568,,CUBIC_METRE
pint US,VOLUMEUNIT,0.000473,,CUBIC_METRE
gallon UK,VOLUMEUNIT,0.004546,,CUBIC_METRE
gallon US,VOLUMEUNIT,0.003785,,CUBIC_METRE
degree,PLANEANGLEUNIT,0.017453292519943295,,RADIAN
ounce,MASSUNIT,28.35,,GRAM
pound,MASSUNIT,0.454,KILO,GRAM
ton UK,MASSUNIT,1016.0469088,KILO,GRAM,also known as long ton or gross ton or shipper's ton
ton US,MASSUNIT,907.18474,KILO,GRAM,also known as short ton or net ton
lbf,FORCEUNIT,4.4482216153,,NEWTON,also known as pound-force
kip,FORCEUNIT,4448.2216153,,NEWTON,also known as kilopound-force
psi,PRESSUREUNIT,6894.7572932,,PASCAL,also known as pound-force per square inch
ksi,PRESSUREUNIT,6894757.2932,,PASCAL,also known as kilopound-force per square inch
minute,TIMEUNIT,60.,,SECOND
hour,TIMEUNIT,3600.,,SECOND
day,TIMEUNIT,86400.,,SECOND
btu,ENERGYUNIT,1055.056,,JOULE, also known as British Thermal Unit
42 changes: 42 additions & 0 deletions features/rules/PJS/PJS001_Correct-conversion-based-units.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@implementer-agreement
@PJS
@version1
Feature: PJS001 - Correct conversion based units

The rule verifies that conversion-based units used per Concept Template 4.1.9.9
(https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/concepts/Project_Context/Project_Units/content.html)
have names and corresponding conversion factors per the table of recommended values for each schema version.
IFC 4X3: https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcConversionBasedUnit.htm
IFC 4: https://standards.buildingsmart.org/IFC/RELEASE/IFC4/FINAL/HTML/schema/ifcmeasureresource/lexical/ifcconversionbasedunit.htm
IFC 2X3: https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/FINAL/HTML/ifcmeasureresource/lexical/ifcconversionbasedunit.htm

Background: Selection of conversion-based units in default unit assignment
Given an .IfcProject.
Given its attribute .UnitsInContext.
Given its attribute .Units.
Given [its entity type] ^is^ 'IfcConversionBasedUnit'

Scenario: Validating correct names for area, length, and volume units
Given .UnitType. ^is^ 'AREAUNIT' or 'LENGTHUNIT' or 'VOLUMEUNIT' or 'PLANEANGLEUNIT'
Then its attribute .Name. must be defined [according to the table] 'valid_ConversionBasedUnits'

Scenario: Validating correct conversion factors
Then its attribute .ConversionFactor. must be defined [according to the table] 'valid_ConversionBasedUnits'

Scenario: Validating that the conversion is based on SI units
Given its attribute .ConversionFactor.
Given its attribute .UnitComponent.
Then [its entity type] ^is^ 'IfcSIUnit'

Scenario Outline: Validating that the conversion is based on the correct SI unit
Given .UnitType. ^is^ '<UnitType>'
Given its attribute .ConversionFactor.
Given its attribute .UnitComponent.
Then the value of attribute .Name. must be '<CorrespondingSIUnit>'

Examples:
| UnitType | CorrespondingSIUnit |
| AREAUNIT | SQUARE_METRE |
| LENGTHUNIT | METRE |
| VOLUMEUNIT | CUBIC_METRE |
| PLANEANGLEUNIT | RADIAN |
2 changes: 1 addition & 1 deletion features/steps/steps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from givens import attributes, entities, relationships, values
from thens import alignment, attributes, geometry, nesting, reference, relations, values, existence
from steps import attribute_selection, attribute_value, entity_selection, model_traversal, representation, \
propertysets_and_qtys, crs
propertysets_qtys_units, crs
Loading