mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 14:31:39 +00:00
See #2520. You can now duplicate drawings.
This commit is contained in:
@@ -32,6 +32,16 @@ class TestImplementsTool(NewFile):
|
||||
assert isinstance(subject(), blenderbim.core.tool.Drawing)
|
||||
|
||||
|
||||
class TestCopyDrawingRepresentation(NewFile):
|
||||
def test_run(self):
|
||||
ifc = ifcopenshell.file()
|
||||
tool.Ifc.set(ifc)
|
||||
source = ifc.createIfcAnnotation(Representation=ifc.createIfcProductDefinitionShape())
|
||||
dest = ifc.createIfcAnnotation()
|
||||
subject.copy_drawing_representation(source, dest)
|
||||
assert dest.Representation.is_a("IfcProductDefinitionShape")
|
||||
|
||||
|
||||
class TestCreateAnnotationObject(NewFile):
|
||||
def test_nothing(self):
|
||||
pass
|
||||
@@ -562,6 +572,14 @@ class TestSetDrawingCollectionName(NewFile):
|
||||
assert collection.name == "IfcGroup/Foobaz"
|
||||
|
||||
|
||||
class TestSetName(NewFile):
|
||||
def test_run(self):
|
||||
ifc = ifcopenshell.file()
|
||||
drawing = ifc.createIfcAnnotation()
|
||||
subject.set_name(drawing, "Name")
|
||||
assert drawing.Name == "Name"
|
||||
|
||||
|
||||
class TestShowDecorations(NewFile):
|
||||
def test_run(self):
|
||||
bpy.context.scene.DocProperties.should_draw_decorations = False
|
||||
|
||||
Reference in New Issue
Block a user