How to include custom rotation angle within pymapdl legacy function plot_principal_nodal_stress( )

Member Posts: 1
First Comment
**

I would like to rotate the default view after plotting stress plot , by 30 Deg ,using the initial cpos returned value stored in cam_pos variable as shown below

using ansys legacy reader

rst = pymapdl_reader.read_binary(result_file)
cam_pos=rst.plot_principal_nodal_stress(
0,
"SEQV",
window_size=[500,500],
background="w",
text_color="k",
add_text=False,
show_edges=False,
#cpos='xy',
return_cpos=True,
show_scalar_bar=True,
lighting=True,
show_axes=True,
off_screen=True,
cmap='turbo',
node_components=None,
element_components=None,
)
is it possible to add the rotation as **kwargs ,like angle=30 or feature_angle=30 ?

other methods which can make this possible are also welcome

https://reader.docs.pyansys.com/version/stable/user_guide/loading_results.html#accessing-solution-results

Tagged:

Best Answers

  • Administrator, Employee Posts: 303
    Ancient Membership 100 Comments 100 Likes 25 Answers
    admin
    Answer ✓

    Hello! Thanks for your question! I have pinged @AKD-Scripting-Team who should hopefully be able to help.

  • Moderator, Employee Posts: 132
    100 Comments 25 Likes Second Anniversary 5 Answers
    ✭✭✭✭
    Answer ✓

    @Bsun12 Attached script helps you achieve this.

    We are getting CPOS information from current view and then rotation w.r.t view vector by required angle and get new CPOS. This would essentially change only the view up vector.

Welcome!

It looks like you're new here. Sign in or register to get started.