ansys / pydpf-post

Data Processing Framework - Post Processing Module
https://post.docs.pyansys.com
MIT License
43 stars 10 forks source link

Include an option on plot method to plot results only on named selections, so the rest of the structures is not shown #501

Open jviqueg opened 1 year ago

jviqueg commented 1 year ago

Description of the feature

Currently, when user makes a plot on a named selection, the rest of the structure is kept in grey. Looking at plot method, plot(mesh=True, constructed_geometries=True, loads=True, boundary_conditions=True), mesh can only be True or False. There is another option, which is using plot_contour, but here again the obtained figure depends on the support. There is a workaound using pyvista options, but I would suggest including a simple option that allows user to plot only on a specific named selection, something like:

bar1_tot_displacement = simulation.displacement(named_selections=["BAR_1"], norm=True)
bar1_tot_displacement.plot(only_on_ns=True)

Steps for implementing the feature

No response

Useful links and references

No response

aukselis-c1connections commented 9 months ago

There is a workaound using pyvista options

Could you share perhaps the workaround?

jviqueg commented 9 months ago

Please see post in DevForum. I would recommend last option given in comments. https://discuss.ansys.com/discussion/2538/how-can-i-plot-in-pydpf-post-results-on-a-mesh-part-linked-to-a-named-selection#latest