From 787149da1339ef0a1add7ee020fc94a9a242ad1e Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 17 Oct 2023 11:04:46 +0200 Subject: [PATCH] Regen express rule code: lowercase str comparison in express rule generated code --- .../ifcopenshell/express/rules/IFC2X3.py | 34 +++++++++---------- .../ifcopenshell/express/rules/IFC4.py | 20 +++++------ .../ifcopenshell/express/rules/IFC4X1.py | 20 +++++------ .../ifcopenshell/express/rules/IFC4X2.py | 20 +++++------ .../ifcopenshell/express/rules/IFC4X3.py | 20 +++++------ .../ifcopenshell/express/rules/IFC4X3_ADD1.py | 20 +++++------ .../ifcopenshell/express/rules/IFC4X3_RC1.py | 20 +++++------ .../ifcopenshell/express/rules/IFC4X3_RC2.py | 20 +++++------ .../ifcopenshell/express/rules/IFC4X3_RC3.py | 20 +++++------ .../ifcopenshell/express/rules/IFC4X3_RC4.py | 20 +++++------ .../ifcopenshell/express/rules/IFC4X3_TC1.py | 20 +++++------ 11 files changed, 117 insertions(+), 117 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC2X3.py b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC2X3.py index 20d8d3cc8a..3d11ee521f 100644 --- a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC2X3.py +++ b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC2X3.py @@ -3579,7 +3579,7 @@ class IfcBoxAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False class IfcCompoundPlaneAngleMeasure_WR1: SCOPE = 'type' @@ -3642,7 +3642,7 @@ class IfcFontStyle_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'italic', 'oblique']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'italic', 'oblique']) is not False class IfcFontVariant_WR1: SCOPE = 'type' @@ -3651,7 +3651,7 @@ class IfcFontVariant_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps']) is not False class IfcFontWeight_WR1: SCOPE = 'type' @@ -3660,7 +3660,7 @@ class IfcFontWeight_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False class IfcHeatingValueMeasure_WR1: SCOPE = 'type' @@ -3768,7 +3768,7 @@ class IfcTextAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['left', 'right', 'center', 'justify']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['left', 'right', 'center', 'justify']) is not False class IfcTextDecoration_WR1: SCOPE = 'type' @@ -3777,7 +3777,7 @@ class IfcTextDecoration_WR1: @staticmethod def __call__(self): - assert (self in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False class IfcTextTransformation_WR1: SCOPE = 'type' @@ -3786,7 +3786,7 @@ class IfcTextTransformation_WR1: @staticmethod def __call__(self): - assert (self in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False class Ifc2DCompositeCurve_WR1: SCOPE = 'entity' @@ -4137,7 +4137,7 @@ class IfcBlobTexture_WR11: @staticmethod def __call__(self): - assert (getattr(self, 'RasterFormat', INDETERMINATE) in ['bmp', 'jpg', 'gif', 'png']) is not False + assert (getattr(getattr(self, 'RasterFormat', INDETERMINATE), 'lower', INDETERMINATE)() in ['bmp', 'jpg', 'gif', 'png']) is not False class IfcBoilerType_WR1: SCOPE = 'entity' @@ -4736,7 +4736,7 @@ class IfcDimensionCalloutRelationship_WR11: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['primary', 'secondary']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['primary', 'secondary']) is not False class IfcDimensionCalloutRelationship_WR12: SCOPE = 'entity' @@ -4819,7 +4819,7 @@ class IfcDimensionPair_WR11: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['chained', 'parallel']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['chained', 'parallel']) is not False class IfcDimensionPair_WR12: SCOPE = 'entity' @@ -4934,7 +4934,7 @@ class IfcDraughtingPreDefinedColour_WR31: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False class IfcDraughtingPreDefinedCurveFont_WR31: SCOPE = 'entity' @@ -4943,7 +4943,7 @@ class IfcDraughtingPreDefinedCurveFont_WR31: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False class IfcDraughtingPreDefinedTextFont_WR31: SCOPE = 'entity' @@ -4952,7 +4952,7 @@ class IfcDraughtingPreDefinedTextFont_WR31: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['iso3098-1fonta', 'iso3098-1fontb']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['iso3098-1fonta', 'iso3098-1fontb']) is not False class IfcDuctFittingType_WR2: SCOPE = 'entity' @@ -5782,7 +5782,7 @@ class IfcPreDefinedDimensionSymbol_WR31: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['arclength', 'conicaltaper', 'counterbore', 'countersink', 'depth', 'diameter', 'plusminus', 'radius', 'slope', 'sphericaldiameter', 'sphericalradius', 'square']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['arclength', 'conicaltaper', 'counterbore', 'countersink', 'depth', 'diameter', 'plusminus', 'radius', 'slope', 'sphericaldiameter', 'sphericalradius', 'square']) is not False class IfcPreDefinedPointMarkerSymbol_WR31: SCOPE = 'entity' @@ -5791,7 +5791,7 @@ class IfcPreDefinedPointMarkerSymbol_WR31: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['asterisk', 'circle', 'dot', 'plus', 'square', 'triangle', 'x']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['asterisk', 'circle', 'dot', 'plus', 'square', 'triangle', 'x']) is not False class IfcPreDefinedTerminatorSymbol_WR31: SCOPE = 'entity' @@ -5800,7 +5800,7 @@ class IfcPreDefinedTerminatorSymbol_WR31: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['blankedarrow', 'blankedbox', 'blankeddot', 'dimensionorigin', 'filledarrow', 'filledbox', 'filleddot', 'integralsymbol', 'openarrow', 'slash', 'unfilledarrow']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['blankedarrow', 'blankedbox', 'blankeddot', 'dimensionorigin', 'filledarrow', 'filledbox', 'filleddot', 'integralsymbol', 'openarrow', 'slash', 'unfilledarrow']) is not False class IfcProcedure_WR1: SCOPE = 'entity' @@ -6786,7 +6786,7 @@ class IfcStructuredDimensionCallout_WR31: @staticmethod def __call__(self): contents = getattr(self, 'Contents', INDETERMINATE) - assert (sizeof([ato for ato in [con for con in getattr(self, 'contents', INDETERMINATE) if 'ifc2x3.ifcannotationtextoccurrence' in typeof(con)] if not getattr(ato, 'Name', INDETERMINATE) in ['dimensionvalue', 'tolerancevalue', 'unittext', 'prefixtext', 'suffixtext']]) == 0) is not False + assert (sizeof([ato for ato in [con for con in getattr(self, 'contents', INDETERMINATE) if 'ifc2x3.ifcannotationtextoccurrence' in typeof(con)] if not getattr(getattr(ato, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['dimensionvalue', 'tolerancevalue', 'unittext', 'prefixtext', 'suffixtext']]) == 0) is not False class IfcStyledItem_WR11: SCOPE = 'entity' diff --git a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4.py b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4.py index 7a52a036d4..c93ed6fc21 100644 --- a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4.py +++ b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4.py @@ -4313,7 +4313,7 @@ class IfcBoxAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False class IfcCardinalPointReference_GreaterThanZero: SCOPE = 'type' @@ -4394,7 +4394,7 @@ class IfcFontStyle_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'italic', 'oblique']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'italic', 'oblique']) is not False class IfcFontVariant_WR1: SCOPE = 'type' @@ -4403,7 +4403,7 @@ class IfcFontVariant_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps']) is not False class IfcFontWeight_WR1: SCOPE = 'type' @@ -4412,7 +4412,7 @@ class IfcFontWeight_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False class IfcHeatingValueMeasure_WR1: SCOPE = 'type' @@ -4511,7 +4511,7 @@ class IfcTextAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['left', 'right', 'center', 'justify']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['left', 'right', 'center', 'justify']) is not False class IfcTextDecoration_WR1: SCOPE = 'type' @@ -4520,7 +4520,7 @@ class IfcTextDecoration_WR1: @staticmethod def __call__(self): - assert (self in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False class IfcTextTransformation_WR1: SCOPE = 'type' @@ -4529,7 +4529,7 @@ class IfcTextTransformation_WR1: @staticmethod def __call__(self): - assert (self in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False class IfcActorRole_WR1: SCOPE = 'entity' @@ -5178,7 +5178,7 @@ class IfcBlobTexture_SupportedRasterFormat: @staticmethod def __call__(self): - assert (getattr(self, 'RasterFormat', INDETERMINATE) in ['bmp', 'jpg', 'gif', 'png']) is not False + assert (getattr(getattr(self, 'RasterFormat', INDETERMINATE), 'lower', INDETERMINATE)() in ['bmp', 'jpg', 'gif', 'png']) is not False class IfcBlobTexture_RasterCodeByteStream: SCOPE = 'entity' @@ -6580,7 +6580,7 @@ class IfcDraughtingPreDefinedColour_PreDefinedColourNames: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False class IfcDraughtingPreDefinedCurveFont_PreDefinedCurveFontNames: SCOPE = 'entity' @@ -6589,7 +6589,7 @@ class IfcDraughtingPreDefinedCurveFont_PreDefinedCurveFontNames: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False class IfcDuctFitting_CorrectPredefinedType: SCOPE = 'entity' diff --git a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X1.py b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X1.py index 3f55d11b1a..9e7b4ff535 100644 --- a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X1.py +++ b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X1.py @@ -4404,7 +4404,7 @@ class IfcBoxAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False class IfcCardinalPointReference_GreaterThanZero: SCOPE = 'type' @@ -4485,7 +4485,7 @@ class IfcFontStyle_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'italic', 'oblique']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'italic', 'oblique']) is not False class IfcFontVariant_WR1: SCOPE = 'type' @@ -4494,7 +4494,7 @@ class IfcFontVariant_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps']) is not False class IfcFontWeight_WR1: SCOPE = 'type' @@ -4503,7 +4503,7 @@ class IfcFontWeight_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False class IfcHeatingValueMeasure_WR1: SCOPE = 'type' @@ -4602,7 +4602,7 @@ class IfcTextAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['left', 'right', 'center', 'justify']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['left', 'right', 'center', 'justify']) is not False class IfcTextDecoration_WR1: SCOPE = 'type' @@ -4611,7 +4611,7 @@ class IfcTextDecoration_WR1: @staticmethod def __call__(self): - assert (self in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False class IfcTextTransformation_WR1: SCOPE = 'type' @@ -4620,7 +4620,7 @@ class IfcTextTransformation_WR1: @staticmethod def __call__(self): - assert (self in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False class IfcActorRole_WR1: SCOPE = 'entity' @@ -5269,7 +5269,7 @@ class IfcBlobTexture_SupportedRasterFormat: @staticmethod def __call__(self): - assert (getattr(self, 'RasterFormat', INDETERMINATE) in ['bmp', 'jpg', 'gif', 'png']) is not False + assert (getattr(getattr(self, 'RasterFormat', INDETERMINATE), 'lower', INDETERMINATE)() in ['bmp', 'jpg', 'gif', 'png']) is not False class IfcBlobTexture_RasterCodeByteStream: SCOPE = 'entity' @@ -6671,7 +6671,7 @@ class IfcDraughtingPreDefinedColour_PreDefinedColourNames: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False class IfcDraughtingPreDefinedCurveFont_PreDefinedCurveFontNames: SCOPE = 'entity' @@ -6680,7 +6680,7 @@ class IfcDraughtingPreDefinedCurveFont_PreDefinedCurveFontNames: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False class IfcDuctFitting_CorrectPredefinedType: SCOPE = 'entity' diff --git a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X2.py b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X2.py index b676c21cfb..20dccc22ed 100644 --- a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X2.py +++ b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X2.py @@ -4555,7 +4555,7 @@ class IfcBoxAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False class IfcCardinalPointReference_GreaterThanZero: SCOPE = 'type' @@ -4636,7 +4636,7 @@ class IfcFontStyle_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'italic', 'oblique']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'italic', 'oblique']) is not False class IfcFontVariant_WR1: SCOPE = 'type' @@ -4645,7 +4645,7 @@ class IfcFontVariant_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps']) is not False class IfcFontWeight_WR1: SCOPE = 'type' @@ -4654,7 +4654,7 @@ class IfcFontWeight_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False class IfcHeatingValueMeasure_WR1: SCOPE = 'type' @@ -4753,7 +4753,7 @@ class IfcTextAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['left', 'right', 'center', 'justify']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['left', 'right', 'center', 'justify']) is not False class IfcTextDecoration_WR1: SCOPE = 'type' @@ -4762,7 +4762,7 @@ class IfcTextDecoration_WR1: @staticmethod def __call__(self): - assert (self in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False class IfcTextTransformation_WR1: SCOPE = 'type' @@ -4771,7 +4771,7 @@ class IfcTextTransformation_WR1: @staticmethod def __call__(self): - assert (self in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False class IfcActorRole_WR1: SCOPE = 'entity' @@ -5450,7 +5450,7 @@ class IfcBlobTexture_SupportedRasterFormat: @staticmethod def __call__(self): - assert (getattr(self, 'RasterFormat', INDETERMINATE) in ['bmp', 'jpg', 'gif', 'png']) is not False + assert (getattr(getattr(self, 'RasterFormat', INDETERMINATE), 'lower', INDETERMINATE)() in ['bmp', 'jpg', 'gif', 'png']) is not False class IfcBlobTexture_RasterCodeByteStream: SCOPE = 'entity' @@ -6892,7 +6892,7 @@ class IfcDraughtingPreDefinedColour_PreDefinedColourNames: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False class IfcDraughtingPreDefinedCurveFont_PreDefinedCurveFontNames: SCOPE = 'entity' @@ -6901,7 +6901,7 @@ class IfcDraughtingPreDefinedCurveFont_PreDefinedCurveFontNames: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False class IfcDuctFitting_CorrectPredefinedType: SCOPE = 'entity' diff --git a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3.py b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3.py index 46af263cad..b8075fcda6 100644 --- a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3.py +++ b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3.py @@ -5180,7 +5180,7 @@ class IfcBoxAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False class IfcCardinalPointReference_GreaterThanZero: SCOPE = 'type' @@ -5261,7 +5261,7 @@ class IfcFontStyle_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'italic', 'oblique']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'italic', 'oblique']) is not False class IfcFontVariant_WR1: SCOPE = 'type' @@ -5270,7 +5270,7 @@ class IfcFontVariant_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps']) is not False class IfcFontWeight_WR1: SCOPE = 'type' @@ -5279,7 +5279,7 @@ class IfcFontWeight_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False class IfcHeatingValueMeasure_WR1: SCOPE = 'type' @@ -5378,7 +5378,7 @@ class IfcTextAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['left', 'right', 'center', 'justify']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['left', 'right', 'center', 'justify']) is not False class IfcTextDecoration_WR1: SCOPE = 'type' @@ -5387,7 +5387,7 @@ class IfcTextDecoration_WR1: @staticmethod def __call__(self): - assert (self in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False class IfcTextTransformation_WR1: SCOPE = 'type' @@ -5396,7 +5396,7 @@ class IfcTextTransformation_WR1: @staticmethod def __call__(self): - assert (self in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False class IfcActorRole_WR1: SCOPE = 'entity' @@ -6123,7 +6123,7 @@ class IfcBlobTexture_SupportedRasterFormat: @staticmethod def __call__(self): - assert (getattr(self, 'RasterFormat', INDETERMINATE) in ['bmp', 'jpg', 'gif', 'png']) is not False + assert (getattr(getattr(self, 'RasterFormat', INDETERMINATE), 'lower', INDETERMINATE)() in ['bmp', 'jpg', 'gif', 'png']) is not False class IfcBoiler_CorrectPredefinedType: SCOPE = 'entity' @@ -7712,7 +7712,7 @@ class IfcDraughtingPreDefinedColour_PreDefinedColourNames: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False class IfcDraughtingPreDefinedCurveFont_PreDefinedCurveFontNames: SCOPE = 'entity' @@ -7721,7 +7721,7 @@ class IfcDraughtingPreDefinedCurveFont_PreDefinedCurveFontNames: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False class IfcDuctFitting_CorrectPredefinedType: SCOPE = 'entity' diff --git a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_ADD1.py b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_ADD1.py index 6efc55b614..789b936646 100644 --- a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_ADD1.py +++ b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_ADD1.py @@ -5130,7 +5130,7 @@ class IfcBoxAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False class IfcCardinalPointReference_GreaterThanZero: SCOPE = 'type' @@ -5211,7 +5211,7 @@ class IfcFontStyle_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'italic', 'oblique']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'italic', 'oblique']) is not False class IfcFontVariant_WR1: SCOPE = 'type' @@ -5220,7 +5220,7 @@ class IfcFontVariant_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps']) is not False class IfcFontWeight_WR1: SCOPE = 'type' @@ -5229,7 +5229,7 @@ class IfcFontWeight_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False class IfcHeatingValueMeasure_WR1: SCOPE = 'type' @@ -5328,7 +5328,7 @@ class IfcTextAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['left', 'right', 'center', 'justify']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['left', 'right', 'center', 'justify']) is not False class IfcTextDecoration_WR1: SCOPE = 'type' @@ -5337,7 +5337,7 @@ class IfcTextDecoration_WR1: @staticmethod def __call__(self): - assert (self in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False class IfcTextTransformation_WR1: SCOPE = 'type' @@ -5346,7 +5346,7 @@ class IfcTextTransformation_WR1: @staticmethod def __call__(self): - assert (self in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False class IfcActorRole_WR1: SCOPE = 'entity' @@ -6073,7 +6073,7 @@ class IfcBlobTexture_SupportedRasterFormat: @staticmethod def __call__(self): - assert (getattr(self, 'RasterFormat', INDETERMINATE) in ['bmp', 'jpg', 'gif', 'png']) is not False + assert (getattr(getattr(self, 'RasterFormat', INDETERMINATE), 'lower', INDETERMINATE)() in ['bmp', 'jpg', 'gif', 'png']) is not False class IfcBoiler_CorrectPredefinedType: SCOPE = 'entity' @@ -7661,7 +7661,7 @@ class IfcDraughtingPreDefinedColour_PreDefinedColourNames: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False class IfcDraughtingPreDefinedCurveFont_PreDefinedCurveFontNames: SCOPE = 'entity' @@ -7670,7 +7670,7 @@ class IfcDraughtingPreDefinedCurveFont_PreDefinedCurveFontNames: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False class IfcDuctFitting_CorrectPredefinedType: SCOPE = 'entity' diff --git a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_RC1.py b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_RC1.py index ead551f82c..9355c0b196 100644 --- a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_RC1.py +++ b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_RC1.py @@ -5115,7 +5115,7 @@ class IfcBoxAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False class IfcCardinalPointReference_GreaterThanZero: SCOPE = 'type' @@ -5196,7 +5196,7 @@ class IfcFontStyle_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'italic', 'oblique']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'italic', 'oblique']) is not False class IfcFontVariant_WR1: SCOPE = 'type' @@ -5205,7 +5205,7 @@ class IfcFontVariant_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps']) is not False class IfcFontWeight_WR1: SCOPE = 'type' @@ -5214,7 +5214,7 @@ class IfcFontWeight_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False class IfcHeatingValueMeasure_WR1: SCOPE = 'type' @@ -5313,7 +5313,7 @@ class IfcTextAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['left', 'right', 'center', 'justify']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['left', 'right', 'center', 'justify']) is not False class IfcTextDecoration_WR1: SCOPE = 'type' @@ -5322,7 +5322,7 @@ class IfcTextDecoration_WR1: @staticmethod def __call__(self): - assert (self in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False class IfcTextTransformation_WR1: SCOPE = 'type' @@ -5331,7 +5331,7 @@ class IfcTextTransformation_WR1: @staticmethod def __call__(self): - assert (self in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False class IfcActorRole_WR1: SCOPE = 'entity' @@ -6010,7 +6010,7 @@ class IfcBlobTexture_SupportedRasterFormat: @staticmethod def __call__(self): - assert (getattr(self, 'RasterFormat', INDETERMINATE) in ['bmp', 'jpg', 'gif', 'png']) is not False + assert (getattr(getattr(self, 'RasterFormat', INDETERMINATE), 'lower', INDETERMINATE)() in ['bmp', 'jpg', 'gif', 'png']) is not False class IfcBlobTexture_RasterCodeByteStream: SCOPE = 'entity' @@ -7564,7 +7564,7 @@ class IfcDraughtingPreDefinedColour_PreDefinedColourNames: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False class IfcDraughtingPreDefinedCurveFont_PreDefinedCurveFontNames: SCOPE = 'entity' @@ -7573,7 +7573,7 @@ class IfcDraughtingPreDefinedCurveFont_PreDefinedCurveFontNames: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False class IfcDuctFitting_CorrectPredefinedType: SCOPE = 'entity' diff --git a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_RC2.py b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_RC2.py index 7cb03faf7f..f609e02f19 100644 --- a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_RC2.py +++ b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_RC2.py @@ -5156,7 +5156,7 @@ class IfcBoxAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False class IfcCardinalPointReference_GreaterThanZero: SCOPE = 'type' @@ -5237,7 +5237,7 @@ class IfcFontStyle_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'italic', 'oblique']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'italic', 'oblique']) is not False class IfcFontVariant_WR1: SCOPE = 'type' @@ -5246,7 +5246,7 @@ class IfcFontVariant_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps']) is not False class IfcFontWeight_WR1: SCOPE = 'type' @@ -5255,7 +5255,7 @@ class IfcFontWeight_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False class IfcHeatingValueMeasure_WR1: SCOPE = 'type' @@ -5354,7 +5354,7 @@ class IfcTextAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['left', 'right', 'center', 'justify']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['left', 'right', 'center', 'justify']) is not False class IfcTextDecoration_WR1: SCOPE = 'type' @@ -5363,7 +5363,7 @@ class IfcTextDecoration_WR1: @staticmethod def __call__(self): - assert (self in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False class IfcTextTransformation_WR1: SCOPE = 'type' @@ -5372,7 +5372,7 @@ class IfcTextTransformation_WR1: @staticmethod def __call__(self): - assert (self in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False class IfcActorRole_WR1: SCOPE = 'entity' @@ -6098,7 +6098,7 @@ class IfcBlobTexture_SupportedRasterFormat: @staticmethod def __call__(self): - assert (getattr(self, 'RasterFormat', INDETERMINATE) in ['bmp', 'jpg', 'gif', 'png']) is not False + assert (getattr(getattr(self, 'RasterFormat', INDETERMINATE), 'lower', INDETERMINATE)() in ['bmp', 'jpg', 'gif', 'png']) is not False class IfcBlobTexture_RasterCodeByteStream: SCOPE = 'entity' @@ -7652,7 +7652,7 @@ class IfcDraughtingPreDefinedColour_PreDefinedColourNames: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False class IfcDraughtingPreDefinedCurveFont_PreDefinedCurveFontNames: SCOPE = 'entity' @@ -7661,7 +7661,7 @@ class IfcDraughtingPreDefinedCurveFont_PreDefinedCurveFontNames: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False class IfcDuctFitting_CorrectPredefinedType: SCOPE = 'entity' diff --git a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_RC3.py b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_RC3.py index dbd6e0cf57..2a1c28b7ae 100644 --- a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_RC3.py +++ b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_RC3.py @@ -5145,7 +5145,7 @@ class IfcBoxAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False class IfcCardinalPointReference_GreaterThanZero: SCOPE = 'type' @@ -5226,7 +5226,7 @@ class IfcFontStyle_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'italic', 'oblique']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'italic', 'oblique']) is not False class IfcFontVariant_WR1: SCOPE = 'type' @@ -5235,7 +5235,7 @@ class IfcFontVariant_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps']) is not False class IfcFontWeight_WR1: SCOPE = 'type' @@ -5244,7 +5244,7 @@ class IfcFontWeight_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False class IfcHeatingValueMeasure_WR1: SCOPE = 'type' @@ -5343,7 +5343,7 @@ class IfcTextAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['left', 'right', 'center', 'justify']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['left', 'right', 'center', 'justify']) is not False class IfcTextDecoration_WR1: SCOPE = 'type' @@ -5352,7 +5352,7 @@ class IfcTextDecoration_WR1: @staticmethod def __call__(self): - assert (self in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False class IfcTextTransformation_WR1: SCOPE = 'type' @@ -5361,7 +5361,7 @@ class IfcTextTransformation_WR1: @staticmethod def __call__(self): - assert (self in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False class IfcActorRole_WR1: SCOPE = 'entity' @@ -6087,7 +6087,7 @@ class IfcBlobTexture_SupportedRasterFormat: @staticmethod def __call__(self): - assert (getattr(self, 'RasterFormat', INDETERMINATE) in ['bmp', 'jpg', 'gif', 'png']) is not False + assert (getattr(getattr(self, 'RasterFormat', INDETERMINATE), 'lower', INDETERMINATE)() in ['bmp', 'jpg', 'gif', 'png']) is not False class IfcBlobTexture_RasterCodeByteStream: SCOPE = 'entity' @@ -7685,7 +7685,7 @@ class IfcDraughtingPreDefinedColour_PreDefinedColourNames: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False class IfcDraughtingPreDefinedCurveFont_PreDefinedCurveFontNames: SCOPE = 'entity' @@ -7694,7 +7694,7 @@ class IfcDraughtingPreDefinedCurveFont_PreDefinedCurveFontNames: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False class IfcDuctFitting_CorrectPredefinedType: SCOPE = 'entity' diff --git a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_RC4.py b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_RC4.py index 73a893e372..06a5a6d06b 100644 --- a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_RC4.py +++ b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_RC4.py @@ -5161,7 +5161,7 @@ class IfcBoxAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False class IfcCardinalPointReference_GreaterThanZero: SCOPE = 'type' @@ -5242,7 +5242,7 @@ class IfcFontStyle_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'italic', 'oblique']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'italic', 'oblique']) is not False class IfcFontVariant_WR1: SCOPE = 'type' @@ -5251,7 +5251,7 @@ class IfcFontVariant_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps']) is not False class IfcFontWeight_WR1: SCOPE = 'type' @@ -5260,7 +5260,7 @@ class IfcFontWeight_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False class IfcHeatingValueMeasure_WR1: SCOPE = 'type' @@ -5359,7 +5359,7 @@ class IfcTextAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['left', 'right', 'center', 'justify']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['left', 'right', 'center', 'justify']) is not False class IfcTextDecoration_WR1: SCOPE = 'type' @@ -5368,7 +5368,7 @@ class IfcTextDecoration_WR1: @staticmethod def __call__(self): - assert (self in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False class IfcTextTransformation_WR1: SCOPE = 'type' @@ -5377,7 +5377,7 @@ class IfcTextTransformation_WR1: @staticmethod def __call__(self): - assert (self in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False class IfcActorRole_WR1: SCOPE = 'entity' @@ -6103,7 +6103,7 @@ class IfcBlobTexture_SupportedRasterFormat: @staticmethod def __call__(self): - assert (getattr(self, 'RasterFormat', INDETERMINATE) in ['bmp', 'jpg', 'gif', 'png']) is not False + assert (getattr(getattr(self, 'RasterFormat', INDETERMINATE), 'lower', INDETERMINATE)() in ['bmp', 'jpg', 'gif', 'png']) is not False class IfcBlobTexture_RasterCodeByteStream: SCOPE = 'entity' @@ -7701,7 +7701,7 @@ class IfcDraughtingPreDefinedColour_PreDefinedColourNames: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False class IfcDraughtingPreDefinedCurveFont_PreDefinedCurveFontNames: SCOPE = 'entity' @@ -7710,7 +7710,7 @@ class IfcDraughtingPreDefinedCurveFont_PreDefinedCurveFontNames: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False class IfcDuctFitting_CorrectPredefinedType: SCOPE = 'entity' diff --git a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_TC1.py b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_TC1.py index 01a6930dde..d9224c2551 100644 --- a/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_TC1.py +++ b/src/ifcopenshell-python/ifcopenshell/express/rules/IFC4X3_TC1.py @@ -5118,7 +5118,7 @@ class IfcBoxAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']) is not False class IfcCardinalPointReference_GreaterThanZero: SCOPE = 'type' @@ -5199,7 +5199,7 @@ class IfcFontStyle_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'italic', 'oblique']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'italic', 'oblique']) is not False class IfcFontVariant_WR1: SCOPE = 'type' @@ -5208,7 +5208,7 @@ class IfcFontVariant_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps']) is not False class IfcFontWeight_WR1: SCOPE = 'type' @@ -5217,7 +5217,7 @@ class IfcFontWeight_WR1: @staticmethod def __call__(self): - assert (self in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['normal', 'small-caps', '100', '200', '300', '400', '500', '600', '700', '800', '900']) is not False class IfcHeatingValueMeasure_WR1: SCOPE = 'type' @@ -5316,7 +5316,7 @@ class IfcTextAlignment_WR1: @staticmethod def __call__(self): - assert (self in ['left', 'right', 'center', 'justify']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['left', 'right', 'center', 'justify']) is not False class IfcTextDecoration_WR1: SCOPE = 'type' @@ -5325,7 +5325,7 @@ class IfcTextDecoration_WR1: @staticmethod def __call__(self): - assert (self in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['none', 'underline', 'overline', 'line-through', 'blink']) is not False class IfcTextTransformation_WR1: SCOPE = 'type' @@ -5334,7 +5334,7 @@ class IfcTextTransformation_WR1: @staticmethod def __call__(self): - assert (self in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False + assert (getattr(self, 'lower', INDETERMINATE)() in ['capitalize', 'uppercase', 'lowercase', 'none']) is not False class IfcActorRole_WR1: SCOPE = 'entity' @@ -6061,7 +6061,7 @@ class IfcBlobTexture_SupportedRasterFormat: @staticmethod def __call__(self): - assert (getattr(self, 'RasterFormat', INDETERMINATE) in ['bmp', 'jpg', 'gif', 'png']) is not False + assert (getattr(getattr(self, 'RasterFormat', INDETERMINATE), 'lower', INDETERMINATE)() in ['bmp', 'jpg', 'gif', 'png']) is not False class IfcBoiler_CorrectPredefinedType: SCOPE = 'entity' @@ -7638,7 +7638,7 @@ class IfcDraughtingPreDefinedColour_PreDefinedColourNames: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['black', 'red', 'green', 'blue', 'yellow', 'magenta', 'cyan', 'white', 'bylayer']) is not False class IfcDraughtingPreDefinedCurveFont_PreDefinedCurveFontNames: SCOPE = 'entity' @@ -7647,7 +7647,7 @@ class IfcDraughtingPreDefinedCurveFont_PreDefinedCurveFontNames: @staticmethod def __call__(self): - assert (getattr(self, 'Name', INDETERMINATE) in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False + assert (getattr(getattr(self, 'Name', INDETERMINATE), 'lower', INDETERMINATE)() in ['continuous', 'chain', 'chaindoubledash', 'dashed', 'dotted', 'bylayer']) is not False class IfcDuctFitting_CorrectPredefinedType: SCOPE = 'entity'