Skip to content

AlexanderKazakov/py_grid_utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

For mesh conversion, see

https://github.com/nschloe/meshio

tetgen calls examples:

C:\DATA\Programs\tetgen\build_dir\Release\tetgen.exe -p -q1.2/15 -a10.0 -Y -k -V skull.stl

where from my experience:

  • -p to mesh surface from stl file
  • -q{1}/{2} {1} from 1.2 to 2, {2} from 14 to 18
  • -a{1} {1} -- linear tetra size
  • -Y "to preserve surface"
  • -k output to vtk
  • -V verbose

file *.stl for tetgen must be a closed surface

CGAL useful utils:

For surface remeshing, surface *.off file for CGAL must be oriented, see orient_facets function in utils

My scripts:

  • utils.py -- some useful functions to work with grids in python
  • interpolate_materials.py -- restore cells info to a new grid from the initial grid using KD-tree from vtk
  • remove_crossing_facets.py -- remove facets that are outer for some non-convex hull from a surface
  • my_vtk_to_vlad_mesh.py -- convert vtk to DGM by Vlad format
  • merge_surfaces.py
  • refine_surfaces.py, extract_connected_components.py -- struggling to improve quality of skull mesh
  • grid2surfaces.py -- extract surfaces that split one material from another, i.e for 3 materials there will be 6 surfaces (count outer space as material -1)
  • grid2img.py -- convert a mesh to 3D image
  • clear_initial_grid.py -- replace small connected components of materials in a mesh
  • correct_3d_image.py -- smoothing 3D image

About

Work with unstructured grids from python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages