Skip to content

When read displacement from rst file without input a mesh, fail to plot due to empty mesh support #1718

@MichaelNale

Description

@MichaelNale

Before submitting the issue

  • I have checked for Compatibility issues
  • I have searched among the existing issues
  • I am using a Python virtual environment

Description of the bug

If you want to plot the displacement from rst file without input a mesh you cannot plot the resulting field with this error
image
This is due to the fact that for this kind of result, the mesh support is empty by default.

Steps To Reproduce

path = r"path_to\ASimpleBar.rst"

dataSource = dpf.DataSources()
dataSource.set_result_file_path(path, "rst")

stream_prov = dpf.operators.metadata.streams_provider(data_sources=dataSource)
stream_prov.connect(0,1)
stream_c = stream_prov.outputs.streams_container

result_op = dpf.operators.result.displacement()
result_op.inputs.streams_container(stream_c)
result_fc = result_op.outputs.fields_container()

field = result_fc[0]
field .plot()

Which Operating System causes the issue?

Windows

Which DPF/Ansys version are you using?

DPF Server 2024.2.pre1

Which Python version causes the issue?

3.9

Installed packages

NA

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions