SimVascular / SimVascular/svVascularize

Intersection Error

Open
#46 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
19
Forks
11
Avg merge
1h 58m
Merged PRs (30d)
19

Description

Description

025-11-18 14:17:51.099 ( 249.246s) [ A0BCB1AFA88E3F7]vtkIntersectionPolyData:1583 WARN| vtkIntersectionPolyDataFilter (000001F58AB605B0): No cell with correct orientation found
2025-11-18 14:17:51.208 ( 249.356s) [ A0BCB1AFA88E3F7] vtkExecutive.cxx:730 ERR| vtkCompositeDataPipeline (000001F58D9ABB70): Algorithm vtkIntersectionPolyDataFilter (000001F58AB605B0) returned failure for request: vtkInformation (000001F58AD53B40)
Debug: Off
Modified Time: 3459233
Reference Count: 1
Registered Events: (none)
Request: REQUEST_DATA
FORWARD_DIRECTION: 0
ALGORITHM_AFTER_FORWARD: 1
FROM_OUTPUT_PORT: 0

ERROR:root:Algorithm vtkIntersectionPolyDataFilter (000001F58AB605B0) returned failure for request: vtkInformation (000001F58AD53B40)
2025-11-18 14:17:51.211 ( 249.359s) [ A0BCB1AFA88E3F7] vtkExecutive.cxx:730 ERR| vtkCompositeDataPipeline (000001F58D9AA4F0): Algorithm vtkBooleanOperationPolyDataFilter (000001F581108840) returned failure for request: vtkInformation (000001F58AD516F0)
Debug: Off
Modified Time: 3458980
Reference Count: 1
Registered Events: (none)
Request: REQUEST_DATA
FORWARD_DIRECTION: 0
ALGORITHM_AFTER_FORWARD: 1
FROM_OUTPUT_PORT: 0

ERROR:root:Algorithm vtkBooleanOperationPolyDataFilter (000001F581108840) returned failure for request: vtkInformation (000001F58AD516F0)
Union tubes : 60%|███████████████████████████████████████████████▍ | 6/10 [00:17<00:15, 3.83s/union]Traceback (most recent call last):
File "", line 1, in
File "C:\Users\micha\Downloads\Simulations\Pyvista Scripts\sample_baffle\Sample_Baffle.py", line 22, in
sim.build_meshes(fluid=True,tissue=True,boundary_layer=False)
File "C:\Users\micha\miniconda3\envs\svv\lib\site-packages\svv\simulation\simulation.py", line 96, 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 733, in build_watertight_solid
model = union_tubes_balanced(tubes, lines, cap_resolution=cap_resolution)
File "C:\Users\micha\miniconda3\envs\svv\lib\site-packages\svv\tree\export\export_solid.py", line 891, in union_tubes_balanced
raise e
File "C:\Users\micha\miniconda3\envs\svv\lib\site-packages\svv\tree\export\export_solid.py", line 885, in union_tubes_balanced
merged = boolean(comp_mesh[ra], comp_mesh[rb], operation='union', fix_mesh=fix_mesh, engine=engine)
File "C:\Users\micha\miniconda3\envs\svv\lib\site-packages\svv\domain\routines\boolean.py", line 73, in boolean
result = pyvista_object_1.boolean_union(pyvista_object_2)
File "C:\Users\micha\miniconda3\envs\svv\lib\site-packages\pyvista\core\filters\poly_data.py", line 183, in boolean_union
return self._boolean('union', other_mesh, tolerance, progress_bar=progress_bar)
File "C:\Users\micha\miniconda3\envs\svv\lib\site-packages\pyvista\core\filters\poly_data.py", line 93, in _boolean
raise NotAllTrianglesError("Make sure both the input and output are triangulated.")
pyvista.core.errors.NotAllTrianglesError: Make sure both the input and output are triangulated.

Reproduction

import pyvista as pv
from svv.domain.domain import Domain
from svv.tree.tree import Tree

mesh = pv.read('sample_baffle_extrude_allometric3_repaired2.stl').triangulate()
baffle = Domain(mesh)
baffle.create()
baffle.solve()
baffle.build()

t = Tree()
t.set_domain(baffle)
'''t.parameters.set('root_pressure',100)
t.parameters.set('terminal_pressure',0)'''
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)
sim.extract_faces()

sim.construct_3d_fluid_simulation()
sim.write_3d_fluid_simulation()

Expected behavior

Perform intersection

Additional context

No response

Code of Conduct
  • I agree to follow this project's Code of Conduct and Contributing Guidelines

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproduction in Sample_Baffle.py, then trace the failure through svv/tree/export/export_solid.py and svv/domain/routines/boolean.py. Run the supplied mesh-building sequence and inspect the PyVista intersection and boolean errors. Done means the intersection and subsequent fluid mesh construction complete successfully for the reproduced case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.