mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-05 20:06:25 +00:00
Potentially risky refactor of add_representation in preparation of stabilisation and optimization of geometric operators.
This commit is contained in:
@@ -11,6 +11,18 @@ Scenario: Edit object placement
|
||||
When I press "bim.edit_object_placement"
|
||||
Then nothing happens
|
||||
|
||||
Scenario: Add representation
|
||||
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 the variable "context" is "{ifc}.by_type('IfcGeometricRepresentationSubContext')[-1].id()"
|
||||
And I set "scene.BIMProperties.contexts" to "{context}"
|
||||
And I press "bim.add_representation"
|
||||
Then nothing happens
|
||||
|
||||
Scenario: Copy representation
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
|
||||
@@ -130,6 +130,7 @@ def additionally_the_object_name_is_selected(name):
|
||||
@given(parsers.parse('I set "{prop}" to "{value}"'))
|
||||
@when(parsers.parse('I set "{prop}" to "{value}"'))
|
||||
def i_set_prop_to_value(prop, value):
|
||||
value = replace_variables(value)
|
||||
try:
|
||||
eval(f"bpy.context.{prop}")
|
||||
except:
|
||||
|
||||
Reference in New Issue
Block a user