mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-29 00:03:17 +00:00
Fix bug where selecting type occurrences did not work
This commit is contained in:
@@ -85,3 +85,20 @@ Scenario: Assign type - assign to a type with a material profile set
|
||||
When the variable "type" is "{ifc}.by_type('IfcWallType')[0].id()"
|
||||
And I press "bim.assign_type(relating_type={type}, related_object='IfcWall/Cube')"
|
||||
Then the object "IfcWall/Cube" has a "SweptSolid" representation of "Model/Body/MODEL_VIEW"
|
||||
|
||||
Scenario: Select type objects
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And the object "Cube" is selected
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I add an empty
|
||||
And the object "Empty" is selected
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
And the variable "type" is "{ifc}.by_type('IfcWallType')[0].id()"
|
||||
And I press "bim.assign_type(relating_type={type}, related_object='IfcWall/Cube')"
|
||||
When the object "IfcWallType/Empty" is selected
|
||||
And I press "bim.select_type_objects"
|
||||
Then the object "IfcWall/Cube" is selected
|
||||
|
||||
@@ -153,6 +153,12 @@ def the_object_name_is_selected(name):
|
||||
additionally_the_object_name_is_selected(name)
|
||||
|
||||
|
||||
@then(parsers.parse('the object "{name}" is selected'))
|
||||
def then_the_object_name_is_selected(name):
|
||||
obj = the_object_name_exists(name)
|
||||
assert obj in bpy.context.selected_objects
|
||||
|
||||
|
||||
@given(parsers.parse('the object "{name}" is moved to "{location}"'))
|
||||
@when(parsers.parse('the object "{name}" is moved to "{location}"'))
|
||||
def the_object_name_is_moved_to_location(name, location):
|
||||
|
||||
Reference in New Issue
Block a user