From f44769c13875e59441cc5eed165cf7b9148e028f Mon Sep 17 00:00:00 2001 From: Andrej Date: Fri, 30 May 2025 17:59:46 +0500 Subject: [PATCH] ifc2sql - add example for should_expand --- src/ifcpatch/ifcpatch/recipes/Ifc2Sql.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/ifcpatch/ifcpatch/recipes/Ifc2Sql.py b/src/ifcpatch/ifcpatch/recipes/Ifc2Sql.py index 6f359e94a2..b8e9215796 100644 --- a/src/ifcpatch/ifcpatch/recipes/Ifc2Sql.py +++ b/src/ifcpatch/ifcpatch/recipes/Ifc2Sql.py @@ -519,6 +519,20 @@ class Patcher: ) def get_permutations(self, lst: list[Any], indexes: list[int]) -> list[Any]: + """ + Original row (`lst`): + ``` + ifc_id, x, (a, b), (c,d) + ``` + + Resulting permutations: + ``` + ifc_id, x, a, c + ifc_id, x, a, d + ifc_id, x, b, c + ifc_id, x, b, d + ``` + """ nested_lists = [lst[i] for i in indexes] # Generate the Cartesian product of the nested lists