mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-19 03:33:48 +00:00
#1153 Drawings that are pure annotation now do not generate references
This commit is contained in:
@@ -121,7 +121,7 @@ class TestOpenSheet:
|
||||
|
||||
class TestRemoveSheet:
|
||||
def test_run(self, ifc, drawing):
|
||||
ifc.run("document.remove_document", document="sheet").should_be_called()
|
||||
ifc.run("document.remove_information", information="sheet").should_be_called()
|
||||
drawing.import_sheets().should_be_called()
|
||||
subject.remove_sheet(ifc, drawing, sheet="sheet")
|
||||
|
||||
@@ -162,7 +162,16 @@ class TestAddDrawing:
|
||||
collector.assign("obj").should_be_called()
|
||||
ifc.run("pset.add_pset", product="element", name="EPset_Drawing").should_be_called().will_return("pset")
|
||||
ifc.run(
|
||||
"pset.edit_pset", pset="pset", properties={"TargetView": "target_view", "Scale": "1/100"}
|
||||
"pset.edit_pset",
|
||||
pset="pset",
|
||||
properties={
|
||||
"TargetView": "target_view",
|
||||
"Scale": "1/100",
|
||||
"HumanScale": "1:100",
|
||||
"HasUnderlay": False,
|
||||
"HasLinework": True,
|
||||
"HasAnnotation": True,
|
||||
},
|
||||
).should_be_called()
|
||||
drawing.import_drawings().should_be_called()
|
||||
subject.add_drawing(ifc, collector, drawing, target_view="target_view", location_hint="location_hint")
|
||||
|
||||
@@ -28,6 +28,7 @@ class TestCopyClass:
|
||||
|
||||
def test_copy_with_new_geometry_derived_from_the_type(self, ifc, collector, root):
|
||||
ifc.get_entity("obj").should_be_called().will_return("original_element")
|
||||
root.get_object_representation("obj").should_be_called().will_return("representation")
|
||||
ifc.run("root.copy_class", product="original_element").should_be_called().will_return("element")
|
||||
ifc.link("element", "obj").should_be_called()
|
||||
root.get_element_type("element").should_be_called().will_return("type")
|
||||
@@ -41,12 +42,12 @@ class TestCopyClass:
|
||||
|
||||
def test_copy_with_new_geometry_added_afresh_for_speed(self, ifc, collector, geometry, root):
|
||||
ifc.get_entity("obj").should_be_called().will_return("original_element")
|
||||
root.get_object_representation("obj").should_be_called().will_return("representation")
|
||||
ifc.run("root.copy_class", product="original_element").should_be_called().will_return("element")
|
||||
ifc.link("element", "obj").should_be_called()
|
||||
root.get_element_type("element").should_be_called().will_return("type")
|
||||
root.does_type_have_representations("type").should_be_called().will_return(False)
|
||||
|
||||
root.get_object_representation("obj").should_be_called().will_return("representation")
|
||||
root.get_representation_context("representation").should_be_called().will_return("context")
|
||||
geometry.get_ifc_representation_class("element", "representation").should_be_called().will_return(
|
||||
"ifc_representation_class"
|
||||
@@ -64,17 +65,18 @@ class TestCopyClass:
|
||||
|
||||
def test_copy_with_no_new_geometry(self, ifc, collector, geometry, root):
|
||||
ifc.get_entity("obj").should_be_called().will_return("original_element")
|
||||
root.get_object_representation("obj").should_be_called().will_return(None)
|
||||
ifc.run("root.copy_class", product="original_element").should_be_called().will_return("element")
|
||||
ifc.link("element", "obj").should_be_called()
|
||||
root.get_element_type("element").should_be_called().will_return("type")
|
||||
root.does_type_have_representations("type").should_be_called().will_return(False)
|
||||
root.get_object_representation("obj").should_be_called().will_return(None)
|
||||
collector.assign("obj").should_be_called()
|
||||
root.is_opening_element("element").should_be_called().will_return(False)
|
||||
subject.copy_class(ifc, collector, geometry, root, obj="obj")
|
||||
|
||||
def test_copied_openings_have_dynamic_voids_added(self, ifc, collector, root):
|
||||
ifc.get_entity("obj").should_be_called().will_return("original_element")
|
||||
root.get_object_representation("obj").should_be_called().will_return(None)
|
||||
ifc.run("root.copy_class", product="original_element").should_be_called().will_return("element")
|
||||
ifc.link("element", "obj").should_be_called()
|
||||
root.get_element_type("element").should_be_called().will_return("type")
|
||||
|
||||
Reference in New Issue
Block a user