Fix regression in split along edge

Aren't tests great
This commit is contained in:
Dion Moult
2025-03-23 23:36:19 +11:00
parent b269a806eb
commit 384a74734e
3 changed files with 20 additions and 9 deletions
@@ -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):
+18 -7
View File
@@ -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"
+1 -1
View File
@@ -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