Metadata-Version: 2.1
Name: meshpro
Version: 0.0.4
Summary: Mesh tools for professionals
Home-page: https://github.com/meshpro/support
Author: Nico Schlömer
Author-email: nico.schloemer@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Utilities
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: appdirs
Requires-Dist: keygen-licensing-tools (>=0.2.0)
Requires-Dist: meshio[all] (>=5.1.1)
Requires-Dist: numpy (>=1.20.0)
Requires-Dist: npx (>=0.0.22)
Requires-Dist: rich
Requires-Dist: tomli
Requires-Dist: tomli-w
Requires-Dist: importlib-metadata ; python_version < "3.8"

<p align="center">
  <a href="https://github.com/meshpro/support"><img alt="meshpro" src="https://raw.githubusercontent.com/meshpro/support/gh-pages/meshpro-logo.svg" width="60%"></a>
  <p align="center">Mesh tools for professionals.</p>
</p>

MeshPro is a Python library and command-line tool for mesh I/O and mesh manipulation.

It supports all mesh formats supported by
[meshio](https://github.com/nschloe/meshio).

<!--
plus a few more:

- [Abaqus](http://abaqus.software.polimi.it/v6.14/index.html) (`.inp`)
- ANSYS msh (`.msh`)
- [PERMAS](https://www.intes.de) (`.post`, `.post.gz`, `.dato`, `.dato.gz`)
- [Tecplot .dat](http://paulbourke.net/dataformats/tp/)
-->

Install MeshPro with

```
pip install meshpro
```

and <a href="mailto:nico.schloemer@gmail.com?subject=MeshPro license request">
retrieve a license key</a>. You can then use the command-line tool

<!--pytest-codeblocks:skip-->

```sh
meshpro convert    input.msh output.vtk   # convert between two formats

meshpro info       input.xdmf             # show some info about the mesh

meshpro compress   input.vtu              # compress the mesh file
meshpro decompress input.vtu              # decompress the mesh file

meshpro binary     input.msh              # convert to binary format
meshpro ascii      input.msh              # convert to ASCII format
```

or use MeshPro in Python with

```python
import meshpro
```

## MeshPro features

MeshPro meshes work exactly like [meshio](https://github.com/nschloe/meshio)
meshes, and they have a few extras:

```python
import meshpro


# create mesh
mesh = meshpro.Mesh(
    [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0]],
    [("triangle", [[0, 1, 2], [0, 2, 3]])],
)

# or read it in
# mesh = meshpro.read("mesh.vtk")

# remove duplicate points and take care of the indexing
mesh.deduplicate_points(tol=1.0e-10)

# remove all points which aren't referenced in any cell
mesh.remove_orphaned_points()

# remove a number of points or cells
# mesh.remove_points(mask)
# mesh.remove_cells(mask)

# add boundary cells
mesh.add_boundary_cells()

# add outer normals as cell data
mesh.add_outer_normals()
```

Other mesh manipulation tools are these:

<!--pytest-codeblocks:skip-->

```python
import meshpro

# extract boudnary mesh
boundary_mesh = boundary_meshmeshpro.extract_boundary_mesh(mesh)

# merge some meshes
mesh = meshpro.merge_meshes([mesh1, mesh2, mesh3])

submesh = meshpro.extract_submesh(mesh, point_mask, cell_mask)

submeshes = meshpro.split_cell_sets(mesh, store_orig_node_ids_as="gid")
```

### License

MeshPro is a commercial product. You need to <a
href="mailto:nico.schloemer@gmail.com?subject=MeshPro license request">acquire
a license</a> to use it. Trial licenses are available.


