diff --git a/src/bonsai/bonsai/bim/module/misc/operator.py b/src/bonsai/bonsai/bim/module/misc/operator.py index 7d2907f11f..5f4ddfa650 100644 --- a/src/bonsai/bonsai/bim/module/misc/operator.py +++ b/src/bonsai/bonsai/bim/module/misc/operator.py @@ -125,7 +125,7 @@ class SplitAlongEdge(bpy.types.Operator, tool.Ifc.Operator): "Will unassign element from a type if type has a representation." ) bl_options = {"REGISTER", "UNDO"} - mode: bpy.props.StringProperty() + mode: bpy.props.StringProperty(default="BOOLEAN") @classmethod def poll(cls, context): diff --git a/src/bonsai/test/bim/feature/misc.feature b/src/bonsai/test/bim/feature/misc.feature index d418ee3ea5..153b4ff48c 100644 --- a/src/bonsai/test/bim/feature/misc.feature +++ b/src/bonsai/test/bim/feature/misc.feature @@ -31,7 +31,7 @@ Scenario: Resize to storey When I press "bim.resize_to_storey(total_storeys=1)" Then nothing happens -Scenario: Split along edge +Scenario: Split along edge - boolean mode Given an empty IFC project And I add a cube And the object "Cube" is selected @@ -41,13 +41,24 @@ Scenario: Split along edge And I add a plane of size "4" at "0,0,0" And the object "IfcWall/Cube" is selected And additionally the object "Plane" is selected - When I press "bim.split_along_edge" + And I look at the "Miscellaneous" panel + When I click "Split Along Edge" Then the object "IfcWall/Cube" is an "IfcWall" And the object "IfcWall/Cube.001" is an "IfcWall" -Scenario: Enabling and disabling IFC Sverchok +Scenario: Split along edge - bisect mode Given an empty IFC project - And I press "preferences.addon_enable(module="sverchok")" - And I press "preferences.addon_enable(module="ifcsverchok")" - And I press "preferences.addon_disable(module="sverchok")" - And I press "preferences.addon_disable(module="ifcsverchok")" + And I add a cube + And the object "Cube" is selected + And I set "scene.BIMRootProperties.ifc_product" to "IfcElement" + And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" + And I press "bim.assign_class" + And I add a plane of size "4" at "0,0,0" + And the object "IfcWall/Cube" is selected + And additionally the object "Plane" is selected + And I look at the "Miscellaneous" panel + When I click "Bisect At Faces" + Then the object "IfcWall/Cube" is an "IfcWall" + And the object "IfcWall/Cube.001" is an "IfcWall" + + diff --git a/src/bonsai/test/bim/test_feature.py b/src/bonsai/test/bim/test_feature.py index 4a37caa2e1..a094f94d3d 100644 --- a/src/bonsai/test/bim/test_feature.py +++ b/src/bonsai/test/bim/test_feature.py @@ -73,7 +73,7 @@ class PanelSpy: return self def __call__(self, *args, **kwargs): - if self.spied_attr in ("row", "column", "box", "separator", "menu", "operator_menu_enum"): + if self.spied_attr in ("row", "column", "box", "separator", "menu", "operator_menu_enum", "split"): return self elif self.spied_attr == "template_list": listtype_name, list_id, dataptr, propname, active_dataptr, active_propname = args