mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-20 12:12:15 +00:00
See #2887. Experimental edit mode toggle override to ensure mesh changes stay in sync and so that you can edit meshes without openings applied.
This commit is contained in:
@@ -194,7 +194,7 @@ class TestSwitchRepresentation:
|
||||
geometry.is_edited("obj").should_be_called().will_return(False)
|
||||
geometry.resolve_mapped_representation("mapped_rep").should_be_called().will_return("representation")
|
||||
geometry.get_representation_data("representation").should_be_called().will_return(None)
|
||||
geometry.import_representation("obj", "representation").should_be_called().will_return("new_data")
|
||||
geometry.import_representation("obj", "representation", apply_openings=True).should_be_called().will_return("new_data")
|
||||
geometry.get_representation_name("representation").should_be_called().will_return("name")
|
||||
geometry.rename_object("new_data", "name").should_be_called()
|
||||
geometry.link("representation", "new_data").should_be_called()
|
||||
@@ -210,13 +210,14 @@ class TestSwitchRepresentation:
|
||||
should_reload=True,
|
||||
is_global=True,
|
||||
should_sync_changes_first=True,
|
||||
apply_openings=True,
|
||||
)
|
||||
|
||||
def test_switching_to_a_reloaded_representation_and_deleting_the_existing_data(self, ifc, geometry):
|
||||
geometry.is_edited("obj").should_be_called().will_return(False)
|
||||
geometry.resolve_mapped_representation("mapped_rep").should_be_called().will_return("representation")
|
||||
geometry.get_representation_data("representation").should_be_called().will_return("existing_data")
|
||||
geometry.import_representation("obj", "representation").should_be_called().will_return("new_data")
|
||||
geometry.import_representation("obj", "representation", apply_openings=True).should_be_called().will_return("new_data")
|
||||
geometry.get_representation_name("representation").should_be_called().will_return("name")
|
||||
geometry.rename_object("new_data", "name").should_be_called()
|
||||
geometry.link("representation", "new_data").should_be_called()
|
||||
@@ -233,6 +234,7 @@ class TestSwitchRepresentation:
|
||||
should_reload=True,
|
||||
is_global=True,
|
||||
should_sync_changes_first=True,
|
||||
apply_openings=True,
|
||||
)
|
||||
|
||||
def test_switching_to_an_existing_representation(self, ifc, geometry):
|
||||
|
||||
Reference in New Issue
Block a user