From 5e75f3bc973ec1dc09937ef372d7ef41d6082f9b Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 28 Jul 2018 11:58:39 +0200 Subject: [PATCH] remove undesired dependency of Mesh to Part module --- CMakeLists.txt | 1 - src/Mod/Mesh/App/CMakeLists.txt | 2 -- src/Mod/Mesh/App/Exporter.cpp | 10 ++++------ src/Mod/Mesh/App/PreCompiled.h | 2 -- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c5b177a445..2446e27624 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -345,7 +345,6 @@ REQUIRES_MODS(BUILD_IDF BUILD_PART) REQUIRES_MODS(BUILD_IMPORT BUILD_PART) REQUIRES_MODS(BUILD_INSPECTION BUILD_MESH BUILD_POINTS BUILD_PART) REQUIRES_MODS(BUILD_JTREADER BUILD_MESH) -REQUIRES_MODS(BUILD_MESH BUILD_PART) REQUIRES_MODS(BUILD_MESH_PART BUILD_PART BUILD_MESH BUILD_SMESH) REQUIRES_MODS(BUILD_FLAT_MESH BUILD_MESH_PART) REQUIRES_MODS(BUILD_OPENSCAD BUILD_MESH_PART BUILD_DRAFT) diff --git a/src/Mod/Mesh/App/CMakeLists.txt b/src/Mod/Mesh/App/CMakeLists.txt index 3e2b607382..1f64c340c4 100644 --- a/src/Mod/Mesh/App/CMakeLists.txt +++ b/src/Mod/Mesh/App/CMakeLists.txt @@ -11,14 +11,12 @@ include_directories( ${XercesC_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR} ${EIGEN3_INCLUDE_DIR} - ${OCC_INCLUDE_DIR} ) set(Mesh_LIBS ${Boost_LIBRARIES} FreeCADBase FreeCADApp - Part ) if (BUILD_QT5) diff --git a/src/Mod/Mesh/App/Exporter.cpp b/src/Mod/Mesh/App/Exporter.cpp index c45638347e..b99b16127e 100644 --- a/src/Mod/Mesh/App/Exporter.cpp +++ b/src/Mod/Mesh/App/Exporter.cpp @@ -40,8 +40,6 @@ #include "App/Part.h" -#include - #include using namespace Mesh; @@ -183,14 +181,14 @@ bool MergeExporter::addPartFeat(App::DocumentObject *obj, float tol) auto geoData( static_cast(shape)->getComplexData() ); if (geoData) { - const Part::TopoShape* ts = static_cast(geoData); - Part::TopoShape tsCopy(*ts); App::GeoFeature* gf = static_cast(obj); - tsCopy.setPlacement(gf->globalPlacement()); + Base::Placement plm = gf->globalPlacement(); std::vector aPoints; std::vector aTopo; - tsCopy.getFaces(aPoints, aTopo, tol); + geoData->getFaces(aPoints, aTopo, tol); + for (auto& it : aPoints) + plm.multVec(it, it); mesh->addFacets(aTopo, aPoints, false); if (countFacets == 0) diff --git a/src/Mod/Mesh/App/PreCompiled.h b/src/Mod/Mesh/App/PreCompiled.h index d8139980fd..9664300df5 100644 --- a/src/Mod/Mesh/App/PreCompiled.h +++ b/src/Mod/Mesh/App/PreCompiled.h @@ -30,10 +30,8 @@ // Exporting of App classes #ifdef FC_OS_WIN32 # define MeshExport __declspec(dllexport) -# define PartExport __declspec(dllimport) #else // for Linux # define MeshExport -# define PartExport #endif