mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 18:21:59 +00:00
Add a test for be65774
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
import numpy as np
|
||||||
import bpy
|
import bpy
|
||||||
import mathutils
|
import mathutils
|
||||||
import ifcopenshell
|
import ifcopenshell
|
||||||
@@ -473,6 +474,15 @@ class TestGenerateDrawingMatrix(NewFile):
|
|||||||
((0, 0, 1, 1), (1, 0, 0, 2), (0, 1, 0, 3), (0, 0, 0, 1))
|
((0, 0, 1, 1), (1, 0, 0, 2), (0, 1, 0, 3), (0, 0, 0, 1))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def test_aligning_model_view_camera_to_viewport(self):
|
||||||
|
assert (space := tool.Blender.get_view3d_space())
|
||||||
|
assert (r3d := space.region_3d)
|
||||||
|
viewport = r3d.view_matrix.inverted()
|
||||||
|
generated = subject.generate_drawing_matrix("MODEL_VIEW", "PERSPECTIVE")
|
||||||
|
assert np.allclose(generated, viewport)
|
||||||
|
generated = subject.generate_drawing_matrix("MODEL_VIEW", "ORTHOGRAPHIC")
|
||||||
|
assert np.allclose(generated, viewport)
|
||||||
|
|
||||||
|
|
||||||
class TestGenerateSheetIdentification(NewFile):
|
class TestGenerateSheetIdentification(NewFile):
|
||||||
def test_run(self):
|
def test_run(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user