diff --git a/CMakeLists.txt b/CMakeLists.txt index 9eb9d871..f1bc95c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -128,6 +128,7 @@ else(WIN32) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") endif(WIN32) if(APPLE) +# set(MACOSX_BUNDLE ON) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -undefined dynamic_lookup") # set(CMAKE_SHARED_LIBRARY_SUFFIX ".so") endif(APPLE) @@ -313,9 +314,22 @@ if(UNIX) set(CPACK_DEBIAN_PACKAGE_NAME ${CPACK_PACKAGE_NAME}) set(CPACK_PACKAGE_FILE_NAME "netgen-${PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}") endif(temp) - include(CPack) endif(UNIX) +if(APPLE) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/startup2.sh DESTINATION bin) + set(CPACK_GENERATOR "Bundle") + set(CPACK_BUNDLE_NAME "NGSuite") + set(CPACK_BUNDLE_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) + set(CPACK_BUNDLE_ICON + ${CMAKE_CURRENT_SOURCE_DIR}/../netgen/windows/netgen.ico) +# set(CPACK_BUNDLE_STARTUP_COMMAND /Applications/NGSuite.app/Contents/MacOS/NGSuite) +# set(CPACK_BUNDLE_STARTUP_COMMAND /Applications/NGSuite.app/Contents/Resources/bin/netgen) + set(CPACK_BUNDLE_STARTUP_COMMAND startup.sh) +# set(CPACK_SOURCE_GENERATOR "TGZ") +endif(APPLE) + +include(CPack) ####################################################################### # uninstall target diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index 1919f7b5..a9ed0a72 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -363,6 +363,8 @@ DLL_HEADER void ExportNetgenMeshing() .def("FaceDescriptor", static_cast (&Mesh::GetFaceDescriptor), bp::return_value_policy()) + .def("GetNFaceDescriptors", &Mesh::GetNFD) + .def("__getitem__", FunctionPointer ([](const Mesh & self, PointIndex pi) { @@ -411,10 +413,19 @@ DLL_HEADER void ExportNetgenMeshing() { cout << "generate vol mesh" << endl; MeshingParameters mp; + mp.optsteps3d = 5; MeshVolume (mp, self); OptimizeVolume (mp, self); })) + .def ("OptimizeVolumeMesh", FunctionPointer + ([](Mesh & self) + { + MeshingParameters mp; + mp.optsteps3d = 5; + OptimizeVolume (mp, self); + })) + .def ("Refine", FunctionPointer ([](Mesh & self) {