FEM: Handle python vtk user installs that conflict with FreeCAD VTK

This commit is contained in:
Stefan Tröger
2025-04-30 19:08:22 +02:00
parent 96e9e7a17a
commit 0304faa2bc
6 changed files with 293 additions and 0 deletions

View File

@@ -29,6 +29,12 @@ __url__ = "https://www.freecad.org"
# \ingroup FEM
# \brief Post processing filter creating glyphs for vector fields
import FreeCAD
# check vtk version to potentially find missmatchs
from femguiutils.vtk_module_handling import vtk_module_handling
vtk_module_handling()
# IMPORTANT: Never import vtk directly. Often vtk is compiled with different QT
# version than FreeCAD, and "import vtk" crashes by importing qt components.
# Always import the filter and data modules only.