Debian Codegraph @

src/bonsai/test/bim/feature/patch.feature

raw
1 @patch
2 Feature: Patch
3
4 Scenario: Execute IFC Patch - file in memory
5 Given an empty IFC project
6 And I set "scene.BIMPatchProperties.ifc_patch_recipes" to "OffsetObjectPlacements"
7 And I set "scene.BIMPatchProperties.should_load_from_memory" to "True"
8 And I set "scene.BIMPatchProperties.ifc_patch_output" to "{cwd}/test/files/temp/basic-patched.ifc"
9 And I set "scene.BIMPatchProperties.ifc_patch_args_attr['X'].string_value" to "123454321"
10 And I set "scene.BIMPatchProperties.ifc_patch_args_attr['Y'].string_value" to "0"
11 And I set "scene.BIMPatchProperties.ifc_patch_args_attr['Z'].string_value" to "0"
12 And I set "scene.BIMPatchProperties.ifc_patch_args_attr['Should Rotate First'].bool_value" to "True"
13 And I set "scene.BIMPatchProperties.ifc_patch_args_attr['Ax'].string_value" to "0"
14 And I set "scene.BIMPatchProperties.ifc_patch_args_attr['Ay'].string_value" to "0"
15 And I set "scene.BIMPatchProperties.ifc_patch_args_attr['Az'].string_value" to "0"
16 When I press "bim.execute_ifc_patch()"
17 Then the file "{cwd}/test/files/temp/basic-patched.ifc" should contain "123454321"
18
19 Scenario: Execute IFC Patch - file from disk
20 Given an empty IFC project
21 And I set "scene.BIMPatchProperties.ifc_patch_recipes" to "OffsetObjectPlacements"
22 And I set "scene.BIMPatchProperties.ifc_patch_input" to "{cwd}/test/files/basic.ifc"
23 And I set "scene.BIMPatchProperties.ifc_patch_output" to "{cwd}/test/files/temp/basic-patched.ifc"
24 And I set "scene.BIMPatchProperties.ifc_patch_args_attr['X'].string_value" to "123454321"
25 And I set "scene.BIMPatchProperties.ifc_patch_args_attr['Y'].string_value" to "0"
26 And I set "scene.BIMPatchProperties.ifc_patch_args_attr['Z'].string_value" to "0"
27 And I set "scene.BIMPatchProperties.ifc_patch_args_attr['Should Rotate First'].bool_value" to "True"
28 And I set "scene.BIMPatchProperties.ifc_patch_args_attr['Ax'].string_value" to "0"
29 And I set "scene.BIMPatchProperties.ifc_patch_args_attr['Ay'].string_value" to "0"
30 And I set "scene.BIMPatchProperties.ifc_patch_args_attr['Az'].string_value" to "0"
31 When I press "bim.execute_ifc_patch()"
32 Then the file "{cwd}/test/files/temp/basic-patched.ifc" should contain "123454321"
33
34 Scenario: Run migrate patch
35 Given an empty Blender session
36 When I press "bim.run_migrate_patch(infile='{cwd}/test/files/ifc2x3.ifc', outfile='{cwd}/test/files/temp/ifc2x3-migrated.ifc', schema='IFC4')"
37 Then the file "{cwd}/test/files/temp/ifc2x3-migrated.ifc" should contain "IFC4"