You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here you can find an example if you want to import customized file formats.
2
+
3
+
1. create an `example.py`
4
+
2. implement a function as following
5
+
```python
6
+
defread_func(filepath):
7
+
# open the filepath linked file
8
+
# construct the meshio object
9
+
return meshio.Mesh
10
+
```
11
+
3. call `meshio.register_format("name", [".extenstion"], read_func, {".extenstion": None})`in global environment
12
+
4. add `from . import example` in `__init__.py`
13
+
14
+
You can check `bgeo.py` as an example, which reads the partiles-only [.bgeo](https://github.com/wdas/partio) file.
15
+
16
+
For more details how to construct the `meshio.Mesh` object, you can check [here](https://github.com/nschloe/meshio/wiki/meshio-Mesh()-data-structure) for the details about the data strucutre, and [here](https://github.com/nschloe/meshio/wiki/Node-ordering-in-cells) more details about the vertex ordering.
0 commit comments