The package rpms/freecad.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/freecad.git/commit/?id=13906588ec478....
Change: +ExcludeArch: i686
Thanks.
Full change: ============
commit 13906588ec4783d7383d8003990f3cefb260cbce Author: Richard Shaw hobbes1069@gmail.com Date: Tue Aug 9 10:08:12 2022 -0500
Exclude i686 arch on Fedora 37 and higher.
diff --git a/freecad.spec b/freecad.spec index e2c5e1c..ae860e9 100644 --- a/freecad.spec +++ b/freecad.spec @@ -32,6 +32,11 @@ Source102: freecad.1
Patch0: freecad-unbundled-pycxx.patch
+# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +%if 0%{?fedora} > 36 +ExcludeArch: i686 +%endif + # Utilities BuildRequires: cmake gcc-c++ gettext dos2unix BuildRequires: doxygen swig graphviz
commit 4966647c2516d333df862d36f1a43e402de63e04 Author: Richard Shaw hobbes1069@gmail.com Date: Tue Aug 9 07:45:26 2022 -0500
Update to 0.20.1.
diff --git a/.gitignore b/.gitignore index 9a944bf..21aaced 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /FreeCAD-0.19.3.tar.gz /FreeCAD-0.19.4.tar.gz /FreeCAD-0.20.tar.gz +/FreeCAD-0.20.1.tar.gz diff --git a/1ae55905ba.patch b/1ae55905ba.patch deleted file mode 100644 index d543806..0000000 --- a/1ae55905ba.patch +++ /dev/null @@ -1,214 +0,0 @@ -From 1ae55905ba7e89278bf656ebcc57ea1088e8fa44 Mon Sep 17 00:00:00 2001 -From: wmayer wmayer@users.sourceforge.net -Date: Fri, 1 Jul 2022 17:54:50 +0200 -Subject: [PATCH] Py: make FreeCAD to compile with Py3.11 - ---- - src/Base/ConsoleObserver.cpp | 6 ++++ - src/Base/Interpreter.cpp | 56 ++++++++++++++++++++++++++++++++++++ - src/Base/PyObjectBase.cpp | 4 +++ - src/Base/PyTools.c | 10 ++++++- - src/Gui/Command.cpp | 7 +++++ - src/Gui/PythonDebugger.cpp | 17 +++++++++-- - 6 files changed, 97 insertions(+), 3 deletions(-) - -diff --git a/src/Base/ConsoleObserver.cpp b/src/Base/ConsoleObserver.cpp -index c6428a7f18be..ab3b3e9157b1 100644 ---- a/src/Base/ConsoleObserver.cpp -+++ b/src/Base/ConsoleObserver.cpp -@@ -266,7 +266,13 @@ std::stringstream &LogLevel::prefix(std::stringstream &str, const char *src, int - PyFrameObject* frame = PyEval_GetFrame(); - if (frame) { - line = PyFrame_GetLineNumber(frame); -+#if PY_VERSION_HEX < 0x030b0000 - src = PyUnicode_AsUTF8(frame->f_code->co_filename); -+#else -+ PyCodeObject* code = PyFrame_GetCode(frame); -+ src = PyUnicode_AsUTF8(code->co_filename); -+ Py_DECREF(code); -+#endif - } - } - if (print_src && src && src[0]) { -diff --git a/src/Base/Interpreter.cpp b/src/Base/Interpreter.cpp -index 2bacea30cbb7..5a476094b749 100644 ---- a/src/Base/Interpreter.cpp -+++ b/src/Base/Interpreter.cpp -@@ -523,6 +523,7 @@ void InterpreterSingleton::addPythonPath(const char* Path) - list.append(Py::String(Path)); - } - -+#if PY_VERSION_HEX < 0x030b0000 - const char* InterpreterSingleton::init(int argc,char *argv[]) - { - if (!Py_IsInitialized()) { -@@ -565,6 +566,61 @@ const char* InterpreterSingleton::init(int argc,char *argv[]) - PyGILStateLocker lock; - return Py_EncodeLocale(Py_GetPath(),nullptr); - } -+#else -+namespace { -+void initInterpreter(int argc,char *argv[]) -+{ -+ PyStatus status; -+ PyConfig config; -+ PyConfig_InitPythonConfig(&config); -+ -+ status = PyConfig_SetBytesArgv(&config, argc, argv); -+ if (PyStatus_Exception(status)) { -+ throw Base::RuntimeError("Failed to set config"); -+ } -+ -+ status = Py_InitializeFromConfig(&config); -+ if (PyStatus_Exception(status)) { -+ throw Base::RuntimeError("Failed to init from config"); -+ } -+ -+ PyConfig_Clear(&config); -+ -+ Py_Initialize(); -+ const char* virtualenv = getenv("VIRTUAL_ENV"); -+ if (virtualenv) { -+ PyRun_SimpleString( -+ "# Check for virtualenv, and activate if present.\n" -+ "# See https://virtualenv.pypa.io/en/latest/userguide/#using-virtualenv-without-bin..." -+ "import os\n" -+ "import sys\n" -+ "base_path = os.getenv("VIRTUAL_ENV")\n" -+ "if not base_path is None:\n" -+ " activate_this = os.path.join(base_path, "bin", "activate_this.py")\n" -+ " exec(open(activate_this).read(), {'__file__':activate_this})\n" -+ ); -+ } -+} -+} -+const char* InterpreterSingleton::init(int argc,char *argv[]) -+{ -+ try { -+ if (!Py_IsInitialized()) { -+ initInterpreter(argc, argv); -+ -+ PythonStdOutput::init_type(); -+ this->_global = PyEval_SaveThread(); -+ } -+ -+ PyGILStateLocker lock; -+ return Py_EncodeLocale(Py_GetPath(),nullptr); -+ } -+ catch (const Base::Exception& e) { -+ e.ReportException(); -+ throw; -+ } -+} -+#endif - - void InterpreterSingleton::replaceStdOutput() - { -diff --git a/src/Base/PyObjectBase.cpp b/src/Base/PyObjectBase.cpp -index 773a61b259b3..343ab26999f6 100644 ---- a/src/Base/PyObjectBase.cpp -+++ b/src/Base/PyObjectBase.cpp -@@ -60,7 +60,11 @@ PyObjectBase::PyObjectBase(void* p,PyTypeObject *T) - , baseProxy(nullptr) - , attrDict(nullptr) - { -+#if PY_VERSION_HEX < 0x030b0000 - Py_TYPE(this) = T; -+#else -+ Py_SET_TYPE(this, T); -+#endif - _Py_NewReference(this); - #ifdef FC_LOGPYOBJECTS - Base::Console().Log("PyO+: %s (%p)\n",T->tp_name, this); -diff --git a/src/Base/PyTools.c b/src/Base/PyTools.c -index 71569e26a200..492d0c8563a4 100644 ---- a/src/Base/PyTools.c -+++ b/src/Base/PyTools.c -@@ -15,8 +15,10 @@ is provided on an as is basis, without warranties of any kind. - #include <string.h> - #include <assert.h> - #include <compile.h> --#include <eval.h> - #include <frameobject.h> -+#if PY_VERSION_HEX < 0x030b0000 -+#include <eval.h> -+#endif - - - /***************************************************************************** -@@ -310,7 +312,13 @@ void PP_Fetch_Error_Text() - if(!frame) - return; - int line = PyFrame_GetLineNumber(frame); -+#if PY_VERSION_HEX < 0x030b0000 - const char *file = PyUnicode_AsUTF8(frame->f_code->co_filename); -+#else -+ PyCodeObject* code = PyFrame_GetCode(frame); -+ const char *file = PyUnicode_AsUTF8(code->co_filename); -+ Py_DECREF(code); -+#endif - #ifdef FC_OS_WIN32 - const char *_f = strstr(file, "\src\"); - #else -diff --git a/src/Gui/Command.cpp b/src/Gui/Command.cpp -index c9568e8f0e69..cf555439fcd2 100644 ---- a/src/Gui/Command.cpp -+++ b/src/Gui/Command.cpp -@@ -657,8 +657,15 @@ void Command::printPyCaller() { - if(!frame) - return; - int line = PyFrame_GetLineNumber(frame); -+#if PY_VERSION_HEX < 0x030b0000 - const char *file = PyUnicode_AsUTF8(frame->f_code->co_filename); - printCaller(file?file:"<no file>",line); -+#else -+ PyCodeObject* code = PyFrame_GetCode(frame); -+ const char* file = PyUnicode_AsUTF8(code->co_filename); -+ printCaller(file?file:"<no file>",line); -+ Py_DECREF(code); -+#endif - } - - void Command::printCaller(const char *file, int line) { -diff --git a/src/Gui/PythonDebugger.cpp b/src/Gui/PythonDebugger.cpp -index 7e731a9dd6af..cd44e9b1c233 100644 ---- a/src/Gui/PythonDebugger.cpp -+++ b/src/Gui/PythonDebugger.cpp -@@ -563,6 +563,14 @@ void PythonDebugger::hideDebugMarker(const QString& fn) - } - } - -+#if PY_VERSION_HEX < 0x030900B1 -+static PyCodeObject* PyFrame_GetCode(PyFrameObject *frame) -+{ -+ Py_INCREF(frame->f_code); -+ return frame->f_code; -+} -+#endif -+ - // http://www.koders.com/cpp/fidBA6CD8A0FE5F41F1464D74733D9A711DA257D20B.aspx?s... - // http://code.google.com/p/idapython/source/browse/trunk/python.cpp - // http://www.koders.com/cpp/fid191F7B13CF73133935A7A2E18B7BF43ACC6D1784.aspx?s... -@@ -578,7 +586,9 @@ int PythonDebugger::tracer_callback(PyObject *obj, PyFrameObject *frame, int wha - - //no = frame->f_tstate->recursion_depth; - //std::string funcname = PyString_AsString(frame->f_code->co_name); -- QString file = QString::fromUtf8(PyUnicode_AsUTF8(frame->f_code->co_filename)); -+ PyCodeObject* code = PyFrame_GetCode(frame); -+ QString file = QString::fromUtf8(PyUnicode_AsUTF8(code->co_filename)); -+ Py_DECREF(code); - switch (what) { - case PyTrace_CALL: - self->depth++; -@@ -592,7 +602,10 @@ int PythonDebugger::tracer_callback(PyObject *obj, PyFrameObject *frame, int wha - //PyObject *str; - //str = PyObject_Str(frame->f_code->co_filename); - //no = frame->f_lineno; -- int line = PyCode_Addr2Line(frame->f_code, frame->f_lasti); -+ PyCodeObject* f_code = PyFrame_GetCode(frame); -+ int f_lasti = PyFrame_GetLineNumber(frame); -+ int line = PyCode_Addr2Line(f_code, f_lasti); -+ Py_DECREF(f_code); - //if (str) { - // Base::Console().Message("PROFILING: %s:%d\n", PyString_AsString(str), frame->f_lineno); - // Py_DECREF(str); diff --git a/4916.patch b/4916.patch deleted file mode 100644 index 2fc56d7..0000000 --- a/4916.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 196813abe2a349fb2b87133aa5c71febb971810e Mon Sep 17 00:00:00 2001 -From: Bernd Waibel waebbl-gentoo@posteo.net -Date: Sun, 11 Jul 2021 15:29:03 +0200 -Subject: [PATCH] improve search for VTK-9 - -Improve the find_package calls with vtk-9 cmake config files. -In this version, the variable VTK_MODULES_ENABLED has been -replaced by VTK_AVAILABLE_COMPONENTS. - -The additional change of the components names, which have their -'vtk' prefix removed in vtk-9 is not covered by this patch for -compatibility reasons. - -See the forum thread noted below for a description of this: -https://forum.freecadweb.org/viewtopic.php?f=4&t=60068 - -Signed-off-by: Bernd Waibel waebbl-gentoo@posteo.net ---- - cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake | 25 ++++++++++++++------ - 1 file changed, 18 insertions(+), 7 deletions(-) - -diff --git a/cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake b/cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake -index c83f83265400..5cf36329dfa3 100644 ---- a/cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake -+++ b/cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake -@@ -27,13 +27,24 @@ macro(SetupSalomeSMESH) - # check which modules are available - if(UNIX OR WIN32) - find_package(VTK COMPONENTS vtkCommonCore REQUIRED NO_MODULE) -- list(APPEND VTK_COMPONENTS vtkIOMPIParallel vtkParallelMPI vtkhdf5 vtkFiltersParallelDIY2 vtkRenderingCore vtkInteractionStyle vtkRenderingFreeType vtkRenderingOpenGL2) -- foreach(_module ${VTK_COMPONENTS}) -- list (FIND VTK_MODULES_ENABLED ${_module} _index) -- if (${_index} GREATER -1) -- list(APPEND AVAILABLE_VTK_COMPONENTS ${_module}) -- endif() -- endforeach() -+ if(${VTK_MAJOR_VERSION} LESS 9) -+ list(APPEND VTK_COMPONENTS vtkIOMPIParallel vtkParallelMPI vtkhdf5 vtkFiltersParallelDIY2 vtkRenderingCore vtkInteractionStyle vtkRenderingFreeType vtkRenderingOpenGL2) -+ foreach(_module ${VTK_COMPONENTS}) -+ list (FIND VTK_MODULES_ENABLED ${_module} _index) -+ if(${_index} GREATER -1) -+ list(APPEND AVAILABLE_VTK_COMPONENTS ${_module}) -+ endif() -+ endforeach() -+ else() -+ set(VTK_COMPONENTS "CommonCore;CommonDataModel;FiltersVerdict;IOXML;FiltersCore;FiltersGeneral;IOLegacy;FiltersExtraction;FiltersSources;FiltersGeometry") -+ list(APPEND VTK_COMPONENTS "IOMPIParallel;ParallelMPI;hdf5;FiltersParallelDIY2;RenderingCore;InteractionStyle;RenderingFreeType;RenderingOpenGL2") -+ foreach(_module ${VTK_COMPONENTS}) -+ list (FIND VTK_AVAILABLE_COMPONENTS ${_module} _index) -+ if(${_index} GREATER -1) -+ list(APPEND AVAILABLE_VTK_COMPONENTS ${_module}) -+ endif() -+ endforeach() -+ endif() - endif() - - # don't check VERSION 6 as this would exclude VERSION 7 diff --git a/6820e0a9ec.patch b/6820e0a9ec.patch deleted file mode 100644 index 3f7db40..0000000 --- a/6820e0a9ec.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 6820e0a9ec85203a6f342ca72a2ff8fd417beaf1 Mon Sep 17 00:00:00 2001 -From: wmayer wmayer@users.sourceforge.net -Date: Sat, 2 Jul 2022 19:36:27 +0200 -Subject: [PATCH] Py3: properly port to Py3.11 - ---- - src/Base/PyObjectBase.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/Base/PyObjectBase.cpp b/src/Base/PyObjectBase.cpp -index 343ab26999f..a8e1b327809 100644 ---- a/src/Base/PyObjectBase.cpp -+++ b/src/Base/PyObjectBase.cpp -@@ -63,7 +63,7 @@ PyObjectBase::PyObjectBase(void* p,PyTypeObject *T) - #if PY_VERSION_HEX < 0x030b0000 - Py_TYPE(this) = T; - #else -- Py_SET_TYPE(this, T); -+ this->ob_type = T; - #endif - _Py_NewReference(this); - #ifdef FC_LOGPYOBJECTS diff --git a/freecad-0.14-Version_h.patch b/freecad-0.14-Version_h.patch deleted file mode 100644 index 74e978d..0000000 --- a/freecad-0.14-Version_h.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -1,4 +1,6 @@ --add_subdirectory(Build) -+if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Build/Version.h) -+ add_subdirectory(Build) -+endif() - add_subdirectory(3rdParty) - add_subdirectory(Base) - add_subdirectory(App) diff --git a/freecad-0.15-zipios.patch b/freecad-0.15-zipios.patch deleted file mode 100644 index c9e9f32..0000000 --- a/freecad-0.15-zipios.patch +++ /dev/null @@ -1,18 +0,0 @@ -Index: FreeCAD-a50ae33557e1992a938542b319cacb8b09d7fb08/src/Base/CMakeLists.txt -=================================================================== ---- FreeCAD-a50ae33557e1992a938542b319cacb8b09d7fb08.orig/src/Base/CMakeLists.txt -+++ FreeCAD-a50ae33557e1992a938542b319cacb8b09d7fb08/src/Base/CMakeLists.txt -@@ -377,9 +377,11 @@ ENDIF(MSVC) - # Use external zipios++ if specified. - if(FREECAD_USE_EXTERNAL_ZIPIOS) - find_library(ZIPIOS_LIBRARY zipios) -- find_path(ZIPIOS_INCLUDES zipios++/zipios-config.h) -+ find_path(ZIPIOS_INCLUDES NAMES -+ zipios++/zipios-config.h -+ zipios++/zipios-config.hpp) - if(ZIPIOS_LIBRARY) -- message(STATUS "Found zipios++: ${ZIPIOS}") -+ message(STATUS "Found zipios++: ${ZIPIOS_LIBRARY}") - endif() - if(ZIPIOS_INCLUDES) - message(STATUS "Found zipios++ headers.") diff --git a/freecad-boost.patch b/freecad-boost.patch deleted file mode 100644 index 5b51837..0000000 --- a/freecad-boost.patch +++ /dev/null @@ -1,25 +0,0 @@ -Index: FreeCAD-0.19.2/CMakeLists.txt -=================================================================== ---- FreeCAD-0.19.2.orig/CMakeLists.txt -+++ FreeCAD-0.19.2/CMakeLists.txt -@@ -46,6 +46,7 @@ if(NOT FREECAD_LIBPACK_USE OR FREECAD_LI - SetupPCL() - SetupPybind11() - SetupBoost() -+ set(Boost_LIBRARIES_App ${Boost_LIBRARIES}) - SetupXercesC() - find_package(ZLIB REQUIRED) - find_package(PyCXX REQUIRED) -Index: FreeCAD-0.19.2/src/App/CMakeLists.txt -=================================================================== ---- FreeCAD-0.19.2.orig/src/App/CMakeLists.txt -+++ FreeCAD-0.19.2/src/App/CMakeLists.txt -@@ -59,7 +59,7 @@ include_directories( - - set(FreeCADApp_LIBS - FreeCADBase -- ${Boost_LIBRARIES} -+ ${Boost_LIBRARIES_App} - ) - - if (BUILD_QT5) diff --git a/freecad-memory_h.patch b/freecad-memory_h.patch deleted file mode 100644 index ed25b90..0000000 --- a/freecad-memory_h.patch +++ /dev/null @@ -1,27 +0,0 @@ -Index: FreeCAD-0.19.4/src/Mod/Part/App/BRepOffsetAPI_MakeFillingPyImp.cpp -=================================================================== ---- FreeCAD-0.19.4.orig/src/Mod/Part/App/BRepOffsetAPI_MakeFillingPyImp.cpp -+++ FreeCAD-0.19.4/src/Mod/Part/App/BRepOffsetAPI_MakeFillingPyImp.cpp -@@ -30,6 +30,9 @@ - # include <TopoDS_Face.hxx> - #endif - -+// For std::unique_ptr -+#include <memory> -+ - #include "BRepOffsetAPI_MakeFillingPy.h" - #include "BRepOffsetAPI_MakeFillingPy.cpp" - #include "TopoShapeEdgePy.h" -Index: FreeCAD-0.19.4/src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp -=================================================================== ---- FreeCAD-0.19.4.orig/src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp -+++ FreeCAD-0.19.4/src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp -@@ -29,6 +29,8 @@ - - // Needed for OCCT 7.5.2 - #include <TopoDS_Edge.hxx> -+// Needed for std::unique_ptr -+#include <memory> - - #include "ShapeUpgrade/UnifySameDomainPy.h" - #include "ShapeUpgrade/UnifySameDomainPy.cpp" diff --git a/freecad-vtk9.patch b/freecad-vtk9.patch deleted file mode 100644 index 74568f4..0000000 --- a/freecad-vtk9.patch +++ /dev/null @@ -1,827 +0,0 @@ -From bb9bcbd51df7c3cb76c5823038e4ea0f7e25a9ff Mon Sep 17 00:00:00 2001 -From: wmayer wmayer@users.sourceforge.net -Date: Mon, 12 Oct 2020 17:56:03 +0200 -Subject: [PATCH] Make smesh compile with vtk9 - ---- - .../salomesmesh/inc/SMDS_MeshElement.hxx | 9 +++- - .../salomesmesh/inc/SMDS_UnstructuredGrid.hxx | 4 ++ - .../salomesmesh/src/SMDS/SMDS_BallElement.cpp | 9 +++- - .../salomesmesh/src/SMDS/SMDS_Downward.cpp | 44 +++++++++---------- - .../salomesmesh/src/SMDS/SMDS_Mesh.cpp | 6 ++- - .../src/SMDS/SMDS_Mesh0DElement.cpp | 12 +++++ - .../salomesmesh/src/SMDS/SMDS_MeshNode.cpp | 10 ++--- - .../src/SMDS/SMDS_UnstructuredGrid.cpp | 35 +++++++++++++-- - .../src/SMDS/SMDS_VtkCellIterator.cpp | 7 +-- - .../salomesmesh/src/SMDS/SMDS_VtkEdge.cpp | 19 +++++++- - .../salomesmesh/src/SMDS/SMDS_VtkFace.cpp | 29 ++++++++++-- - .../salomesmesh/src/SMDS/SMDS_VtkVolume.cpp | 38 +++++++++++----- - .../src/SMESH/SMESH_MeshEditor.cpp | 8 ++-- - src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp | 7 ++- - 14 files changed, 179 insertions(+), 58 deletions(-) - -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx -@@ -40,11 +40,16 @@ - - #include <vtkType.h> - #include <vtkCellType.h> -+#include <vtkCellArray.h> - - //typedef unsigned short UShortType; - typedef short ShortType; - typedef int LongType; -- -+#ifdef VTK_CELL_ARRAY_V2 -+typedef const vtkIdType* vtkIdTypePtr; -+#else -+typedef vtkIdType* vtkIdTypePtr; -+#endif - class SMDS_MeshNode; - class SMDS_MeshEdge; - class SMDS_MeshFace; -@@ -192,7 +197,7 @@ protected: - //! Element index in vector SMDS_Mesh::myNodes or SMDS_Mesh::myCells - int myID; - //! index in vtkUnstructuredGrid -- int myVtkID; -+ vtkIdType myVtkID; - //! SMDS_Mesh identification in SMESH - ShortType myMeshId; - //! SubShape and SubMesh identification in SMESHDS -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx -@@ -95,7 +95,11 @@ public: - std::map<int, std::map<long,int> >& nodeQuadDomains); - vtkCellLinks* GetLinks() - { -+#ifdef VTK_CELL_ARRAY_V2 -+ return static_cast<vtkCellLinks*>(GetCellLinks()); -+#else - return Links; -+#endif - } - SMDS_Downward* getDownArray(unsigned char vtkType) - { -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp -@@ -67,10 +67,16 @@ void SMDS_BallElement::SetDiameter(doubl - bool SMDS_BallElement::ChangeNode (const SMDS_MeshNode * node) - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew<vtkIdList> cellPoints; -+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer()); -+ cellPoints->SetId(0, node->getVtkId()); -+#else - vtkIdType npts = 0; - vtkIdType* pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); - pts[0] = node->getVtkId(); -+#endif - SMDS_Mesh::_meshList[myMeshId]->setMyModified(); - return true; - } -@@ -83,7 +89,8 @@ void SMDS_BallElement::Print (std::ostre - const SMDS_MeshNode* SMDS_BallElement::GetNode (const int ind) const - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( myVtkID, npts, pts ); - return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ 0 ]); - } -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp -@@ -303,7 +303,7 @@ int SMDS_Down1D::getNodeSet(int cellId, - void SMDS_Down1D::setNodes(int cellId, int vtkId) - { - vtkIdType npts = 0; -- vtkIdType *pts; // will refer to the point id's of the face -+ vtkIdTypePtr pts; // will refer to the point id's of the face - _grid->GetCellPoints(vtkId, npts, pts); - // MESSAGE(vtkId << " " << npts << " " << _nbDownCells); - //ASSERT(npts == _nbDownCells); -@@ -357,7 +357,7 @@ int SMDS_Down1D::computeVtkCells(int *pt - { - vtkIdType point = pts[i]; - int numCells = _grid->GetLinks()->GetNcells(point); -- vtkIdType *cells = _grid->GetLinks()->GetCells(point); -+ vtkIdTypePtr cells = _grid->GetLinks()->GetCells(point); - for (int j = 0; j < numCells; j++) - { - int vtkCellId = cells[j]; -@@ -532,7 +532,7 @@ int SMDS_Down2D::computeVolumeIds(int ce - // --- find point id's of the face - - vtkIdType npts = 0; -- vtkIdType *pts; // will refer to the point id's of the face -+ vtkIdTypePtr pts; // will refer to the point id's of the face - _grid->GetCellPoints(cellId, npts, pts); - vector<int> nodes; - for (int i = 0; i < npts; i++) -@@ -577,7 +577,7 @@ int SMDS_Down2D::computeVolumeIdsFromNod - vtkIdType point = pts[i]; - int numCells = _grid->GetLinks()->GetNcells(point); - //MESSAGE("cells pour " << i << " " << numCells); -- vtkIdType *cells = _grid->GetLinks()->GetCells(point); -+ vtkIdTypePtr cells = _grid->GetLinks()->GetCells(point); - for (int j = 0; j < numCells; j++) - { - int vtkCellId = cells[j]; -@@ -627,7 +627,7 @@ int SMDS_Down2D::computeVolumeIdsFromNod - void SMDS_Down2D::setTempNodes(int cellId, int vtkId) - { - vtkIdType npts = 0; -- vtkIdType *pts; // will refer to the point id's of the face -+ vtkIdTypePtr pts; // will refer to the point id's of the face - _grid->GetCellPoints(vtkId, npts, pts); - // MESSAGE(vtkId << " " << npts << " " << _nbNodes); - //ASSERT(npts == _nbNodes); -@@ -795,7 +795,7 @@ void SMDS_Down3D::getNodeIds(int cellId, - { - int vtkId = this->_vtkCellIds[cellId]; - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(vtkId, npts, nodes); - for (int i = 0; i < npts; i++) - nodeSet.insert(nodes[i]); -@@ -1126,7 +1126,7 @@ void SMDS_DownTetra::getOrderedNodesOfFa - //MESSAGE("cellId = " << cellId); - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes); - - set<int> tofind; -@@ -1178,7 +1178,7 @@ void SMDS_DownTetra::computeFacesWithNod - // --- find point id's of the volume - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(cellId, npts, nodes); - - // --- create all the ordered list of node id's for each face -@@ -1234,7 +1234,7 @@ void SMDS_DownQuadTetra::getOrderedNodes - //MESSAGE("cellId = " << cellId); - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes); - - set<int> tofind; -@@ -1288,7 +1288,7 @@ void SMDS_DownQuadTetra::computeFacesWit - // --- find point id's of the volume - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(cellId, npts, nodes); - - // --- create all the ordered list of node id's for each face -@@ -1357,7 +1357,7 @@ void SMDS_DownPyramid::getOrderedNodesOf - //MESSAGE("cellId = " << cellId); - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes); - - set<int> tofind; -@@ -1435,7 +1435,7 @@ void SMDS_DownPyramid::computeFacesWithN - // --- find point id's of the volume - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(cellId, npts, nodes); - - // --- create all the ordered list of node id's for each face -@@ -1500,7 +1500,7 @@ void SMDS_DownQuadPyramid::getOrderedNod - //MESSAGE("cellId = " << cellId); - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes); - - set<int> tofind; -@@ -1580,7 +1580,7 @@ void SMDS_DownQuadPyramid::computeFacesW - // --- find point id's of the volume - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(cellId, npts, nodes); - - // --- create all the ordered list of node id's for each face -@@ -1660,7 +1660,7 @@ void SMDS_DownPenta::getOrderedNodesOfFa - //MESSAGE("cellId = " << cellId); - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes); - - set<int> tofind; -@@ -1744,7 +1744,7 @@ void SMDS_DownPenta::computeFacesWithNod - // --- find point id's of the volume - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(cellId, npts, nodes); - - // --- create all the ordered list of node id's for each face -@@ -1810,7 +1810,7 @@ void SMDS_DownQuadPenta::getOrderedNodes - //MESSAGE("cellId = " << cellId); - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes); - - set<int> tofind; -@@ -1896,7 +1896,7 @@ void SMDS_DownQuadPenta::computeFacesWit - // --- find point id's of the volume - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(cellId, npts, nodes); - - // --- create all the ordered list of node id's for each face -@@ -1981,7 +1981,7 @@ void SMDS_DownHexa::getOrderedNodesOfFac - //MESSAGE("cellId = " << cellId); - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes); - - set<int> tofind; -@@ -2036,7 +2036,7 @@ void SMDS_DownHexa::computeFacesWithNode - // --- find point id's of the volume - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(cellId, npts, nodes); - - // --- create all the ordered list of node id's for each face -@@ -2112,7 +2112,7 @@ void SMDS_DownQuadHexa::getOrderedNodesO - //MESSAGE("cellId = " << cellId); - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes); - - set<int> tofind; -@@ -2167,7 +2167,7 @@ void SMDS_DownQuadHexa::computeFacesWith - // --- find point id's of the volume - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(cellId, npts, nodes); - - // --- create all the ordered list of node id's for each face -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp -@@ -4768,7 +4768,11 @@ void SMDS_Mesh::dumpGrid(string ficdump) - ficcon << endl; - } - ficcon << "-------------------------------- connectivity " << nbPoints << endl; -- vtkCellLinks *links = myGrid->GetCellLinks(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkCellLinks *links = static_cast<vtkCellLinks*>(myGrid->GetCellLinks()); -+#else -+ vtkCellLinks *links = myGrid->GetCellLinks(); -+#endif - for (int i=0; i<nbPoints; i++) - { - int ncells = links->GetNcells(i); -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp -@@ -146,6 +146,17 @@ bool SMDS_Mesh0DElement::ChangeNodes(con - if ( nbNodes == 1 ) - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew<vtkIdList> cellPoints; -+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer()); -+ if (nbNodes != cellPoints->GetNumberOfIds()) -+ { -+ MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes); -+ return false; -+ } -+ myNode = nodes[0]; -+ cellPoints->SetId(0, myNode->getVtkId()); -+#else - vtkIdType npts = 0; - vtkIdType* pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); -@@ -156,6 +167,7 @@ bool SMDS_Mesh0DElement::ChangeNodes(con - } - myNode = nodes[0]; - pts[0] = myNode->getVtkId(); -+#endif - - SMDS_Mesh::_meshList[myMeshId]->setMyModified(); - return true; -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp -@@ -191,7 +191,7 @@ public: - SMDS_ElemIteratorPtr SMDS_MeshNode:: - GetInverseElementIterator(SMDSAbs_ElementType type) const - { -- vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID); -+ vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID); - //MESSAGE("myID " << myID << " ncells " << l.ncells); - return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyInvIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type)); - } -@@ -251,7 +251,7 @@ elementsIterator(SMDSAbs_ElementType typ - return SMDS_MeshElement::elementsIterator(SMDSAbs_Node); - else - { -- vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID); -+ vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID); - return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type)); - } - } -@@ -350,7 +350,7 @@ void SMDS_MeshNode::AddInverseElement(co - const SMDS_MeshCell *cell = dynamic_cast<const SMDS_MeshCell*> (ME); - assert(cell); - SMDS_UnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -- vtkCellLinks *Links = grid->GetCellLinks(); -+ vtkCellLinks *Links = static_cast<vtkCellLinks*>(grid->GetCellLinks()); - Links->ResizeCellList(myVtkID, 1); - Links->AddCellReference(cell->getVtkId(), myVtkID); - } -@@ -366,7 +366,7 @@ void SMDS_MeshNode::ClearInverseElements - - bool SMDS_MeshNode::emptyInverseElements() - { -- vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID); -+ vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID); - return (l.ncells == 0); - } - -@@ -378,7 +378,7 @@ bool SMDS_MeshNode::emptyInverseElements - - int SMDS_MeshNode::NbInverseElements(SMDSAbs_ElementType type) const - { -- vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID); -+ vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID); - - if ( type == SMDSAbs_All ) - return l.ncells; -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp -@@ -139,8 +139,8 @@ int SMDS_UnstructuredGrid::InsertNextLin - for (; it != setOfNodes.end(); ++it) - { - //MESSAGE("reverse link for node " << *it << " cell " << cellid); -- this->Links->ResizeCellList(*it, 1); -- this->Links->AddCellReference(cellid, *it); -+ this->GetLinks()->ResizeCellList(*it, 1); -+ this->GetLinks()->AddCellReference(cellid, *it); - } - - return cellid; -@@ -332,9 +332,13 @@ void SMDS_UnstructuredGrid::copyBloc(vtk - { - newTypes->SetValue(alreadyCopied, this->Types->GetValue(j)); - idCellsOldToNew[j] = alreadyCopied; // old vtkId --> new vtkId -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkIdType oldLoc = this->GetCellLocationsArray()->GetValue(j); -+#else - vtkIdType oldLoc = this->Locations->GetValue(j); -+#endif - vtkIdType nbpts; -- vtkIdType *oldPtsCell = 0; -+ vtkIdTypePtr oldPtsCell = 0; - this->Connectivity->GetCell(oldLoc, nbpts, oldPtsCell); - assert(nbpts < NBMAXNODESINCELL); - //MESSAGE(j << " " << alreadyCopied << " " << (int)this->Types->GetValue(j) << " " << oldLoc << " " << nbpts ); -@@ -952,6 +956,21 @@ void SMDS_UnstructuredGrid::GetNodeIds(s - */ - void SMDS_UnstructuredGrid::ModifyCellNodes(int vtkVolId, std::map<int, int> localClonedNodeIds) - { -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew<vtkIdList> cellPoints; -+ this->GetCellPoints(vtkVolId, cellPoints.GetPointer()); -+ for (vtkIdType i = 0; i < cellPoints->GetNumberOfIds(); i++) -+ { -+ if (localClonedNodeIds.count(cellPoints->GetId(i))) -+ { -+ vtkIdType oldpt = cellPoints->GetId(i); -+ cellPoints->SetId(i, localClonedNodeIds[oldpt]); -+ //MESSAGE(oldpt << " --> " << pts[i]); -+ //this->RemoveReferenceToCell(oldpt, vtkVolId); -+ //this->AddReferenceToCell(pts[i], vtkVolId); -+ } -+ } -+#else - vtkIdType npts = 0; - vtkIdType *pts; // will refer to the point id's of the face - this->GetCellPoints(vtkVolId, npts, pts); -@@ -966,6 +985,7 @@ void SMDS_UnstructuredGrid::ModifyCellNo - //this->AddReferenceToCell(pts[i], vtkVolId); - } - } -+#endif - } - - /*! reorder the nodes of a face -@@ -995,11 +1015,20 @@ void SMDS_UnstructuredGrid::BuildLinks() - this->Links->UnRegister(this); - } - -+#ifdef VTK_CELL_ARRAY_V2 -+ this->Links = SMDS_CellLinks::New(); -+ GetLinks()->Allocate(this->GetNumberOfPoints()); -+ GetLinks()->Register(this); -+//FIXME: vtk9 -+ GetLinks()->BuildLinks(this); -+ GetLinks()->Delete(); -+#else - this->Links = SMDS_CellLinks::New(); - this->Links->Allocate(this->GetNumberOfPoints()); - this->Links->Register(this); - this->Links->BuildLinks(this, this->Connectivity); - this->Links->Delete(); -+#endif - } - - /*! Create a volume (prism or hexahedron) by duplication of a face. -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp -@@ -33,7 +33,8 @@ SMDS_VtkCellIterator::SMDS_VtkCellIterat - } - else - { -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( _cellId, npts, pts ); - _vtkIdList->SetNumberOfIds( _nbNodes = npts ); - for (int i = 0; i < _nbNodes; i++) -@@ -67,7 +68,7 @@ SMDS_VtkCellIteratorToUNV::SMDS_VtkCellI - //MESSAGE("SMDS_VtkCellInterlacedIterator (UNV)" << _type); - - _vtkIdList = vtkIdList::New(); -- vtkIdType* pts; -+ vtkIdTypePtr pts; - vtkIdType npts; - vtkUnstructuredGrid* grid = _mesh->getGrid(); - grid->GetCellPoints((vtkIdType)_cellId, npts, pts); -@@ -182,7 +183,7 @@ SMDS_VtkCellIteratorPolyH::SMDS_VtkCellI - { - //MESSAGE("SMDS_VtkCellIterator Polyhedra"); - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(_cellId, nFaces, ptIds); - int id = 0; - _nbNodesInFaces = 0; -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp -@@ -67,6 +67,19 @@ bool SMDS_VtkEdge::ChangeNodes(const SMD - bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes) - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew<vtkIdList> cellPoints; -+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer()); -+ if (nbNodes != cellPoints->GetNumberOfIds()) -+ { -+ MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes); -+ return false; -+ } -+ for (int i = 0; i < nbNodes; i++) -+ { -+ cellPoints->SetId(i, nodes[i]->getVtkId()); -+ } -+#else - vtkIdType npts = 0; - vtkIdType* pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); -@@ -79,6 +92,7 @@ bool SMDS_VtkEdge::ChangeNodes(const SMD - { - pts[i] = nodes[i]->getVtkId(); - } -+#endif - SMDS_Mesh::_meshList[myMeshId]->setMyModified(); - return true; - } -@@ -87,7 +101,7 @@ bool SMDS_VtkEdge::IsMediumNode(const SM - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); - vtkIdType npts = 0; -- vtkIdType* pts = 0; -+ vtkIdTypePtr pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); - //MESSAGE("IsMediumNode " << npts << " " << (node->getVtkId() == pts[npts-1])); - return ((npts == 3) && (node->getVtkId() == pts[2])); -@@ -137,7 +151,8 @@ const SMDS_MeshNode* - SMDS_VtkEdge::GetNode(const int ind) const - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( this->myVtkID, npts, pts ); - return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ ind ]); - } -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp -@@ -101,6 +101,19 @@ void SMDS_VtkFace::initQuadPoly(const st - bool SMDS_VtkFace::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes) - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew<vtkIdList> cellPoints; -+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer()); -+ if (nbNodes != cellPoints->GetNumberOfIds()) -+ { -+ MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes); -+ return false; -+ } -+ for (int i = 0; i < nbNodes; i++) -+ { -+ cellPoints->SetId(i, nodes[i]->getVtkId()); -+ } -+#else - vtkIdType npts = 0; - vtkIdType* pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); -@@ -113,6 +126,7 @@ bool SMDS_VtkFace::ChangeNodes(const SMD - { - pts[i] = nodes[i]->getVtkId(); - } -+#endif - SMDS_Mesh::_meshList[myMeshId]->setMyModified(); - return true; - } -@@ -173,7 +187,8 @@ const SMDS_MeshNode* - SMDS_VtkFace::GetNode(const int ind) const - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( this->myVtkID, npts, pts ); - return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ ind ]); - } -@@ -186,7 +201,8 @@ SMDS_VtkFace::GetNode(const int ind) con - int SMDS_VtkFace::GetNodeIndex( const SMDS_MeshNode* node ) const - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( this->myVtkID, npts, pts ); - for ( vtkIdType i = 0; i < npts; ++i ) - if ( pts[i] == node->getVtkId() ) -@@ -251,7 +267,7 @@ bool SMDS_VtkFace::IsMediumNode(const SM - return false; - } - vtkIdType npts = 0; -- vtkIdType* pts = 0; -+ vtkIdTypePtr pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); - vtkIdType nodeId = node->getVtkId(); - for (int rank = 0; rank < npts; rank++) -@@ -356,11 +372,18 @@ SMDS_NodeIteratorPtr SMDS_VtkFace::inter - void SMDS_VtkFace::ChangeApex(SMDS_MeshNode* node) - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew<vtkIdList> cellPoints; -+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer()); -+ grid->RemoveReferenceToCell(cellPoints->GetId(0), myVtkID); -+ cellPoints->SetId(0, node->getVtkId()); -+#else - vtkIdType npts = 0; - vtkIdType* pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); - grid->RemoveReferenceToCell(pts[0], myVtkID); - pts[0] = node->getVtkId(); -+#endif - node->AddInverseElement(this), - SMDS_Mesh::_meshList[myMeshId]->setMyModified(); - } -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp -@@ -133,6 +133,19 @@ void SMDS_VtkVolume::initPoly(const std: - bool SMDS_VtkVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes) - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew<vtkIdList> cellPoints; -+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer()); -+ if (nbNodes != cellPoints->GetNumberOfIds()) -+ { -+ MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes); -+ return false; -+ } -+ for (int i = 0; i < nbNodes; i++) -+ { -+ cellPoints->SetId(i, nodes[i]->getVtkId()); -+ } -+#else - vtkIdType npts = 0; - vtkIdType* pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); -@@ -145,6 +158,7 @@ bool SMDS_VtkVolume::ChangeNodes(const S - { - pts[i] = nodes[i]->getVtkId(); - } -+#endif - SMDS_Mesh::_meshList[myMeshId]->setMyModified(); - return true; - } -@@ -207,7 +221,7 @@ int SMDS_VtkVolume::NbFaces() const - case VTK_POLYHEDRON: - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - nbFaces = nFaces; - break; -@@ -236,7 +250,7 @@ int SMDS_VtkVolume::NbNodes() const - else - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - int id = 0; - for (int i = 0; i < nFaces; i++) -@@ -276,7 +290,7 @@ int SMDS_VtkVolume::NbEdges() const - case VTK_POLYHEDRON: - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - nbEdges = 0; - int id = 0; -@@ -312,7 +326,7 @@ int SMDS_VtkVolume::NbFaceNodes(const in - if (aVtkType == VTK_POLYHEDRON) - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - int id = 0; - for (int i = 0; i < nFaces; i++) -@@ -342,7 +356,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::Get - if (aVtkType == VTK_POLYHEDRON) - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - int id = 0; - for (int i = 0; i < nFaces; i++) -@@ -372,7 +386,7 @@ std::vector<int> SMDS_VtkVolume::GetQuan - if (aVtkType == VTK_POLYHEDRON) - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - int id = 0; - for (int i = 0; i < nFaces; i++) -@@ -430,7 +444,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::Get - if ( aVtkType == VTK_POLYHEDRON) - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - int id = 0, nbPoints = 0; - for (int i = 0; i < nFaces; i++) -@@ -443,7 +457,8 @@ const SMDS_MeshNode* SMDS_VtkVolume::Get - } - return 0; - } -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( this->myVtkID, npts, pts ); - const std::vector<int>& interlace = SMDS_MeshCell::fromVtkOrder( VTKCellType( aVtkType )); - return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ interlace.empty() ? ind : interlace[ind]] ); -@@ -460,7 +475,7 @@ int SMDS_VtkVolume::GetNodeIndex( const - if ( aVtkType == VTK_POLYHEDRON) - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - int id = 0; - for (int iF = 0; iF < nFaces; iF++) -@@ -473,7 +488,8 @@ int SMDS_VtkVolume::GetNodeIndex( const - } - return -1; - } -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( this->myVtkID, npts, pts ); - for ( vtkIdType i = 0; i < npts; ++i ) - if ( pts[i] == node->getVtkId() ) -@@ -534,7 +550,7 @@ bool SMDS_VtkVolume::IsMediumNode(const - return false; - } - vtkIdType npts = 0; -- vtkIdType* pts = 0; -+ vtkIdTypePtr pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); - vtkIdType nodeId = node->getVtkId(); - for (int rank = 0; rank < npts; rank++) -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp -@@ -11348,7 +11348,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGrou - { - int oldId = *itn; - //MESSAGE(" node " << oldId); -- vtkCellLinks::Link l = grid->GetCellLinks()->GetLink(oldId); -+ vtkCellLinks::Link l = static_cast<vtkCellLinks*>(grid->GetCellLinks())->GetLink(oldId); - for (int i=0; i<l.ncells; i++) - { - int vtkId = l.cells[i]; -@@ -11527,7 +11527,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGrou - //MESSAGE(" domain " << idom << " volume " << elem->GetID()); - double values[3]; - vtkIdType npts = 0; -- vtkIdType* pts = 0; -+ vtkIdTypePtr pts = 0; - grid->GetCellPoints(vtkVolIds[ivol], npts, pts); - SMDS_VtkVolume::gravityCenter(grid, pts, npts, values); - if (id ==0) -@@ -11708,7 +11708,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGrou - { - int oldId = itnod->first; - //MESSAGE(" node " << oldId); -- vtkCellLinks::Link l = grid->GetCellLinks()->GetLink(oldId); -+ vtkCellLinks::Link l = static_cast<vtkCellLinks*>(grid->GetCellLinks())->GetLink(oldId); - for (int i = 0; i < l.ncells; i++) - { - int vtkId = l.cells[i]; -@@ -12165,7 +12165,7 @@ void SMESH_MeshEditor::CreateHoleSkin(do - MESSAGE("volume to check, vtkId " << vtkId << " smdsId " << meshDS->fromVtkToSmds(vtkId)); - bool volInside = false; - vtkIdType npts = 0; -- vtkIdType* pts = 0; -+ vtkIdTypePtr pts = 0; - grid->GetCellPoints(vtkId, npts, pts); - for (int i=0; i<npts; i++) - { -Index: FreeCAD-0.19.2/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp -+++ FreeCAD-0.19.2/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp -@@ -20,7 +20,6 @@ - * * - ***************************************************************************/ - -- - #include "PreCompiled.h" - - #ifndef _PreComp_ diff --git a/freecad.spec b/freecad.spec index c26094d..e2c5e1c 100644 --- a/freecad.spec +++ b/freecad.spec @@ -20,8 +20,8 @@
Name: freecad Epoch: 1 -Version: 0.20 -Release: 2%{?dist} +Version: 0.20.1 +Release: 1%{?dist} Summary: A general purpose 3D CAD modeler
License: GPLv2+ @@ -30,16 +30,7 @@ Source0: https://github.com/FreeCAD/FreeCAD/archive/%%7Bversion%7D%%7B?pre:_pre #Source0: https://github.com/FreeCAD/FreeCAD/archive/%%7Bcommit%7D/FreeCAD-%%7Bversion... Source102: freecad.1
-#Patch0: freecad-0.15-zipios.patch -#Patch1: freecad-0.14-Version_h.patch -Patch2: freecad-unbundled-pycxx.patch -#Patch3: freecad-vtk9.patch -#Patch4: freecad-boost.patch -#Patch5: 4916.patch -Patch6: freecad-memory_h.patch -# Python 3.11 compatibility patches -Patch7: https://github.com/FreeCAD/FreeCAD/commit/1ae55905ba.patch -Patch8: https://github.com/FreeCAD/FreeCAD/commit/6820e0a9ec.patch +Patch0: freecad-unbundled-pycxx.patch
# Utilities BuildRequires: cmake gcc-c++ gettext dos2unix @@ -245,6 +236,9 @@ desktop-file-validate \
%changelog +* Tue Aug 09 2022 Richard Shaw hobbes1069@gmail.com - 1:0.20.1-1 +- Update to 0.20.1. + * Thu Jul 21 2022 Fedora Release Engineering releng@fedoraproject.org - 1:0.20-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
diff --git a/sources b/sources index d1359b4..ee8b846 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (FreeCAD-0.20.tar.gz) = b1d91efa873f180bf635f6006d6c4b7a33b64b630955c639fe923bb340ce8104474688e05eea151d1ac1557388947ae81618cfc8a578f14706aa07b5cdc45cda +SHA512 (FreeCAD-0.20.1.tar.gz) = 4e4422cfb4f887f5d501b24b8af8efa1428b91e20ff87257f361e86a7328f3fc53b4a8b00f93b911b73cb2a31d6951e12f53561ef9e83a9b0c5987eb4b0dbb02
commit 6f32db7766a58ca463294209befcaeaed6a79e28 Author: Fedora Release Engineering releng@fedoraproject.org Date: Thu Jul 21 03:33:49 2022 +0000
Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering releng@fedoraproject.org
diff --git a/freecad.spec b/freecad.spec index abdbad6..c26094d 100644 --- a/freecad.spec +++ b/freecad.spec @@ -21,7 +21,7 @@ Name: freecad Epoch: 1 Version: 0.20 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A general purpose 3D CAD modeler
License: GPLv2+ @@ -245,6 +245,9 @@ desktop-file-validate \
%changelog +* Thu Jul 21 2022 Fedora Release Engineering releng@fedoraproject.org - 1:0.20-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Wed Jun 29 2022 Richard Shaw hobbes1069@gmail.com - 1:0.20-1 - Update to 0.20.