Skip to content

Commit

Permalink
Merge pull request #1267 from nschloe/convert-fix
Browse files Browse the repository at this point in the history
Convert fix
  • Loading branch information
nschloe authored Jan 22, 2022
2 parents 3e6bdf5 + 0bd7831 commit ac09d10
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<!--[![PyPi downloads](https://img.shields.io/pypi/dm/meshio.svg?style=flat-square)](https://pypistats.org/packages/meshio)-->

[![Discord](https://img.shields.io/static/v1?logo=discord&label=chat&message=on%20discord&color=7289da&style=flat-square)](https://discord.gg/Z6DMsJh4Hr)
[![Discord](https://img.shields.io/static/v1?logo=discord&logoColor=white&label=chat&message=on%20discord&color=7289da&style=flat-square)](https://discord.gg/Z6DMsJh4Hr)

[![gh-actions](https://img.shields.io/github/workflow/status/nschloe/meshio/ci?style=flat-square)](https://github.com/nschloe/meshio/actions?query=workflow%3Aci)
[![codecov](https://img.shields.io/codecov/c/github/nschloe/meshio.svg?style=flat-square)](https://app.codecov.io/gh/nschloe/meshio)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = meshio
version = 5.2.5
version = 5.2.6
author = Nico Schlömer et al.
author_email = [email protected]
description = I/O for many mesh formats
Expand Down
8 changes: 6 additions & 2 deletions src/meshio/_cli/_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,14 @@ def convert(args):
mesh.points = np.ascontiguousarray(mesh.points)

if args.sets_to_int_data:
mesh.sets_to_int_data()
mesh.point_sets_to_data()
mesh.cell_sets_to_data()

if args.int_data_to_sets:
mesh.int_data_to_sets()
for key in mesh.point_data:
mesh.point_data_to_sets(key)
for key in mesh.cell_data:
mesh.cell_data_to_sets(key)

# write it out
kwargs = {"file_format": args.output_format}
Expand Down
1 change: 1 addition & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def test_convert(tmp_path):
"gmsh",
"--output-format",
"vtk",
"--sets-to-int-data",
]
)

Expand Down

0 comments on commit ac09d10

Please sign in to comment.