freecad: update to 0.19.1
launch offline help is broken, although qhc/qch files are fine.
This commit is contained in:
parent
51c6338043
commit
ae0fc94307
|
@ -1,11 +0,0 @@
|
|||
--- CMakeLists.txt
|
||||
+++ CMakeLists.txt
|
||||
@@ -445,7 +445,7 @@
|
||||
|
||||
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=677598
|
||||
# Acceptable versions of Python
|
||||
-set(Python_ADDITIONAL_VERSIONS "2.7")
|
||||
+set(Python_ADDITIONAL_VERSIONS "2.7 3.6")
|
||||
|
||||
# For building on OS X
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|
@ -1,6 +1,6 @@
|
|||
--- src/App/Application.cpp.orig 2019-03-08 18:56:16.000000000 +0100
|
||||
+++ src/App/Application.cpp 2019-03-13 21:36:38.873587534 +0100
|
||||
@@ -1163,7 +1163,9 @@
|
||||
--- src/App/Application.cpp.ORIG 2020-01-22 23:27:42.709273087 +0100
|
||||
+++ src/App/Application.cpp 2020-01-22 23:50:53.915075955 +0100
|
||||
@@ -1485,7 +1485,9 @@
|
||||
#endif
|
||||
|
||||
#if defined(FC_OS_LINUX)
|
||||
|
@ -10,7 +10,7 @@
|
|||
#include <dlfcn.h>
|
||||
#include <cxxabi.h>
|
||||
|
||||
@@ -1175,6 +1177,7 @@
|
||||
@@ -1497,6 +1499,7 @@
|
||||
// This function produces a stack backtrace with demangled function & method names.
|
||||
void printBacktrace(size_t skip=0)
|
||||
{
|
||||
|
@ -18,7 +18,7 @@
|
|||
void *callstack[128];
|
||||
size_t nMaxFrames = sizeof(callstack) / sizeof(callstack[0]);
|
||||
size_t nFrames = backtrace(callstack, nMaxFrames);
|
||||
@@ -1205,6 +1208,9 @@
|
||||
@@ -1527,6 +1530,9 @@
|
||||
}
|
||||
|
||||
free(symbols);
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
--- src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
|
||||
+++ src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
|
||||
@@ -29,7 +29,9 @@
|
||||
#ifndef WIN32
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
+#ifdef __GLIBC__
|
||||
#include <execinfo.h>
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -109,6 +111,7 @@
|
||||
#ifndef WIN32
|
||||
void print_traceback()
|
||||
{
|
||||
+#ifdef __GLIBC__
|
||||
void *array[50];
|
||||
size_t size;
|
||||
char **strings;
|
||||
@@ -123,6 +126,9 @@
|
||||
}
|
||||
|
||||
free (strings);
|
||||
+#else
|
||||
+ std::cerr << "sorry, no backtrace on musl libc";
|
||||
+#endif
|
||||
}
|
||||
#else
|
||||
#if (_MSC_VER >= 1400) // Visual Studio 2005
|
|
@ -1,127 +0,0 @@
|
|||
# reason: fix build with gcc9
|
||||
# upstream: yes
|
||||
|
||||
diff --git src/3rdParty/salomesmesh/inc/Rn.h src/3rdParty/salomesmesh/inc/Rn.h
|
||||
index 6ec871d93..e92d2275a 100644
|
||||
--- src/3rdParty/salomesmesh/inc/Rn.h
|
||||
+++ src/3rdParty/salomesmesh/inc/Rn.h
|
||||
@@ -180,12 +180,12 @@ class R4: public R3
|
||||
{
|
||||
friend std::ostream& operator <<(std::ostream& f, const R4 & P )
|
||||
{ f << P.x << ' ' << P.y << ' ' << P.z << ' ' << P.omega; return f; }
|
||||
- friend istream& operator >>(istream& f, R4 & P)
|
||||
+ friend std::istream& operator >>(std::istream& f, R4 & P)
|
||||
{ f >> P.x >> P.y >> P.z >> P.omega ; return f; }
|
||||
|
||||
friend std::ostream& operator <<(std::ostream& f, const R4 * P )
|
||||
{ f << P->x << ' ' << P->y << ' ' << P->z << ' ' << P->omega; return f; }
|
||||
- friend istream& operator >>(istream& f, R4 * P)
|
||||
+ friend std::istream& operator >>(std::istream& f, R4 * P)
|
||||
{ f >> P->x >> P->y >> P->z >> P->omega ; return f; }
|
||||
|
||||
public:
|
||||
|
||||
|
||||
diff --git src/Mod/Drawing/App/DrawingExport.cpp src/Mod/Drawing/App/DrawingExport.cpp
|
||||
index 0c3c23231..550b12c25 100644
|
||||
--- src/Mod/Drawing/App/DrawingExport.cpp
|
||||
+++ src/Mod/Drawing/App/DrawingExport.cpp
|
||||
@@ -81,6 +81,7 @@
|
||||
#include <Base/Vector3D.h>
|
||||
|
||||
using namespace Drawing;
|
||||
+using namespace std;
|
||||
|
||||
TopoDS_Edge DrawingOutput::asCircle(const BRepAdaptor_Curve& c) const
|
||||
{
|
||||
diff --git src/Mod/Part/App/Geometry2d.cpp src/Mod/Part/App/Geometry2d.cpp
|
||||
index fb1de909c..979465533 100644
|
||||
--- src/Mod/Part/App/Geometry2d.cpp
|
||||
+++ src/Mod/Part/App/Geometry2d.cpp
|
||||
@@ -83,6 +83,7 @@
|
||||
#include <Mod/Part/App/Geom2d/OffsetCurve2dPy.h>
|
||||
|
||||
using namespace Part;
|
||||
+using namespace std;
|
||||
|
||||
extern const char* gce_ErrorStatusText(gce_ErrorType et);
|
||||
|
||||
diff --git src/Mod/Raytracing/App/AppRaytracingPy.cpp src/Mod/Raytracing/App/AppRaytracingPy.cpp
|
||||
index d48c51c97..1bb2b1b01 100644
|
||||
--- src/Mod/Raytracing/App/AppRaytracingPy.cpp
|
||||
+++ src/Mod/Raytracing/App/AppRaytracingPy.cpp
|
||||
@@ -40,6 +40,8 @@
|
||||
#include <Mod/Part/App/TopoShapePy.h>
|
||||
#include <App/Application.h>
|
||||
|
||||
+using namespace std;
|
||||
+
|
||||
|
||||
namespace Raytracing {
|
||||
class Module : public Py::ExtensionModule<Module>
|
||||
diff --git src/Mod/Raytracing/App/LuxFeature.cpp src/Mod/Raytracing/App/LuxFeature.cpp
|
||||
index 930fe12b7..d1e0a0089 100644
|
||||
--- src/Mod/Raytracing/App/LuxFeature.cpp
|
||||
+++ src/Mod/Raytracing/App/LuxFeature.cpp
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
|
||||
using namespace Raytracing;
|
||||
+using namespace std;
|
||||
|
||||
PROPERTY_SOURCE(Raytracing::LuxFeature, Raytracing::RaySegment)
|
||||
|
||||
diff --git src/Mod/Raytracing/App/RayFeature.cpp src/Mod/Raytracing/App/RayFeature.cpp
|
||||
index cdd2cb6dc..235a98685 100644
|
||||
--- src/Mod/Raytracing/App/RayFeature.cpp
|
||||
+++ src/Mod/Raytracing/App/RayFeature.cpp
|
||||
@@ -36,6 +36,7 @@
|
||||
|
||||
|
||||
using namespace Raytracing;
|
||||
+using namespace std;
|
||||
|
||||
PROPERTY_SOURCE(Raytracing::RayFeature, Raytracing::RaySegment)
|
||||
|
||||
diff --git src/Mod/TechDraw/App/Geometry.cpp src/Mod/TechDraw/App/Geometry.cpp
|
||||
index c10b63177..d34eeb9bb 100644
|
||||
--- src/Mod/TechDraw/App/Geometry.cpp
|
||||
+++ src/Mod/TechDraw/App/Geometry.cpp
|
||||
@@ -80,6 +80,7 @@
|
||||
#include "Geometry.h"
|
||||
|
||||
using namespace TechDraw;
|
||||
+using namespace std;
|
||||
|
||||
// Collection of Geometric Features
|
||||
Wire::Wire()
|
||||
|
||||
|
||||
--- src/Mod/Part/App/PropertyTopoShape.cpp
|
||||
+++ src/Mod/Part/App/PropertyTopoShape.cpp
|
||||
@@ -281,11 +281,11 @@
|
||||
static Standard_Boolean BRepTools_Write(const TopoDS_Shape& Sh,
|
||||
const Standard_CString File)
|
||||
{
|
||||
- ofstream os;
|
||||
+ std::ofstream os;
|
||||
#if OCC_VERSION_HEX >= 0x060800
|
||||
- OSD_OpenStream(os, File, ios::out);
|
||||
+ OSD_OpenStream(os, File, std::ios::out);
|
||||
#else
|
||||
- os.open(File, ios::out);
|
||||
+ os.open(File, std::ios::out);
|
||||
#endif
|
||||
if (!os.rdbuf()->is_open()) return Standard_False;
|
||||
|
||||
|
||||
--- src/Mod/Part/App/Geometry.cpp
|
||||
+++ src/Mod/Part/App/Geometry.cpp
|
||||
@@ -141,6 +141,7 @@
|
||||
#include "Geometry.h"
|
||||
|
||||
using namespace Part;
|
||||
+using namespace std;
|
||||
|
||||
|
||||
const char* gce_ErrorStatusText(gce_ErrorType et)
|
|
@ -1,22 +0,0 @@
|
|||
From 174011749d836f3b6c6ae2630f53b2f4c1f9d3fc Mon Sep 17 00:00:00 2001
|
||||
From: Richard <hobbes1069@gmail.com>
|
||||
Date: Thu, 17 Oct 2019 11:20:10 -0500
|
||||
Subject: [PATCH] Update swigpyrun.in for Python 3.8
|
||||
|
||||
In Python 3.8 some functions related to thread state were intentionally made private.
|
||||
|
||||
This fix (specific to FreeCAD) was suggested here:
|
||||
|
||||
https://bugs.python.org/issue35886
|
||||
|
||||
--- src/Base/swigpyrun.inl
|
||||
+++ src/Base/swigpyrun.inl
|
||||
@@ -72,7 +72,7 @@ void cleanupSWIG_T(const char* TypeName)
|
||||
|
||||
PyObject *module, *dict;
|
||||
PyInterpreterState *interp = PyThreadState_GET()->interp;
|
||||
- PyObject *modules = interp->modules;
|
||||
+ PyObject *modules = PyImport_GetModuleDict();
|
||||
module = PyDict_GetItemString(modules, "__builtin__");
|
||||
if (module != NULL && PyModule_Check(module)) {
|
||||
dict = PyModule_GetDict(module);
|
|
@ -1,174 +0,0 @@
|
|||
Fix for Python 3.9
|
||||
|
||||
https://github.com/FreeCAD/FreeCAD/commit/ae641dc5278efafa22b168fc196875558b92e436
|
||||
|
||||
diff --git src/Base/swigpyrun_1.3.25.h src/Base/swigpyrun_1.3.25.h
|
||||
index 91717210b..9ebadbc83 100644
|
||||
--- src/Base/swigpyrun_1.3.25.h
|
||||
+++ src/Base/swigpyrun_1.3.25.h
|
||||
@@ -699,7 +699,11 @@ PySwigObject_type(void) {
|
||||
0, /*tp_itemsize*/
|
||||
/* methods */
|
||||
(destructor)PySwigObject_dealloc, /*tp_dealloc*/
|
||||
+#if PY_VERSION_HEX < 0x03080000
|
||||
(printfunc)PySwigObject_print, /*tp_print*/
|
||||
+#else
|
||||
+ 0, /*tp_vectorcall_offset*/
|
||||
+#endif
|
||||
(getattrfunc)0, /*tp_getattr*/
|
||||
(setattrfunc)0, /*tp_setattr*/
|
||||
(cmpfunc)PySwigObject_compare, /*tp_compare*/
|
||||
@@ -859,7 +863,11 @@ PySwigPacked_type(void) {
|
||||
0, /*tp_itemsize*/
|
||||
/* methods */
|
||||
(destructor)PySwigPacked_dealloc, /*tp_dealloc*/
|
||||
+#if PY_VERSION_HEX < 0x03080000
|
||||
(printfunc)PySwigPacked_print, /*tp_print*/
|
||||
+#else
|
||||
+ 0, /*tp_vectorcall_offset*/
|
||||
+#endif
|
||||
(getattrfunc)0, /*tp_getattr*/
|
||||
(setattrfunc)0, /*tp_setattr*/
|
||||
(cmpfunc)PySwigPacked_compare, /*tp_compare*/
|
||||
diff --git src/Base/swigpyrun_1.3.33.h src/Base/swigpyrun_1.3.33.h
|
||||
index f83ac1e89..afd5a8c50 100644
|
||||
--- src/Base/swigpyrun_1.3.33.h
|
||||
+++ src/Base/swigpyrun_1.3.33.h
|
||||
@@ -1620,7 +1620,11 @@ _PySwigObject_type(void) {
|
||||
sizeof(PySwigObject), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)PySwigObject_dealloc, /* tp_dealloc */
|
||||
+#if PY_VERSION_HEX < 0x03080000
|
||||
(printfunc)PySwigObject_print, /* tp_print */
|
||||
+#else
|
||||
+ 0, /*tp_vectorcall_offset*/
|
||||
+#endif
|
||||
#if PY_VERSION_HEX < 0x02020000
|
||||
(getattrfunc)PySwigObject_getattr, /* tp_getattr */
|
||||
#else
|
||||
@@ -1790,7 +1794,11 @@ _PySwigPacked_type(void) {
|
||||
sizeof(PySwigPacked), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)PySwigPacked_dealloc, /* tp_dealloc */
|
||||
+#if PY_VERSION_HEX < 0x03080000
|
||||
(printfunc)PySwigPacked_print, /* tp_print */
|
||||
+#else
|
||||
+ 0, /*tp_vectorcall_offset*/
|
||||
+#endif
|
||||
(getattrfunc)0, /* tp_getattr */
|
||||
(setattrfunc)0, /* tp_setattr */
|
||||
(cmpfunc)PySwigPacked_compare, /* tp_compare */
|
||||
diff --git src/Base/swigpyrun_1.3.36.h src/Base/swigpyrun_1.3.36.h
|
||||
index 02c58ad8a..12ad41e12 100644
|
||||
--- src/Base/swigpyrun_1.3.36.h
|
||||
+++ src/Base/swigpyrun_1.3.36.h
|
||||
@@ -1628,7 +1628,12 @@ _PySwigObject_type(void) {
|
||||
sizeof(PySwigObject), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)PySwigObject_dealloc, /* tp_dealloc */
|
||||
+#if PY_VERSION_HEX < 0x03080000
|
||||
(printfunc)PySwigObject_print, /* tp_print */
|
||||
+#else
|
||||
+ 0, /*tp_vectorcall_offset*/
|
||||
+#endif
|
||||
+
|
||||
#if PY_VERSION_HEX < 0x02020000
|
||||
(getattrfunc)PySwigObject_getattr, /* tp_getattr */
|
||||
#else
|
||||
@@ -1798,7 +1803,11 @@ _PySwigPacked_type(void) {
|
||||
sizeof(PySwigPacked), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)PySwigPacked_dealloc, /* tp_dealloc */
|
||||
+#if PY_VERSION_HEX < 0x03080000
|
||||
(printfunc)PySwigPacked_print, /* tp_print */
|
||||
+#else
|
||||
+ 0, /*tp_vectorcall_offset*/
|
||||
+#endif
|
||||
(getattrfunc)0, /* tp_getattr */
|
||||
(setattrfunc)0, /* tp_setattr */
|
||||
(cmpfunc)PySwigPacked_compare, /* tp_compare */
|
||||
diff --git src/Base/swigpyrun_1.3.38.h src/Base/swigpyrun_1.3.38.h
|
||||
index dae058c20..7cacc1579 100644
|
||||
--- src/Base/swigpyrun_1.3.38.h
|
||||
+++ src/Base/swigpyrun_1.3.38.h
|
||||
@@ -1741,7 +1741,11 @@ _PySwigObject_type(void) {
|
||||
sizeof(SwigPyObject), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)SwigPyObject_dealloc, /* tp_dealloc */
|
||||
+#if PY_VERSION_HEX < 0x03080000
|
||||
(printfunc)SwigPyObject_print, /* tp_print */
|
||||
+#else
|
||||
+ 0, /*tp_vectorcall_offset*/
|
||||
+#endif
|
||||
#if PY_VERSION_HEX < 0x02020000
|
||||
(getattrfunc)SwigPyObject_getattr, /* tp_getattr */
|
||||
#else
|
||||
@@ -1919,7 +1923,11 @@ _PySwigPacked_type(void) {
|
||||
sizeof(SwigPyPacked), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)SwigPyPacked_dealloc, /* tp_dealloc */
|
||||
+#if PY_VERSION_HEX < 0x03080000
|
||||
(printfunc)SwigPyPacked_print, /* tp_print */
|
||||
+#else
|
||||
+ 0, /*tp_vectorcall_offset*/
|
||||
+#endif
|
||||
(getattrfunc)0, /* tp_getattr */
|
||||
(setattrfunc)0, /* tp_setattr */
|
||||
(cmpfunc)SwigPyPacked_compare, /* tp_compare */
|
||||
diff --git src/Base/swigpyrun_1.3.40.h src/Base/swigpyrun_1.3.40.h
|
||||
index 136ba809f..400db8b47 100644
|
||||
--- src/Base/swigpyrun_1.3.40.h
|
||||
+++ src/Base/swigpyrun_1.3.40.h
|
||||
@@ -1766,7 +1766,11 @@ _PySwigObject_type(void) {
|
||||
sizeof(SwigPyObject), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)SwigPyObject_dealloc, /* tp_dealloc */
|
||||
+#if PY_VERSION_HEX < 0x03080000
|
||||
(printfunc)SwigPyObject_print, /* tp_print */
|
||||
+#else
|
||||
+ 0, /*tp_vectorcall_offset*/
|
||||
+#endif
|
||||
#if PY_VERSION_HEX < 0x02020000
|
||||
(getattrfunc)SwigPyObject_getattr, /* tp_getattr */
|
||||
#else
|
||||
@@ -1947,8 +1951,12 @@ _PySwigPacked_type(void) {
|
||||
(char *)"SwigPyPacked", /* tp_name */
|
||||
sizeof(SwigPyPacked), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
- (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
|
||||
- (printfunc)SwigPyPacked_print, /* tp_print */
|
||||
+ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
|
||||
+#if PY_VERSION_HEX < 0x03080000
|
||||
+ (printfunc)SwigPyPacked_print, /* tp_print */
|
||||
+#else
|
||||
+ 0, /*tp_vectorcall_offset*/
|
||||
+#endif
|
||||
(getattrfunc)0, /* tp_getattr */
|
||||
(setattrfunc)0, /* tp_setattr */
|
||||
#if PY_VERSION_HEX>=0x03000000
|
||||
diff --git src/CXX/Python3/cxx_extensions.cxx src/CXX/Python3/cxx_extensions.cxx
|
||||
index fb3da455f..9ff94612f 100644
|
||||
--- src/CXX/Python3/cxx_extensions.cxx
|
||||
+++ src/CXX/Python3/cxx_extensions.cxx
|
||||
@@ -381,7 +381,11 @@ PythonType::PythonType( size_t basic_size, int itemsize, const char *default_nam
|
||||
|
||||
// Methods to implement standard operations
|
||||
table->tp_dealloc = (destructor)standard_dealloc;
|
||||
+#if PY_VERSION_HEX < 0x03080000
|
||||
table->tp_print = 0;
|
||||
+#else
|
||||
+ table->tp_vectorcall_offset = 0;
|
||||
+#endif
|
||||
table->tp_getattr = 0;
|
||||
table->tp_setattr = 0;
|
||||
table->tp_repr = 0;
|
||||
@@ -524,7 +528,9 @@ PythonType &PythonType::supportClass()
|
||||
#ifdef PYCXX_PYTHON_2TO3
|
||||
PythonType &PythonType::supportPrint()
|
||||
{
|
||||
+#if PY_VERSION_HEX < 0x03080000
|
||||
table->tp_print = print_handler;
|
||||
+#endif
|
||||
return *this;
|
||||
}
|
||||
#endif
|
|
@ -1,33 +0,0 @@
|
|||
source: https://svnweb.freebsd.org/ports/head/cad/freecad/files/patch-CMakeLists.txt?revision=504361&view=co
|
||||
|
||||
--- CMakeLists.txt.orig
|
||||
+++ CMakeLists.txt
|
||||
@@ -989,6 +989,13 @@ endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
+ # pyside2 changed it's cmake files, this is the dance we have
|
||||
+ # to dance to be compatible with the old and the new versions
|
||||
+ if(SHIBOKEN_PYTHON_INCLUDE_DIRS AND NOT SHIBOKEN_INCLUDE_DIR)
|
||||
+ get_property(SHIBOKEN_INCLUDE_DIR TARGET Shiboken2::libshiboken PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
+ get_property(SHIBOKEN_LIBRARY TARGET Shiboken2::libshiboken PROPERTY IMPORTED_LOCATION_RELEASE)
|
||||
+ endif(SHIBOKEN_PYTHON_INCLUDE_DIRS AND NOT SHIBOKEN_INCLUDE_DIR)
|
||||
+
|
||||
if(NOT SHIBOKEN_INCLUDE_DIR)
|
||||
MESSAGE("====================\n"
|
||||
"shiboken2 not found.\n"
|
||||
@@ -996,6 +1003,14 @@ endif()
|
||||
endif(NOT SHIBOKEN_INCLUDE_DIR)
|
||||
|
||||
find_package(PySide2 QUIET)# REQUIRED
|
||||
+
|
||||
+ # pyside2 changed it's cmake files, this is the dance we have
|
||||
+ # to dance to be compatible with the old and the new versions
|
||||
+ if(NOT PYSIDE_INCLUDE_DIR)
|
||||
+ get_property(PYSIDE_INCLUDE_DIR TARGET PySide2::pyside2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
+ get_property(PYSIDE_LIBRARY TARGET PySide2::pyside2 PROPERTY IMPORTED_LOCATION_RELEASE)
|
||||
+ endif(NOT PYSIDE_INCLUDE_DIR)
|
||||
+
|
||||
if(NOT PYSIDE_INCLUDE_DIR)
|
||||
MESSAGE("==================\n"
|
||||
"PySide2 not found.\n"
|
|
@ -1,67 +0,0 @@
|
|||
backport from FreeCAD git master (rev @1bca539)
|
||||
|
||||
--- cMake/FindPySide2Tools.cmake.ORIG
|
||||
+++ cMake/FindPySide2Tools.cmake
|
||||
@@ -20,8 +20,24 @@
|
||||
set(PYSIDE_BIN_DIR ${PYTHON_BIN_DIR})
|
||||
endif(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
|
||||
-FIND_PROGRAM(PYSIDE2UICBINARY NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
|
||||
-FIND_PROGRAM(PYSIDE2RCCBINARY NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
|
||||
+# Since Qt v5.14, pyside2-uic and pyside2-rcc are directly provided by Qt5Core uic and rcc, with '-g python' option
|
||||
+# We test Qt5Core version to act accordingly
|
||||
+
|
||||
+FIND_PACKAGE(Qt5Core)
|
||||
+
|
||||
+IF(Qt5Core_VERSION VERSION_LESS 5.14)
|
||||
+ # Legacy (< 5.14)
|
||||
+ FIND_PROGRAM(PYSIDE2UICBINARY NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
|
||||
+ FIND_PROGRAM(PYSIDE2RCCBINARY NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
|
||||
+ set(UICOPTIONS "")
|
||||
+ set(RCCOPTIONS "")
|
||||
+ELSE(Qt5Core_VERSION VERSION_LESS 5.14)
|
||||
+ # New (>= 5.14)
|
||||
+ FIND_PROGRAM(PYSIDE2UICBINARY NAMES uic-qt5 uic)
|
||||
+ set(UICOPTIONS "--generator=python")
|
||||
+ FIND_PROGRAM(PYSIDE2RCCBINARY NAMES rcc-qt5 rcc)
|
||||
+ set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1")
|
||||
+ENDIF(Qt5Core_VERSION VERSION_LESS 5.14)
|
||||
|
||||
MACRO(PYSIDE_WRAP_UI outfiles)
|
||||
FOREACH(it ${ARGN})
|
||||
@@ -33,7 +49,7 @@
|
||||
#)
|
||||
if(WIN32 OR APPLE)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
- COMMAND ${PYSIDE2UICBINARY} ${infile} -o ${outfile}
|
||||
+ COMMAND ${PYSIDE2UICBINARY} ${UICOPTIONS} ${infile} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${infile}
|
||||
)
|
||||
else()
|
||||
@@ -41,7 +57,7 @@
|
||||
# pyside2-uic generates in comments at beginning., which is why
|
||||
# we follow the tool command with in-place sed.
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
- COMMAND "${PYSIDE2UICBINARY}" "${infile}" -o "${outfile}"
|
||||
+ COMMAND "${PYSIDE2UICBINARY}" ${UICOPTIONS} "${infile}" -o "${outfile}"
|
||||
COMMAND sed -i "/^# /d" "${outfile}"
|
||||
MAIN_DEPENDENCY "${infile}"
|
||||
)
|
||||
@@ -60,7 +76,7 @@
|
||||
#)
|
||||
if(WIN32 OR APPLE)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
- COMMAND ${PYSIDE2RCCBINARY} ${infile} -o ${outfile}
|
||||
+ COMMAND ${PYSIDE2RCCBINARY} ${RCCOPTIONS} ${infile} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${infile}
|
||||
)
|
||||
else()
|
||||
@@ -68,7 +84,7 @@
|
||||
# pyside-rcc generates in comments at beginning, which is why
|
||||
# we follow the tool command with in-place sed.
|
||||
ADD_CUSTOM_COMMAND(OUTPUT "${outfile}"
|
||||
- COMMAND "${PYSIDE2RCCBINARY}" "${infile}" ${PY_ATTRIBUTE} -o "${outfile}"
|
||||
+ COMMAND "${PYSIDE2RCCBINARY}" ${RCCOPTIONS} "${infile}" ${PY_ATTRIBUTE} -o "${outfile}"
|
||||
COMMAND sed -i "/^# /d" "${outfile}"
|
||||
MAIN_DEPENDENCY "${infile}"
|
||||
)
|
|
@ -1,14 +0,0 @@
|
|||
Source: @pullmoll
|
||||
Upstream: no
|
||||
Reason: qt5-5.15.0 requires explicit include for QPainterPath
|
||||
|
||||
--- src/Mod/Image/Gui/OpenGLImageBox.cpp
|
||||
+++ src/Mod/Image/Gui/OpenGLImageBox.cpp 2020-07-14 12:25:42.607075856 +0200
|
||||
@@ -26,6 +26,7 @@
|
||||
# include <QSurfaceFormat>
|
||||
# include <QMessageBox>
|
||||
# include <QPainter>
|
||||
+# include <QPainterPath>
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__)
|
|
@ -1,50 +0,0 @@
|
|||
From 04833a5f1cbc07f8f6ae94453c4535e13789aa05 Mon Sep 17 00:00:00 2001
|
||||
From: yopito <pierre.bourgin@free.fr>
|
||||
Date: Mon, 6 Jul 2020 06:54:07 +0200
|
||||
Subject: [PATCH] build: fix Coin 3d documentation discovering
|
||||
|
||||
* coin3d 4.0.0 default location is /usr/share/doc/Coin/html/
|
||||
* misuses of find_files() if several candidates for filename
|
||||
* export variable COIN3D_DOC_FOUND that is used by cMake/FreeCAD_Helpers/PrintFinalReport.cmake
|
||||
---
|
||||
cMake/FindCoin3DDoc.cmake | 12 +++++++-----
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git cMake/FindCoin3DDoc.cmake cMake/FindCoin3DDoc.cmake
|
||||
index 883368445..c6c92f260 100644
|
||||
--- cMake/FindCoin3DDoc.cmake
|
||||
+++ cMake/FindCoin3DDoc.cmake
|
||||
@@ -23,18 +23,19 @@ IF (COIN3D_FOUND)
|
||||
find_path(COIN3D_DOC_PATH index.html
|
||||
/usr/share/doc/libcoin80-doc/html
|
||||
/usr/share/doc/coin/html
|
||||
+ /usr/share/doc/Coin/html
|
||||
)
|
||||
IF( EXISTS ${COIN3D_DOC_PATH})
|
||||
message(STATUS "Coin3D doc is installed")
|
||||
- find_file(COIN3D_DOC_TAGFILE coin.tag Coin.tag
|
||||
- ${COIN3D_DOC_PATH}
|
||||
+ find_file(COIN3D_DOC_TAGFILE NAMES coin.tag Coin.tag
|
||||
+ PATHS ${COIN3D_DOC_PATH}
|
||||
)
|
||||
IF( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
SET( COIN3D_DOC_FOUND "YES"
|
||||
)
|
||||
ELSE( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
- find_file(COIN3D_DOC_TAGFILE_GZ coin.tag.gz Coin.tag.gz
|
||||
- ${COIN3D_DOC_PATH}
|
||||
+ find_file(COIN3D_DOC_TAGFILE_GZ NAMES coin.tag.gz Coin.tag.gz
|
||||
+ PATHS ${COIN3D_DOC_PATH}
|
||||
)
|
||||
IF( EXISTS ${COIN3D_DOC_TAGFILE_GZ})
|
||||
message(STATUS " Found ${COIN3D_DOC_TAGFILE_GZ}")
|
||||
@@ -85,4 +86,5 @@ if(COIN3D_DOC_FOUND)
|
||||
message(STATUS " Location: ${COIN3D_DOC_PATH}")
|
||||
endif(COIN3D_DOC_FOUND)
|
||||
|
||||
-
|
||||
+# export for others
|
||||
+SET( COIN3D_DOC_FOUND "${COIN3D_DOC_FOUND}" CACHE BOOL "Coin3d documentation available")
|
||||
--
|
||||
2.27.0
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
Taken from https://github.com/wwmayer/FreeCAD/commit/52599f771fa934ceeb11a970c3639bfa8f90411e
|
||||
Taken from https://github.com/wwmayer/FreeCAD/commit/bb9bcbd51df7c3cb76c5823038e4ea0f7e25a9ff
|
||||
but removed patch on file src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp : already applied (2021-01-20)
|
||||
|
||||
diff --git src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx b/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
|
||||
index 14a6d9a76..7b9d88db1 100644
|
||||
index 14a6d9a763f..0e9b9e6c905 100644
|
||||
--- src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
|
||||
+++ src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
|
||||
@@ -40,10 +40,16 @@
|
||||
@@ -40,11 +40,16 @@
|
||||
|
||||
#include <vtkType.h>
|
||||
#include <vtkCellType.h>
|
||||
|
@ -13,15 +14,16 @@ index 14a6d9a76..7b9d88db1 100644
|
|||
//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;
|
||||
@@ -192,7 +198,7 @@ protected:
|
||||
class SMDS_MeshFace;
|
||||
@@ -192,7 +197,7 @@ protected:
|
||||
//! Element index in vector SMDS_Mesh::myNodes or SMDS_Mesh::myCells
|
||||
int myID;
|
||||
//! index in vtkUnstructuredGrid
|
||||
|
@ -31,7 +33,7 @@ index 14a6d9a76..7b9d88db1 100644
|
|||
ShortType myMeshId;
|
||||
//! SubShape and SubMesh identification in SMESHDS
|
||||
diff --git src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx b/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
|
||||
index 9e4a23edd..774658145 100644
|
||||
index 9e4a23eddfb..77465814541 100644
|
||||
--- src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
|
||||
+++ src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
|
||||
@@ -95,7 +95,11 @@ public:
|
||||
|
@ -47,25 +49,27 @@ index 9e4a23edd..774658145 100644
|
|||
SMDS_Downward* getDownArray(unsigned char vtkType)
|
||||
{
|
||||
diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
|
||||
index 299093c94..990e2b641 100644
|
||||
index 299093c94f6..2680c217305 100644
|
||||
--- src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
|
||||
+++ src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
|
||||
@@ -68,9 +68,13 @@ bool SMDS_BallElement::ChangeNode (const SMDS_MeshNode * node)
|
||||
@@ -67,10 +67,16 @@ void SMDS_BallElement::SetDiameter(double diameter)
|
||||
bool SMDS_BallElement::ChangeNode (const SMDS_MeshNode * node)
|
||||
{
|
||||
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
|
||||
vtkIdType npts = 0;
|
||||
- vtkIdType* pts = 0;
|
||||
+ vtkIdTypePtr pts = 0;
|
||||
grid->GetCellPoints(myVtkID, npts, pts);
|
||||
+#ifdef VTK_CELL_ARRAY_V2
|
||||
+//FIXME: vtk9
|
||||
+ 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 +87,8 @@ void SMDS_BallElement::Print (std::ostream & OS) const
|
||||
@@ -83,7 +89,8 @@ void SMDS_BallElement::Print (std::ostream & OS) const
|
||||
const SMDS_MeshNode* SMDS_BallElement::GetNode (const int ind) const
|
||||
{
|
||||
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
|
||||
|
@ -76,7 +80,7 @@ index 299093c94..990e2b641 100644
|
|||
return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ 0 ]);
|
||||
}
|
||||
diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
|
||||
index d6049c0bd..77555d5bc 100644
|
||||
index d6049c0bd19..a41f5c18e78 100644
|
||||
--- src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
|
||||
+++ src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
|
||||
@@ -303,7 +303,7 @@ int SMDS_Down1D::getNodeSet(int cellId, int* nodeSet)
|
||||
|
@ -88,6 +92,15 @@ index d6049c0bd..77555d5bc 100644
|
|||
_grid->GetCellPoints(vtkId, npts, pts);
|
||||
// MESSAGE(vtkId << " " << npts << " " << _nbDownCells);
|
||||
//ASSERT(npts == _nbDownCells);
|
||||
@@ -357,7 +357,7 @@ int SMDS_Down1D::computeVtkCells(int *pts, std::vector<int>& vtkIds)
|
||||
{
|
||||
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 cellId, int* ids)
|
||||
// --- find point id's of the face
|
||||
|
||||
|
@ -97,6 +110,15 @@ index d6049c0bd..77555d5bc 100644
|
|||
_grid->GetCellPoints(cellId, npts, pts);
|
||||
vector<int> nodes;
|
||||
for (int i = 0; i < npts; i++)
|
||||
@@ -577,7 +577,7 @@ int SMDS_Down2D::computeVolumeIdsFromNodesFace(int* pts, int npts, int* ids)
|
||||
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::computeVolumeIdsFromNodesFace(int* pts, int npts, int* ids)
|
||||
void SMDS_Down2D::setTempNodes(int cellId, int vtkId)
|
||||
{
|
||||
|
@ -260,10 +282,10 @@ index d6049c0bd..77555d5bc 100644
|
|||
|
||||
// --- create all the ordered list of node id's for each face
|
||||
diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
|
||||
index 4ac6fd768..51b281699 100644
|
||||
index 61c8e751d94..1eac2907d3d 100644
|
||||
--- src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
|
||||
+++ src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
|
||||
@@ -4763,7 +4763,11 @@ void SMDS_Mesh::dumpGrid(string ficdump)
|
||||
@@ -4768,7 +4768,11 @@ void SMDS_Mesh::dumpGrid(string ficdump)
|
||||
ficcon << endl;
|
||||
}
|
||||
ficcon << "-------------------------------- connectivity " << nbPoints << endl;
|
||||
|
@ -277,35 +299,40 @@ index 4ac6fd768..51b281699 100644
|
|||
{
|
||||
int ncells = links->GetNcells(i);
|
||||
diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
|
||||
index 95438eab0..a7f8059e0 100644
|
||||
index 95438eab064..0df32e3b97c 100644
|
||||
--- src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
|
||||
+++ src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
|
||||
@@ -147,7 +147,7 @@ bool SMDS_Mesh0DElement::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbN
|
||||
@@ -146,6 +146,17 @@ bool SMDS_Mesh0DElement::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbN
|
||||
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;
|
||||
+ vtkIdTypePtr pts = 0;
|
||||
vtkIdType* pts = 0;
|
||||
grid->GetCellPoints(myVtkID, npts, pts);
|
||||
if (nbNodes != npts)
|
||||
{
|
||||
@@ -155,7 +155,11 @@ bool SMDS_Mesh0DElement::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbN
|
||||
return false;
|
||||
@@ -156,6 +167,7 @@ bool SMDS_Mesh0DElement::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbN
|
||||
}
|
||||
myNode = nodes[0];
|
||||
+#ifdef VTK_CELL_ARRAY_V2
|
||||
+//FIXME: vtk9
|
||||
+#else
|
||||
pts[0] = myNode->getVtkId();
|
||||
+#endif
|
||||
|
||||
SMDS_Mesh::_meshList[myMeshId]->setMyModified();
|
||||
return true;
|
||||
diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
|
||||
index f647a5f1b..5b903c8fb 100644
|
||||
index f647a5f1b8f..5b903c8fb55 100644
|
||||
--- src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
|
||||
+++ src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
|
||||
@@ -191,7 +191,7 @@ public:
|
||||
@@ -191,7 +191,7 @@ class SMDS_MeshNode_MyInvIterator: public SMDS_ElemIterator
|
||||
SMDS_ElemIteratorPtr SMDS_MeshNode::
|
||||
GetInverseElementIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
|
@ -351,7 +378,7 @@ index f647a5f1b..5b903c8fb 100644
|
|||
if ( type == SMDSAbs_All )
|
||||
return l.ncells;
|
||||
diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
|
||||
index fbd903b1e..19ccebcab 100644
|
||||
index fbd903b1e74..ff2b81e9694 100644
|
||||
--- src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
|
||||
+++ src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
|
||||
@@ -139,8 +139,8 @@ int SMDS_UnstructuredGrid::InsertNextLinkedCell(int type, int npts, vtkIdType *p
|
||||
|
@ -370,7 +397,7 @@ index fbd903b1e..19ccebcab 100644
|
|||
newTypes->SetValue(alreadyCopied, this->Types->GetValue(j));
|
||||
idCellsOldToNew[j] = alreadyCopied; // old vtkId --> new vtkId
|
||||
+#ifdef VTK_CELL_ARRAY_V2
|
||||
+ vtkIdType oldLoc; //FIXME: vtk9
|
||||
+ vtkIdType oldLoc = this->GetCellLocationsArray()->GetValue(j);
|
||||
+#else
|
||||
vtkIdType oldLoc = this->Locations->GetValue(j);
|
||||
+#endif
|
||||
|
@ -380,37 +407,47 @@ index fbd903b1e..19ccebcab 100644
|
|||
this->Connectivity->GetCell(oldLoc, nbpts, oldPtsCell);
|
||||
assert(nbpts < NBMAXNODESINCELL);
|
||||
//MESSAGE(j << " " << alreadyCopied << " " << (int)this->Types->GetValue(j) << " " << oldLoc << " " << nbpts );
|
||||
@@ -953,14 +957,18 @@ void SMDS_UnstructuredGrid::GetNodeIds(std::set<int>& nodeSet, int downId, unsig
|
||||
@@ -952,6 +956,21 @@ void SMDS_UnstructuredGrid::GetNodeIds(std::set<int>& nodeSet, int downId, unsig
|
||||
*/
|
||||
void SMDS_UnstructuredGrid::ModifyCellNodes(int vtkVolId, std::map<int, int> localClonedNodeIds)
|
||||
{
|
||||
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
|
||||
this->GetCellPoints(vtkVolId, npts, pts);
|
||||
for (int i = 0; i < npts; i++)
|
||||
{
|
||||
if (localClonedNodeIds.count(pts[i]))
|
||||
{
|
||||
vtkIdType oldpt = pts[i];
|
||||
+#ifdef VTK_CELL_ARRAY_V2
|
||||
+//FIXME: vtk9
|
||||
+ 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
|
||||
pts[i] = localClonedNodeIds[oldpt];
|
||||
+#endif
|
||||
//MESSAGE(oldpt << " --> " << pts[i]);
|
||||
//this->RemoveReferenceToCell(oldpt, vtkVolId);
|
||||
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::ModifyCellNodes(int vtkVolId, std::map<int, int> loc
|
||||
//this->AddReferenceToCell(pts[i], vtkVolId);
|
||||
@@ -995,11 +1003,20 @@ void SMDS_UnstructuredGrid::BuildLinks()
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*! reorder the nodes of a face
|
||||
@@ -995,11 +1015,20 @@ void SMDS_UnstructuredGrid::BuildLinks()
|
||||
this->Links->UnRegister(this);
|
||||
}
|
||||
|
||||
+#ifdef VTK_CELL_ARRAY_V2
|
||||
+//FIXME: vtk9
|
||||
+ this->Links = SMDS_CellLinks::New();
|
||||
+ //this->Links->Allocate(this->GetNumberOfPoints());
|
||||
+ this->Links->Register(this);
|
||||
+ //this->Links->BuildLinks(this, this->Connectivity);
|
||||
+ this->Links->Delete();
|
||||
+ 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());
|
||||
|
@ -422,7 +459,7 @@ index fbd903b1e..19ccebcab 100644
|
|||
|
||||
/*! Create a volume (prism or hexahedron) by duplication of a face.
|
||||
diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
|
||||
index deb05985f..63b6eabb7 100644
|
||||
index deb05985f00..63b6eabb704 100644
|
||||
--- src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
|
||||
+++ src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
|
||||
@@ -33,7 +33,8 @@ SMDS_VtkCellIterator::SMDS_VtkCellIterator(SMDS_Mesh* mesh, int vtkCellId, SMDSA
|
||||
|
@ -454,31 +491,38 @@ index deb05985f..63b6eabb7 100644
|
|||
int id = 0;
|
||||
_nbNodesInFaces = 0;
|
||||
diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
|
||||
index 9786abf9a..58d2df3cf 100644
|
||||
index 9786abf9aae..6d772a3cd4a 100644
|
||||
--- src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
|
||||
+++ src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
|
||||
@@ -68,7 +68,7 @@ bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
|
||||
@@ -67,6 +67,19 @@ bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode * node1, const SMDS_MeshNode
|
||||
bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
|
||||
{
|
||||
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
|
||||
vtkIdType npts = 0;
|
||||
- vtkIdType* pts = 0;
|
||||
+ vtkIdTypePtr pts = 0;
|
||||
grid->GetCellPoints(myVtkID, npts, pts);
|
||||
if (nbNodes != npts)
|
||||
{
|
||||
@@ -77,7 +77,11 @@ bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
|
||||
}
|
||||
for (int i = 0; i < nbNodes; i++)
|
||||
{
|
||||
+#ifdef VTK_CELL_ARRAY_V2
|
||||
+//FIXME: vtk9
|
||||
+ 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 SMDS_MeshNode* nodes[], const int nbNodes)
|
||||
{
|
||||
pts[i] = nodes[i]->getVtkId();
|
||||
+#endif
|
||||
}
|
||||
+#endif
|
||||
SMDS_Mesh::_meshList[myMeshId]->setMyModified();
|
||||
return true;
|
||||
@@ -87,7 +91,7 @@ bool SMDS_VtkEdge::IsMediumNode(const SMDS_MeshNode* node) const
|
||||
}
|
||||
@@ -87,7 +101,7 @@ bool SMDS_VtkEdge::IsMediumNode(const SMDS_MeshNode* node) const
|
||||
{
|
||||
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
|
||||
vtkIdType npts = 0;
|
||||
|
@ -487,7 +531,7 @@ index 9786abf9a..58d2df3cf 100644
|
|||
grid->GetCellPoints(myVtkID, npts, pts);
|
||||
//MESSAGE("IsMediumNode " << npts << " " << (node->getVtkId() == pts[npts-1]));
|
||||
return ((npts == 3) && (node->getVtkId() == pts[2]));
|
||||
@@ -137,7 +141,8 @@ const SMDS_MeshNode*
|
||||
@@ -137,7 +151,8 @@ const SMDS_MeshNode*
|
||||
SMDS_VtkEdge::GetNode(const int ind) const
|
||||
{
|
||||
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
|
||||
|
@ -498,31 +542,38 @@ index 9786abf9a..58d2df3cf 100644
|
|||
return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ ind ]);
|
||||
}
|
||||
diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
|
||||
index 1389e0d35..a92601f1e 100644
|
||||
index 1389e0d3585..cb981bfb18e 100644
|
||||
--- src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
|
||||
+++ src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
|
||||
@@ -102,7 +102,7 @@ bool SMDS_VtkFace::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
|
||||
@@ -101,6 +101,19 @@ void SMDS_VtkFace::initQuadPoly(const std::vector<vtkIdType>& nodeIds, SMDS_Mesh
|
||||
bool SMDS_VtkFace::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
|
||||
{
|
||||
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
|
||||
vtkIdType npts = 0;
|
||||
- vtkIdType* pts = 0;
|
||||
+ vtkIdTypePtr pts = 0;
|
||||
grid->GetCellPoints(myVtkID, npts, pts);
|
||||
if (nbNodes != npts)
|
||||
{
|
||||
@@ -111,7 +111,11 @@ bool SMDS_VtkFace::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
|
||||
}
|
||||
for (int i = 0; i < nbNodes; i++)
|
||||
{
|
||||
+#ifdef VTK_CELL_ARRAY_V2
|
||||
+//FIXME: vtk9
|
||||
+ 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 SMDS_MeshNode* nodes[], const int nbNodes)
|
||||
{
|
||||
pts[i] = nodes[i]->getVtkId();
|
||||
+#endif
|
||||
}
|
||||
+#endif
|
||||
SMDS_Mesh::_meshList[myMeshId]->setMyModified();
|
||||
return true;
|
||||
@@ -173,7 +177,8 @@ const SMDS_MeshNode*
|
||||
}
|
||||
@@ -173,7 +187,8 @@ const SMDS_MeshNode*
|
||||
SMDS_VtkFace::GetNode(const int ind) const
|
||||
{
|
||||
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
|
||||
|
@ -532,7 +583,7 @@ index 1389e0d35..a92601f1e 100644
|
|||
grid->GetCellPoints( this->myVtkID, npts, pts );
|
||||
return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ ind ]);
|
||||
}
|
||||
@@ -186,7 +191,8 @@ SMDS_VtkFace::GetNode(const int ind) const
|
||||
@@ -186,7 +201,8 @@ SMDS_VtkFace::GetNode(const int ind) const
|
||||
int SMDS_VtkFace::GetNodeIndex( const SMDS_MeshNode* node ) const
|
||||
{
|
||||
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
|
||||
|
@ -542,7 +593,7 @@ index 1389e0d35..a92601f1e 100644
|
|||
grid->GetCellPoints( this->myVtkID, npts, pts );
|
||||
for ( vtkIdType i = 0; i < npts; ++i )
|
||||
if ( pts[i] == node->getVtkId() )
|
||||
@@ -251,7 +257,7 @@ bool SMDS_VtkFace::IsMediumNode(const SMDS_MeshNode* node) const
|
||||
@@ -251,7 +267,7 @@ bool SMDS_VtkFace::IsMediumNode(const SMDS_MeshNode* node) const
|
||||
return false;
|
||||
}
|
||||
vtkIdType npts = 0;
|
||||
|
@ -551,48 +602,58 @@ index 1389e0d35..a92601f1e 100644
|
|||
grid->GetCellPoints(myVtkID, npts, pts);
|
||||
vtkIdType nodeId = node->getVtkId();
|
||||
for (int rank = 0; rank < npts; rank++)
|
||||
@@ -357,10 +363,14 @@ void SMDS_VtkFace::ChangeApex(SMDS_MeshNode* node)
|
||||
@@ -356,11 +372,18 @@ SMDS_NodeIteratorPtr SMDS_VtkFace::interlacedNodesIterator() const
|
||||
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;
|
||||
+ vtkIdTypePtr pts = 0;
|
||||
vtkIdType* pts = 0;
|
||||
grid->GetCellPoints(myVtkID, npts, pts);
|
||||
grid->RemoveReferenceToCell(pts[0], myVtkID);
|
||||
+#ifdef VTK_CELL_ARRAY_V2
|
||||
+//FIXME: vtk9
|
||||
+#else
|
||||
pts[0] = node->getVtkId();
|
||||
+#endif
|
||||
node->AddInverseElement(this),
|
||||
SMDS_Mesh::_meshList[myMeshId]->setMyModified();
|
||||
}
|
||||
diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
|
||||
index 015edf75f..da2f73ffb 100644
|
||||
index 015edf75fd2..19ebd0746c8 100644
|
||||
--- src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
|
||||
+++ src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
|
||||
@@ -134,7 +134,7 @@ bool SMDS_VtkVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes
|
||||
@@ -133,6 +133,19 @@ void SMDS_VtkVolume::initPoly(const std::vector<vtkIdType>& nodeIds,
|
||||
bool SMDS_VtkVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
|
||||
{
|
||||
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
|
||||
vtkIdType npts = 0;
|
||||
- vtkIdType* pts = 0;
|
||||
+ vtkIdTypePtr pts = 0;
|
||||
grid->GetCellPoints(myVtkID, npts, pts);
|
||||
if (nbNodes != npts)
|
||||
{
|
||||
@@ -143,7 +143,11 @@ bool SMDS_VtkVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes
|
||||
}
|
||||
for (int i = 0; i < nbNodes; i++)
|
||||
{
|
||||
+#ifdef VTK_CELL_ARRAY_V2
|
||||
+//FIXME: vtk9
|
||||
+ 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 SMDS_MeshNode* nodes[], const int nbNodes
|
||||
{
|
||||
pts[i] = nodes[i]->getVtkId();
|
||||
+#endif
|
||||
}
|
||||
+#endif
|
||||
SMDS_Mesh::_meshList[myMeshId]->setMyModified();
|
||||
return true;
|
||||
@@ -207,7 +211,7 @@ int SMDS_VtkVolume::NbFaces() const
|
||||
}
|
||||
@@ -207,7 +221,7 @@ int SMDS_VtkVolume::NbFaces() const
|
||||
case VTK_POLYHEDRON:
|
||||
{
|
||||
vtkIdType nFaces = 0;
|
||||
|
@ -601,7 +662,7 @@ index 015edf75f..da2f73ffb 100644
|
|||
grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
|
||||
nbFaces = nFaces;
|
||||
break;
|
||||
@@ -236,7 +240,7 @@ int SMDS_VtkVolume::NbNodes() const
|
||||
@@ -236,7 +250,7 @@ int SMDS_VtkVolume::NbNodes() const
|
||||
else
|
||||
{
|
||||
vtkIdType nFaces = 0;
|
||||
|
@ -610,7 +671,7 @@ index 015edf75f..da2f73ffb 100644
|
|||
grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
|
||||
int id = 0;
|
||||
for (int i = 0; i < nFaces; i++)
|
||||
@@ -276,7 +280,7 @@ int SMDS_VtkVolume::NbEdges() const
|
||||
@@ -276,7 +290,7 @@ int SMDS_VtkVolume::NbEdges() const
|
||||
case VTK_POLYHEDRON:
|
||||
{
|
||||
vtkIdType nFaces = 0;
|
||||
|
@ -619,7 +680,7 @@ index 015edf75f..da2f73ffb 100644
|
|||
grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
|
||||
nbEdges = 0;
|
||||
int id = 0;
|
||||
@@ -312,7 +316,7 @@ int SMDS_VtkVolume::NbFaceNodes(const int face_ind) const
|
||||
@@ -312,7 +326,7 @@ int SMDS_VtkVolume::NbFaceNodes(const int face_ind) const
|
||||
if (aVtkType == VTK_POLYHEDRON)
|
||||
{
|
||||
vtkIdType nFaces = 0;
|
||||
|
@ -628,7 +689,7 @@ index 015edf75f..da2f73ffb 100644
|
|||
grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
|
||||
int id = 0;
|
||||
for (int i = 0; i < nFaces; i++)
|
||||
@@ -342,7 +346,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetFaceNode(const int face_ind, const int n
|
||||
@@ -342,7 +356,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetFaceNode(const int face_ind, const int n
|
||||
if (aVtkType == VTK_POLYHEDRON)
|
||||
{
|
||||
vtkIdType nFaces = 0;
|
||||
|
@ -637,7 +698,7 @@ index 015edf75f..da2f73ffb 100644
|
|||
grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
|
||||
int id = 0;
|
||||
for (int i = 0; i < nFaces; i++)
|
||||
@@ -372,7 +376,7 @@ std::vector<int> SMDS_VtkVolume::GetQuantities() const
|
||||
@@ -372,7 +386,7 @@ std::vector<int> SMDS_VtkVolume::GetQuantities() const
|
||||
if (aVtkType == VTK_POLYHEDRON)
|
||||
{
|
||||
vtkIdType nFaces = 0;
|
||||
|
@ -646,7 +707,7 @@ index 015edf75f..da2f73ffb 100644
|
|||
grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
|
||||
int id = 0;
|
||||
for (int i = 0; i < nFaces; i++)
|
||||
@@ -430,7 +434,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetNode(const int ind) const
|
||||
@@ -430,7 +444,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetNode(const int ind) const
|
||||
if ( aVtkType == VTK_POLYHEDRON)
|
||||
{
|
||||
vtkIdType nFaces = 0;
|
||||
|
@ -655,7 +716,7 @@ index 015edf75f..da2f73ffb 100644
|
|||
grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
|
||||
int id = 0, nbPoints = 0;
|
||||
for (int i = 0; i < nFaces; i++)
|
||||
@@ -443,7 +447,8 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetNode(const int ind) const
|
||||
@@ -443,7 +457,8 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetNode(const int ind) const
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -665,7 +726,7 @@ index 015edf75f..da2f73ffb 100644
|
|||
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 +465,7 @@ int SMDS_VtkVolume::GetNodeIndex( const SMDS_MeshNode* node ) const
|
||||
@@ -460,7 +475,7 @@ int SMDS_VtkVolume::GetNodeIndex( const SMDS_MeshNode* node ) const
|
||||
if ( aVtkType == VTK_POLYHEDRON)
|
||||
{
|
||||
vtkIdType nFaces = 0;
|
||||
|
@ -674,7 +735,7 @@ index 015edf75f..da2f73ffb 100644
|
|||
grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
|
||||
int id = 0;
|
||||
for (int iF = 0; iF < nFaces; iF++)
|
||||
@@ -473,7 +478,8 @@ int SMDS_VtkVolume::GetNodeIndex( const SMDS_MeshNode* node ) const
|
||||
@@ -473,7 +488,8 @@ int SMDS_VtkVolume::GetNodeIndex( const SMDS_MeshNode* node ) const
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
@ -684,7 +745,7 @@ index 015edf75f..da2f73ffb 100644
|
|||
grid->GetCellPoints( this->myVtkID, npts, pts );
|
||||
for ( vtkIdType i = 0; i < npts; ++i )
|
||||
if ( pts[i] == node->getVtkId() )
|
||||
@@ -534,7 +540,7 @@ bool SMDS_VtkVolume::IsMediumNode(const SMDS_MeshNode* node) const
|
||||
@@ -534,7 +550,7 @@ bool SMDS_VtkVolume::IsMediumNode(const SMDS_MeshNode* node) const
|
||||
return false;
|
||||
}
|
||||
vtkIdType npts = 0;
|
||||
|
@ -694,10 +755,10 @@ index 015edf75f..da2f73ffb 100644
|
|||
vtkIdType nodeId = node->getVtkId();
|
||||
for (int rank = 0; rank < npts; rank++)
|
||||
diff --git src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
|
||||
index a742702ff..1ff4d5eef 100644
|
||||
index fcd044b00f2..f54c24f8618 100644
|
||||
--- src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
|
||||
+++ src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
|
||||
@@ -11343,7 +11343,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
@@ -11348,7 +11348,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
{
|
||||
int oldId = *itn;
|
||||
//MESSAGE(" node " << oldId);
|
||||
|
@ -706,7 +767,7 @@ index a742702ff..1ff4d5eef 100644
|
|||
for (int i=0; i<l.ncells; i++)
|
||||
{
|
||||
int vtkId = l.cells[i];
|
||||
@@ -11522,7 +11522,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
@@ -11527,7 +11527,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
//MESSAGE(" domain " << idom << " volume " << elem->GetID());
|
||||
double values[3];
|
||||
vtkIdType npts = 0;
|
||||
|
@ -715,7 +776,7 @@ index a742702ff..1ff4d5eef 100644
|
|||
grid->GetCellPoints(vtkVolIds[ivol], npts, pts);
|
||||
SMDS_VtkVolume::gravityCenter(grid, pts, npts, values);
|
||||
if (id ==0)
|
||||
@@ -11703,7 +11703,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
@@ -11708,7 +11708,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
{
|
||||
int oldId = itnod->first;
|
||||
//MESSAGE(" node " << oldId);
|
||||
|
@ -724,7 +785,7 @@ index a742702ff..1ff4d5eef 100644
|
|||
for (int i = 0; i < l.ncells; i++)
|
||||
{
|
||||
int vtkId = l.cells[i];
|
||||
@@ -12160,7 +12160,7 @@ void SMESH_MeshEditor::CreateHoleSkin(double radius,
|
||||
@@ -12165,7 +12165,7 @@ void SMESH_MeshEditor::CreateHoleSkin(double radius,
|
||||
MESSAGE("volume to check, vtkId " << vtkId << " smdsId " << meshDS->fromVtkToSmds(vtkId));
|
||||
bool volInside = false;
|
||||
vtkIdType npts = 0;
|
||||
|
@ -733,28 +794,3 @@ index a742702ff..1ff4d5eef 100644
|
|||
grid->GetCellPoints(vtkId, npts, pts);
|
||||
for (int i=0; i<npts; i++)
|
||||
{
|
||||
diff --git src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp
|
||||
index dde2bd824..3acfead65 100644
|
||||
--- src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp
|
||||
+++ src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp
|
||||
@@ -56,6 +56,11 @@
|
||||
|
||||
using namespace FemGui;
|
||||
|
||||
+#ifdef VTK_CELL_ARRAY_V2
|
||||
+typedef const vtkIdType* vtkIdTypePtr;
|
||||
+#else
|
||||
+typedef vtkIdType* vtkIdTypePtr;
|
||||
+#endif
|
||||
|
||||
PROPERTY_SOURCE(FemGui::ViewProviderFemPostObject, Gui::ViewProviderDocumentObject)
|
||||
|
||||
@@ -316,7 +321,7 @@ void ViewProviderFemPostObject::update3D() {
|
||||
vtkDataArray *tcoords = NULL;
|
||||
vtkCellArray *cells;
|
||||
vtkIdType npts = 0;
|
||||
- vtkIdType *indx = 0;
|
||||
+ vtkIdTypePtr indx = 0;
|
||||
|
||||
points = pd->GetPoints();
|
||||
pntData = pd->GetPointData();
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
diff --git src/Mod/Fem/feminout/importFenicsMesh.py src/Mod/Fem/feminout/importFenicsMesh.py
|
||||
index 1bb40de..a0b5484 100644
|
||||
--- src/Mod/Fem/feminout/importFenicsMesh.py
|
||||
+++ src/Mod/Fem/feminout/importFenicsMesh.py
|
||||
@@ -154,7 +154,7 @@ def export(objectslist, fileString):
|
||||
FreeCAD.Console.PrintWarning("Tri6 -> Tri3, Tet10 -> Tet4, etc.\n")
|
||||
writeFenicsXML.write_fenics_mesh_xml(obj, fileString)
|
||||
elif fileExtension.lower() == '.xdmf':
|
||||
- if importToolsFem.get_FemMeshObjectMeshGroups(obj) is not ():
|
||||
+ if importToolsFem.get_FemMeshObjectMeshGroups(obj):
|
||||
# if there are groups found, make task panel available
|
||||
panel = WriteXDMFTaskPanel(obj, fileString)
|
||||
FreeCADGui.Control.showDialog(panel)
|
||||
diff --git src/Mod/Fem/feminout/writeFenicsXDMF.py src/Mod/Fem/feminout/writeFenicsXDMF.py
|
||||
index 9e7f01b..5a93823 100644
|
||||
--- src/Mod/Fem/feminout/writeFenicsXDMF.py
|
||||
+++ src/Mod/Fem/feminout/writeFenicsXDMF.py
|
||||
@@ -258,7 +258,7 @@ def write_fenics_mesh_xdmf(fem_mesh_obj, outputfile, group_values_dict={}, encod
|
||||
fem_mesh = fem_mesh_obj.FemMesh
|
||||
gmshgroups = get_FemMeshObjectMeshGroups(fem_mesh_obj)
|
||||
|
||||
- if gmshgroups is not ():
|
||||
+ if gmshgroups:
|
||||
print('found mesh groups')
|
||||
|
||||
for g in gmshgroups:
|
||||
diff --git src/Mod/PartDesign/WizardShaft/Shaft.py src/Mod/PartDesign/WizardShaft/Shaft.py
|
||||
index c519b97..8c20eb4 100644
|
||||
--- src/Mod/PartDesign/WizardShaft/Shaft.py
|
||||
+++ src/Mod/PartDesign/WizardShaft/Shaft.py
|
||||
@@ -88,7 +88,7 @@ class Shaft:
|
||||
# We don't call equilibrium() here because the new segment has no constraints defined yet
|
||||
# Fix face reference of fixed segment if it is the last one
|
||||
for i in range(1, len(self.segments)):
|
||||
- if self.segments[i].constraintType is not "Fixed":
|
||||
+ if self.segments[i].constraintType != "Fixed":
|
||||
continue
|
||||
if i == len(self.segments) - 1:
|
||||
self.segments[index].constraint.References = [( self.feature.feature, "Face%u" % (2 * (index+1) + 1) )]
|
|
@ -0,0 +1,53 @@
|
|||
--- cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake 2020-11-26 15:59:27.000000000 +0100
|
||||
+++ cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake 2020-11-26 23:09:12.778262636 +0100
|
||||
@@ -11,6 +11,8 @@
|
||||
set(SMESH_VERSION_TWEAK 0)
|
||||
|
||||
#if we use smesh we definitely also need vtk, no matter of external or internal smesh
|
||||
+ find_package(VTK REQUIRED NO_MODULE)
|
||||
+ if(${VTK_MAJOR_VERSION} LESS 9)
|
||||
set (VTK_COMPONENTS
|
||||
vtkCommonCore
|
||||
vtkCommonDataModel
|
||||
@@ -23,18 +25,37 @@
|
||||
vtkFiltersSources
|
||||
vtkFiltersGeometry
|
||||
)
|
||||
-
|
||||
- # 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)
|
||||
+ else()
|
||||
+ # VTK 9 changed its component names
|
||||
+ set (VTK_COMPONENTS
|
||||
+ CommonCore
|
||||
+ CommonDataModel
|
||||
+ FiltersVerdict
|
||||
+ IOXML
|
||||
+ FiltersCore
|
||||
+ FiltersGeneral
|
||||
+ IOLegacy
|
||||
+ FiltersExtraction
|
||||
+ FiltersSources
|
||||
+ FiltersGeometry
|
||||
+ )
|
||||
+ find_package(VTK COMPONENTS CommonCore REQUIRED NO_MODULE)
|
||||
+ list(APPEND VTK_COMPONENTS IOMPIParallel ParallelMPI hdf5 FiltersParallelDIY2 RenderingCore InteractionStyle RenderingFreeType RenderingOpenGL2)
|
||||
+ endif()
|
||||
+
|
||||
+ # check which modules are available
|
||||
foreach(_module ${VTK_COMPONENTS})
|
||||
+ if(${VTK_MAJOR_VERSION} LESS 9)
|
||||
list (FIND VTK_MODULES_ENABLED ${_module} _index)
|
||||
+ else()
|
||||
+ list (FIND VTK_AVAILABLE_COMPONENTS ${_module} _index)
|
||||
+ endif()
|
||||
if (${_index} GREATER -1)
|
||||
list(APPEND AVAILABLE_VTK_COMPONENTS ${_module})
|
||||
endif()
|
||||
endforeach()
|
||||
- endif()
|
||||
|
||||
# don't check VERSION 6 as this would exclude VERSION 7
|
||||
if(AVAILABLE_VTK_COMPONENTS)
|
|
@ -1,17 +1,19 @@
|
|||
# Template file for 'freecad'
|
||||
pkgname=freecad
|
||||
version=0.18.4
|
||||
revision=10
|
||||
version=0.19.1
|
||||
revision=1
|
||||
wrksrc="FreeCAD-${version}"
|
||||
build_style=cmake
|
||||
|
||||
# CMAKE_INSTALL_LIBDIR by default doesn't use PREFIX, so we set it manually
|
||||
_inst_prefix=/usr/lib/${pkgname}
|
||||
configure_args="
|
||||
-DPYTHON_EXECUTABLE=/usr/bin/python3
|
||||
-DBUILD_QT5=ON
|
||||
-DBUILD_FEM_NETGEN=OFF
|
||||
-DBUILD_FLAT_MESH=ON
|
||||
-DCMAKE_INSTALL_PREFIX=${_inst_prefix}
|
||||
-DCMAKE_INSTALL_LIBDIR=${_inst_prefix}/lib
|
||||
-DCMAKE_INSTALL_DATAROOTDIR=/usr/share
|
||||
-DCMAKE_INSTALL_DATADIR=/usr/share/${pkgname}
|
||||
-DMEDFILE_INCLUDE_DIRS=/usr/include/med
|
||||
-DPYSIDE2RCCBINARY=/usr/bin/rcc-qt5
|
||||
-DPYSIDE2UICBINARY=/usr/bin/uic-qt5"
|
||||
|
@ -21,20 +23,20 @@ makedepends="python3-devel boost-devel libxerces-c-devel zlib-devel occt-devel
|
|||
coin3-devel libshiboken2-devel libspnav-devel pyside2-tools
|
||||
liblz4-devel libpyside2-python3-devel python3-matplotlib netcdf-devel
|
||||
jsoncpp-devel qt5-devel qt5-svg-devel qt5-tools-devel qt5-webkit-devel
|
||||
qt5-x11extras-devel coin3-doc glew-devel"
|
||||
qt5-xmlpatterns-devel coin3-doc glew-devel"
|
||||
|
||||
# FreeCAD help: qt5/assistant with datas in SQLite format
|
||||
# FreeCAD help: qt5/assistant with SQLite storage
|
||||
depends="python3-matplotlib python3-pyside2 qt5-plugin-sqlite python3-pivy"
|
||||
|
||||
python_version=3
|
||||
pycompile_dirs="usr/lib/${pkgname}/Mod usr/lib/${pkgname}/data/Mod"
|
||||
pycompile_dirs="usr/lib/${pkgname}/Mod"
|
||||
|
||||
short_desc="General purpose 3D CAD modeler"
|
||||
maintainer="yopito <pierre.bourgin@free.fr>"
|
||||
license="LGPL-2.0-or-later"
|
||||
homepage="https://freecadweb.org/"
|
||||
distfiles="https://github.com/FreeCAD/FreeCAD/archive/${version}.tar.gz"
|
||||
checksum=4e0cce447b31b8989a00cf68c49ae012ce8e5546a56c6e0874fbd8f7ddedffd2
|
||||
checksum=5ec0003c18df204f7b449d4ac0a82f945b41613a0264127de3ef16f6b2efa60f
|
||||
|
||||
if [ "$XBPS_TARGET_LIBC" = musl ]; then
|
||||
makedepends+=" libexecinfo-devel"
|
||||
|
@ -43,13 +45,13 @@ fi
|
|||
|
||||
post_extract() {
|
||||
# Report exact minor version
|
||||
sed -i -e "s,^\(set(PACKAGE_VERSION_MINOR\) .*,\1 \"${version#*.}\")," CMakeLists.txt
|
||||
vsed -i -e "s,^\(set(PACKAGE_VERSION_MINOR\) .*,\1 \"${version#*.}\")," CMakeLists.txt
|
||||
|
||||
# SubWCRev.py (SCM check) reports "unknown" for these fields
|
||||
sed -i -e "s,\${PACKAGE_WCREF},${revision}_voidlinux," \
|
||||
vsed -e "s,\${PACKAGE_WCREF},${revision}_voidlinux," \
|
||||
-e "s,\${PACKAGE_WCDATE},(from release)," \
|
||||
-e "s,\${PACKAGE_WCURL},VoidLinux package ${pkgname}," \
|
||||
src/Build/Version.h.cmake
|
||||
-i src/Build/Version.h.cmake
|
||||
}
|
||||
|
||||
post_install() {
|
||||
|
|
Loading…
Reference in New Issue