diff --git a/CMakeLists.txt b/CMakeLists.txt index 04a1005e56..3107cd2685 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -261,7 +261,7 @@ OPTION(BUILD_JTREADER "Build the FreeCAD jt reader module" OFF) OPTION(BUILD_MATERIAL "Build the FreeCAD material module" ON) OPTION(BUILD_MESH "Build the FreeCAD mesh module" ON) OPTION(BUILD_MESH_PART "Build the FreeCAD mesh part module" ON) -OPTION(BUILD_FLAT_MESH "Build the FreeCAD flat mesh module" ON) +OPTION(BUILD_FLAT_MESH "Build the FreeCAD flat mesh module" OFF) OPTION(BUILD_OPENSCAD "Build the FreeCAD openscad module" ON) OPTION(BUILD_PART "Build the FreeCAD part module" ON) OPTION(BUILD_PART_DESIGN "Build the FreeCAD part design module" ON) diff --git a/src/Mod/MeshPart/App/MeshFlatteningBoostPython.cpp b/src/Mod/MeshPart/App/MeshFlatteningBoostPython.cpp index 4ad34352f1..261d13696b 100644 --- a/src/Mod/MeshPart/App/MeshFlatteningBoostPython.cpp +++ b/src/Mod/MeshPart/App/MeshFlatteningBoostPython.cpp @@ -147,6 +147,29 @@ boost::python::list interpolateFlatFacePy(FaceUnwrapper& instance, const py::obj return plist; } +boost::python::list getFlatBoundaryNodesPy(FaceUnwrapper& instance) +{ + std::vector> mat_array = instance.getFlatBoundaryNodes(); + + boost::python::list ary; + for (auto mat : mat_array) { + boost::python::list plist; + auto cols = mat.cols(); + auto rows = mat.rows(); + for (int i=0; i, ColMat>()) .def("findFlatNodes", &FaceUnwrapper::findFlatNodes) .def("interpolateFlatFace", &interpolateFlatFacePy) - .def("getFlatBoundaryNodes", &FaceUnwrapper::getFlatBoundaryNodes) + .def("getFlatBoundaryNodes", &getFlatBoundaryNodesPy) .def_readonly("tris", &FaceUnwrapper::tris) .def_readonly("nodes", &FaceUnwrapper::xyz_nodes) .def_readonly("uv_nodes", &FaceUnwrapper::uv_nodes) diff --git a/src/Mod/MeshPart/App/MeshFlatteningLscmRelax.cpp b/src/Mod/MeshPart/App/MeshFlatteningLscmRelax.cpp index f629c82d0f..6bfd94328d 100644 --- a/src/Mod/MeshPart/App/MeshFlatteningLscmRelax.cpp +++ b/src/Mod/MeshPart/App/MeshFlatteningLscmRelax.cpp @@ -455,7 +455,7 @@ void LscmRelax::lscm() std::vector mat_triplets; for (auto triplet: triple_list) { - if (triplet.col() > static_cast((this->vertices.cols() - this->fixed_pins.size()) * 2 - 1)) + if (triplet.col() > static_cast((this->vertices.cols() - this->fixed_pins.size()) * 2 - 1)) rhs_triplets.push_back(triplet); else mat_triplets.push_back(triplet);