Skip to content

Commit

Permalink
Merge branch 'main' into feat/pool-improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
germa89 authored Sep 11, 2023
2 parents 1bbc240 + 1ff7ae5 commit 3f4b2d7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/00-mapdl-examples/pressure_vessel.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

# Generate a cylindrical volume by rotating an area pattern about an axis
mapdl.vrotat(a_comb, pax1=6, arc=90)
mapdl.vplot(color="grey", background="w", show_area_numbering=True, cpos="zy")
mapdl.vplot(background="w")


###############################################################################
Expand Down
10 changes: 6 additions & 4 deletions src/ansys/mapdl/core/mapdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1719,8 +1719,7 @@ def vplot(
points = []
labels = []

# kwargs.setdefault("return_plotter", True)
kwargs["return_plotter"] = True
return_plotter = kwargs.pop("return_plotter", False)
color_areas = True

for each_volu in volumes:
Expand All @@ -1733,7 +1732,8 @@ def vplot(
quality=quality,
show_area_numbering=show_area_numbering,
show_line_numbering=show_line_numbering,
show_lines=False,
show_lines=show_lines,
return_plotter=True,
**kwargs,
)

Expand All @@ -1749,7 +1749,9 @@ def vplot(
self.cmsel("S", cm_name_area, "AREA", mute=True)
self.cmsel("S", cm_name_volu, "VOLU", mute=True)

return general_plotter(meshes, points, labels, **kwargs)
return general_plotter(
meshes, points, labels, return_plotter=return_plotter, **kwargs
)

else:
with self._enable_interactive_plotting():
Expand Down
6 changes: 5 additions & 1 deletion src/ansys/mapdl/core/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,11 @@ def wrapper(self, *args, **kwargs):
orig_entity_sel_function(self, "all")

plotting_function = getattr(self, plot_function)
pl = plotting_function(return_plotter=True)
if entity == "area":
# To overwrite the quality argument
pl = plotting_function(return_plotter=True, quality=1)
else:
pl = plotting_function(return_plotter=True)

vmin = self._enable_picking_entities(
entity, pl, type_, previous_picked_entities, **kwargs
Expand Down

0 comments on commit 3f4b2d7

Please sign in to comment.