SimVascular / SimVascular/svVascularize
Quality check error & Exception handling
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 19
- Forks
- 11
- Avg merge
- 1h 58m
- Merged PRs (30d)
- 19
Description
Description
Error: MMG5_minQualCheck: too bad quality for the worst element: (elt 15105 -> 0.000000e+00)
Traceback (most recent call last):
File "C:\Users\micha\miniconda3\envs\svv\lib\site-packages\svv\utils\remeshing\remesh.py", line 498, in remesh_surface
subprocess.check_call(executable_list)
File "C:\Users\micha\miniconda3\envs\svv\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\Users\micha\miniconda3\envs\svv\lib\site-packages\svv\utils\remeshing\Windows\mmgs_O3.exe', 'tmp.mesh', '-v', '1', '-hsiz', '0.0009522198054603944']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\micha\miniconda3\envs\svv\lib\site-packages\svv\simulation\simulation.py", line 95, in build_meshes
fluid_surface_mesh = self.synthetic_object.export_solid(watertight=True)
File "C:\Users\micha\miniconda3\envs\svv\lib\site-packages\svv\tree\tree.py", line 296, in export_solid
model = build_watertight_solid(self)
File "C:\Users\micha\miniconda3\envs\svv\lib\site-packages\svv\tree\export\export_solid.py", line 406, in build_watertight_solid
model = union_tubes(tubes, lines, cap_resolution=cap_resolution)
File "C:\Users\micha\miniconda3\envs\svv\lib\site-packages\svv\tree\export\export_solid.py", line 374, in union_tubes
model = remesh_surface(model, hsiz=hsize)
File "C:\Users\micha\miniconda3\envs\svv\lib\site-packages\svv\utils\remeshing\remesh.py", line 501, in remesh_surface
subprocess.check_call(executable_list)
File "C:\Users\micha\miniconda3\envs\svv\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\Users\micha\miniconda3\envs\svv\lib\site-packages\svv\utils\remeshing\Windows\mmgs_O3.exe', 'tmp.mesh', '-v', '1', '-hsiz', '0.0009522198054603944']' returned non-zero exit status 1.
Reproduction
import pyvista as pv
from svv.domain.domain import Domain
from svv.tree.tree import Tree
mesh = pv.read('sample_baffle_extrude_allometric2.stl').triangulate()
baffle = Domain(mesh)
baffle.create()
baffle.solve()
baffle.build()
t = Tree()
t.set_domain(baffle)
t.set_root()
t.n_add(10)
from svv.simulation.simulation import Simulation
sim = Simulation(t)
sim.build_meshes(fluid=True,tissue=True,boundary_layer=False)
Expected behavior
generate mesh files
Additional context
No response
Code of Conduct
- I agree to follow this project's Code of Conduct and Contributing Guidelines
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the supplied PyVista reproduction and trace the failure through svv/simulation/simulation.py, svv/tree/export/export_solid.py, and svv/utils/remeshing/remesh.py. Inspect how the mmgs executable is invoked and how its failure is handled. Done means the reproduction generates the expected mesh files without the reported exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100