mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 14:07:43 +00:00
Test edit object placement. See #1711
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
@geometry
|
||||
Feature: Geometry
|
||||
Covers geometry and coordinate manipulation
|
||||
|
||||
Scenario: Edit object placement
|
||||
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 the object "IfcWall/Cube" is selected
|
||||
When I press "bim.edit_object_placement"
|
||||
Then nothing happens
|
||||
@@ -42,8 +42,8 @@ def an_empty_ifc_project():
|
||||
bpy.ops.bim.create_project()
|
||||
|
||||
|
||||
@when("I add a cube")
|
||||
@given("I add a cube")
|
||||
@when("I add a cube")
|
||||
def i_add_a_cube():
|
||||
bpy.ops.mesh.primitive_cube_add()
|
||||
|
||||
@@ -53,6 +53,7 @@ def i_add_a_cube_of_size_size_at_location(size, location):
|
||||
bpy.ops.mesh.primitive_cube_add(size=float(size), location=[float(co) for co in location.split(",")])
|
||||
|
||||
|
||||
@given(parsers.parse('I press "{operator}"'))
|
||||
@when(parsers.parse('I press "{operator}"'))
|
||||
def i_press_operator(operator):
|
||||
operator = replace_variables(operator)
|
||||
@@ -68,6 +69,7 @@ def i_deselect_all_objects():
|
||||
bpy.ops.object.select_all(action="DESELECT")
|
||||
|
||||
|
||||
@given(parsers.parse('the object "{name}" is selected'))
|
||||
@when(parsers.parse('the object "{name}" is selected'))
|
||||
def the_object_name_is_selected(name):
|
||||
i_deselect_all_objects()
|
||||
@@ -83,6 +85,7 @@ def additionally_the_object_name_is_selected(name):
|
||||
obj.select_set(True)
|
||||
|
||||
|
||||
@given(parsers.parse('I set "{prop}" to "{value}"'))
|
||||
@when(parsers.parse('I set "{prop}" to "{value}"'))
|
||||
def i_set_prop_to_value(prop, value):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user