mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Fixed void tests after d3d2c36
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user