Skip to content

Commit 46c18e9

Browse files
committed
readme updates
1 parent 29a9399 commit 46c18e9

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,12 @@ mesh = pygalmesh.generate_mesh(s, cell_size=0.2)
5858

5959
# mesh.points, mesh.cells, ...
6060
```
61-
You can write the mesh using [meshio](https://github.com/nschloe/meshio), e.g.,
61+
You can write the mesh with
6262
```python
63-
import meshio
64-
meshio.write("out.vtk", mesh)
63+
mesh.write("out.vtk")
6564
```
65+
You can use any format supported by [meshio](https://github.com/nschloe/meshio).
66+
6667
The mesh generation comes with many more options, described
6768
[here](https://doc.cgal.org/latest/Mesh_3/). Try, for example,
6869
```python
@@ -367,7 +368,7 @@ vol = vol.reshape((Nx,Ny,Nz))
367368

368369

369370
mesh = pygalmesh.generate_from_array(vol, h, facet_distance=.2, cell_size=1.)
370-
meshio.write('breast.vtk',mesh)
371+
mesh.write('breast.vtk')
371372
```
372373

373374
In addition, we can specify different mesh sizes for each tissue type. The code below sets the mesh size to *1 mm* for the skin tissue (label `4`), *0.5 mm* for the vascular tissue (label `5`), and *2 mm* for all other tissues (`default`).
@@ -376,7 +377,7 @@ In addition, we can specify different mesh sizes for each tissue type. The code
376377
cell_sizes_map = {'default': 2., 4: 1., 5: .5}
377378
mesh = pygalmesh.generate_from_array_with_subdomain_sizing(
378379
vol, h, facet_distance=.2, cell_sizes_map=cell_sizes_map)
379-
meshio.write('breast_adapted.vtk',mesh)
380+
mesh.write('breast_adapted.vtk')
380381
```
381382

382383
#### Surface remeshing

0 commit comments

Comments
 (0)