mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
Express rules: Workaround str case in IfcBlobTexture
This commit is contained in:
@@ -420,6 +420,15 @@ def process_expression(context):
|
|||||||
exclude=[context.rel_op_extended],
|
exclude=[context.rel_op_extended],
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
if len(context.simple_expression.branches()) == 2 and str(context.rel_op_extended) == 'in':
|
||||||
|
# IfcBlobTexture
|
||||||
|
try:
|
||||||
|
is_literal_str_list = set(map(type, ast.literal_eval(str(context.simple_expression.branches()[1])))) == {str}
|
||||||
|
except:
|
||||||
|
is_literal_str_list = False
|
||||||
|
if is_literal_str_list:
|
||||||
|
a, b = map(str, context.simple_expression.branches())
|
||||||
|
return f"{a}.lower() {str(context.rel_op_extended)} {b}"
|
||||||
return concat(context.rel_op_extended, context.simple_expression)
|
return concat(context.rel_op_extended, context.simple_expression)
|
||||||
elif context.multiplication_like_op:
|
elif context.multiplication_like_op:
|
||||||
if str(context.multiplication_like_op.branches()[0]) == "||":
|
if str(context.multiplication_like_op.branches()[0]) == "||":
|
||||||
|
|||||||
Reference in New Issue
Block a user