Skip to content

Commit

Permalink
Set enable parallel projection default in Plotter (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoyama010 authored Mar 2, 2024
1 parent 43f9d2b commit 90eed9e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ To visualize the model we can use PyVista.

```python
plotter = sg.Plotter()
plotter.enable_parallel_projection()
_ = plotter.add_mesh(
mesh,
show_edges=True,
Expand All @@ -96,7 +95,6 @@ mesh = sg.delaunay_3d(edge_source, target_sizes=0.2)

```python
plotter = sg.Plotter()
plotter.enable_parallel_projection()
_ = plotter.add_mesh(
mesh,
show_edges=True,
Expand Down
4 changes: 1 addition & 3 deletions src/skgmsh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def frontal_delaunay_2d(
>>> mesh = sg.frontal_delaunay_2d(edge_source, target_sizes=2.0)
>>> plotter = sg.Plotter(off_screen=True)
>>> plotter.enable_parallel_projection()
>>> _ = plotter.add_mesh(mesh, show_edges=True, line_width=1, color="aliceblue", lighting=False, edge_color="gray")
>>> _ = plotter.add_mesh(edge_source, show_edges=True, line_width=4, color="gray")
>>> plotter.show(cpos="xy", screenshot="docs/_static/frontal_delaunay_2d_01.png")
Expand Down Expand Up @@ -146,7 +145,6 @@ def delaunay_3d(
>>> mesh = sg.delaunay_3d(edge_source, target_sizes=0.2)
>>> plotter = sg.Plotter(off_screen=True)
>>> plotter.enable_parallel_projection()
>>> _ = plotter.add_mesh(mesh, show_edges=True, line_width=1, color="aliceblue", lighting=False, edge_color="gray")
>>> _ = plotter.add_mesh(edge_source.extract_all_edges(), line_width=4, color="gray")
>>> _ = plotter.add_axes(
Expand All @@ -172,7 +170,6 @@ def delaunay_3d(
... edge_color="gray",
... )
>>> _ = plotter.add_mesh(edge_source.extract_all_edges(), line_width=4, color="gray")
>>> plotter.enable_parallel_projection()
>>> _ = plotter.add_axes(
... box=True,
... box_args={
Expand Down Expand Up @@ -349,6 +346,7 @@ def __init__(self: PlotterBase, *args, **kwargs) -> None: # type: ignore[no-unt
"""
super().__init__(*args, **kwargs)
super().enable_parallel_projection() # type: ignore[misc]


class Plotter(PlotterBase, pv.Plotter): # type: ignore[misc]
Expand Down

0 comments on commit 90eed9e

Please sign in to comment.