mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
You can now specify a target view when creating a new drawing. See #1153.
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
import os
|
||||
import bpy
|
||||
import mathutils
|
||||
import ifcopenshell
|
||||
import blenderbim.core.tool
|
||||
import blenderbim.tool as tool
|
||||
@@ -30,6 +31,17 @@ class TestImplementsTool(NewFile):
|
||||
assert isinstance(subject(), blenderbim.core.tool.Drawing)
|
||||
|
||||
|
||||
class TestCreateCamera(NewFile):
|
||||
def test_run(self):
|
||||
obj = subject.create_camera("Name", mathutils.Matrix())
|
||||
assert obj.name == "Name"
|
||||
assert obj.matrix_world == mathutils.Matrix()
|
||||
assert obj.data.type == "ORTHO"
|
||||
assert obj.data.ortho_scale == 50
|
||||
assert obj.data.clip_end == 10
|
||||
assert obj.users_collection[0] == bpy.context.scene.collection
|
||||
|
||||
|
||||
class TestCreateSvgSheet(NewFile):
|
||||
def test_run(self):
|
||||
ifc = ifcopenshell.file()
|
||||
@@ -149,6 +161,11 @@ class TestGetSheetFilename(NewFile):
|
||||
subject.get_sheet_filename(document) == "X - FOOBAR"
|
||||
|
||||
|
||||
class TestGenerateDrawingMatrix(NewFile):
|
||||
def test_returning_the_origin_as_a_fallback(self):
|
||||
assert subject.generate_drawing_matrix("PLAN_VIEW", None) == mathutils.Matrix()
|
||||
|
||||
|
||||
class TestGenerateSheetIdentification(NewFile):
|
||||
def test_run(self):
|
||||
ifc = ifcopenshell.file()
|
||||
@@ -266,6 +283,11 @@ class TestOpenSvg(NewFile):
|
||||
pass
|
||||
|
||||
|
||||
class TestRunAssignClassOperator(NewFile):
|
||||
def test_nothing(self):
|
||||
pass
|
||||
|
||||
|
||||
class TestUpdateTextValue(NewFile):
|
||||
def test_updating_arbitrary_strings(self):
|
||||
TestGetTextLiteral().test_run()
|
||||
|
||||
Reference in New Issue
Block a user