-
Couldn't load subscription status.
- Fork 23
Update MeshedRegion.grid coordinates when necessary and clear data before plotting. #513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
b39d904
55bbd9f
5e05ecd
52afa44
f6c89cc
d057409
10358ca
792ab30
03d3ba7
e27416c
f8a3514
5651022
59a7ec7
a399da9
a748683
f122405
f4ba135
75032b0
0f81110
7352a5a
ec1b333
6f5e080
ce9d569
f8afb5f
54e788a
483a25c
c24c430
946f91c
ee1d2f5
da92d26
23c5ece
89d4f75
7a8935b
a889e3b
d380be3
2c3414b
ed41364
141693d
0f2ab19
3358caf
62999b4
0c5a2e1
4d7e2ba
78b20ba
f686012
c037168
6087460
7d647c8
9199890
fed2f19
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -391,6 +391,8 @@ def add_mesh(self, meshed_region, deform_by=None, scale_factor=1.0, **kwargs): | |
| >>> pl.add_mesh(mesh) | ||
|
|
||
| """ | ||
| if meshed_region.grid is not None: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have you checked what happens with meshes containers? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It works. |
||
| meshed_region.grid.clear_data() | ||
| self._internal_plotter.add_mesh(meshed_region=meshed_region, | ||
| deform_by=deform_by, | ||
| scale_factor=scale_factor, | ||
|
|
@@ -767,6 +769,7 @@ def plot_contour( | |
| self._internal_plotter.add_scale_factor_legend(scale_factor, **kwargs) | ||
| else: | ||
| grid = mesh.grid | ||
| grid.clear_data() | ||
| self._internal_plotter._plotter.add_mesh(grid, scalars=overall_data, **kwargs_in) | ||
|
|
||
| background = kwargs.pop("background", None) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PProfizi In my opinion, we need to think larger. Here the "real" issue is not "when set coordinates is called the grid needs to be updated" but "when the mesh is updated (equivalent to setters are called) the grid is out dated".
With your we will have the same bug if set connectivity, or set element types is called