From 875e32607d08b8848315f1dab275830e88783c3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Tr=C3=B6ger?= Date: Sat, 27 Feb 2016 12:52:10 +0100 Subject: [PATCH] FEM Post: import VTK types only when possible --- CMakeLists.txt | 2 +- src/Mod/Fem/Init.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 751ccbd49..41d008bb9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -165,7 +165,7 @@ if(APPLE) endif(APPLE) OPTION(BUILD_FEM "Build the FreeCAD FEM module, be aware, unfinished code!" ON) -OPTION(BUILD_FEM_VTK "Build the FreeCAD VTK Postprocessing support (need VTK 6 or higher)" ON) +OPTION(BUILD_FEM_VTK "Build the FreeCAD VTK Postprocessing support (need VTK 6 or higher)" OFF) OPTION(BUILD_SANDBOX "Build the FreeCAD Sandbox module which is only for testing purposes" OFF) OPTION(BUILD_TEMPLATE "Build the FreeCAD template module which is only for testing purposes" OFF) OPTION(BUILD_ARCH "Build the FreeCAD Architecture module" ON) diff --git a/src/Mod/Fem/Init.py b/src/Mod/Fem/Init.py index 95dcfb7c0..b49e899ac 100644 --- a/src/Mod/Fem/Init.py +++ b/src/Mod/Fem/Init.py @@ -31,7 +31,9 @@ import FreeCAD FreeCAD.addExportType("TetGen file (*.poly)", "convert2TetGen") FreeCAD.addImportType("FEM formats (*.unv *.med *.dat *.bdf)", "Fem") -FreeCAD.addImportType("FEM results (*.vtk *.vtp *.vts *.vtr *.vtu *.vti)","Fem") +if("BUILD_FEM_VTK" in FreeCAD.__cmake__): + FreeCAD.addImportType("FEM results (*.vtk *.vtp *.vts *.vtr *.vtu *.vti)","Fem") + FreeCAD.addExportType("FEM formats (*.unv *.med *.dat *.inp)", "Fem") FreeCAD.addImportType("CalculiX result (*.frd)", "ccxFrdReader") FreeCAD.addImportType("Abaqus file (*.inp)", "FemGui")