File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -410,6 +410,7 @@ def show(
410410 xpos : Union [int , float ] = 0 ,
411411 ypos : Union [int , float ] = 0 ,
412412 fxaa : bool = True ,
413+ orthographic : bool = False ,
413414):
414415 """
415416 Show CQ objects using VTK. This functions optionally allows to make screenshots.
@@ -506,6 +507,9 @@ def show(
506507 # set camera
507508 camera = renderer .GetActiveCamera ()
508509
510+ # set perspective or parallel (orthographic) projection
511+ camera .SetParallelProjection (orthographic )
512+
509513 # Update camera position with user provided absolute positions
510514 if viewup :
511515 camera .SetViewUp (* viewup )
Original file line number Diff line number Diff line change @@ -234,3 +234,8 @@ def test_camera_position(wp, patch_vtk):
234234def test_frustrum_clipping_range (wp , patch_vtk ):
235235
236236 show (wp , zoom = 2.0 , clipping_range = (1 , 100 ))
237+
238+
239+ def test_orthographic (wp , patch_vtk ):
240+
241+ show (wp , orthographic = True )
You can’t perform that action at this time.
0 commit comments