Skip to content

Commit

Permalink
fix bug when using cell data with to_mesh_state (#36)
Browse files Browse the repository at this point in the history
* Update vtk.py

fixing typo where point data is used for cell data in `to_mesh_state`

* Update CHANGELOG.md

update changelog
  • Loading branch information
ericbdaniels authored Mar 26, 2021
1 parent 6be5b01 commit daca5c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dash_vtk/utils/vtk.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def to_mesh_state(dataset, field_to_keep=None):
if c_array:
dataRange = c_array.GetRange(-1)
nb_comp = c_array.GetNumberOfComponents()
values = vtk_to_numpy(p_array).ravel()
values = vtk_to_numpy(c_array).ravel()
js_types = to_js_type[str(values.dtype)]
location = 'CellData'

Expand Down
2 changes: 2 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
* fix bug when using cell data with `to_mesh_state`

## [0.0.6] - 2021-02-22

Expand Down

0 comments on commit daca5c1

Please sign in to comment.