Fixed void tests after d3d2c36

This commit is contained in:
Andrej730
2023-06-21 11:04:22 +05:00
parent 3853258b27
commit 7dc98612e4
2 changed files with 15 additions and 2 deletions
@@ -29,6 +29,14 @@ class AddOpening(bpy.types.Operator, tool.Ifc.Operator):
bl_idname = "bim.add_opening"
bl_label = "Add Opening"
bl_options = {"REGISTER", "UNDO"}
bl_description = "Adds an opening to an element.\n" \
"Need to select two elements, order of selection is not important"
@classmethod
def poll(cls, context):
if len(context.selected_objects) != 2:
cls.poll_message_set("Select two elements to add an opening")
return True
def _execute(self, context):
props = context.scene.BIMModelProperties
+7 -2
View File
@@ -81,20 +81,25 @@ Scenario: Add an opening to Element B with a void that already voids Element A
And the object "Cube" is selected
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
And I press "bim.assign_class"
And I add a cube
And the object "Cube" is selected
And I press "bim.assign_class"
And I press "bim.add_potential_opening"
And the object "Opening" is selected
And additionally the object "IfcWall/Cube" is selected
And I press "bim.add_opening"
And the object "IfcWall/Cube" is selected
And I press "bim.show_openings"
When the object "IfcOpeningElement/Opening" is selected
And additionally the object "IfcWall/Cube.001" is selected
And I press "bim.add_opening"
Then the object "IfcWall/Cube" is voided by "Opening"
And the object "IfcWall/Cube.001" is not voided by "Opening"
Then the object "IfcWall/Cube" is not voided by "Opening"
And the object "IfcWall/Cube.001" is voided by "Opening"
Scenario: Remove opening
Given an empty IFC project