From 7078fc999ec3714bf5ef2e67dac3d74a8fe0a912 Mon Sep 17 00:00:00 2001 From: Christoph Lehrenfeld Date: Mon, 9 May 2016 09:48:33 +0200 Subject: [PATCH 1/2] [mesh] set/get geometry --- libsrc/meshing/python_mesh.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index d6d4c605..c5438103 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -6,6 +6,8 @@ #include #include "meshing.hpp" +#include +#include using namespace netgen; @@ -454,6 +456,18 @@ DLL_HEADER void ExportNetgenMeshing() Refinement().Refine(self); })) + .def ("SetGeometry", FunctionPointer + ([](Mesh & self, shared_ptr geo) + { + self.SetGeometry(geo); + })) + + .def ("SetGeometry", FunctionPointer + ([](Mesh & self, shared_ptr geo) + { + self.SetGeometry(geo); + })) + .def ("BuildSearchTree", &Mesh::BuildElementSearchTree) .def ("BoundaryLayer", FunctionPointer From ba773c5d7a02e975eddf5558960aa07eb7a9848f Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 9 May 2016 11:20:15 +0200 Subject: [PATCH 2/2] more robust macro to get WINNT version, fixes error "constant too big" in icon compilation on Windows (thx J. Schickmair) --- CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ed7feb4f..edfb7505 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -110,10 +110,9 @@ add_definitions(-DHAVE_CONFIG_H) # platform specific definitions and flags macro(get_WIN32_WINNT version) if (WIN32 AND CMAKE_SYSTEM_VERSION) - set(ver ${CMAKE_SYSTEM_VERSION}) - string(REPLACE "." "" ver ${ver}) - string(REGEX REPLACE "([0-9])" "0\\1" ver ${ver}) - + if("${CMAKE_SYSTEM_VERSION}" MATCHES "^([0-9]+)\\.([0-9]+)") + math(EXPR ver "${CMAKE_MATCH_1}*100 + ${CMAKE_MATCH_2}") + endif() set(${version} "0x${ver}") endif() endmacro()