From 5e3c9738434cd1d0fdd5b7f557c9f4686e815bc5 Mon Sep 17 00:00:00 2001 From: Dtouch <1472779700@qq.com> Date: Thu, 14 Mar 2024 00:33:17 +0800 Subject: [PATCH] finetune --- CMakeLists.txt | 3 ++- include/utils.h | 1 - main.cpp | 6 +++++- src/SingularityJudger.cpp | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 683c299..d7c4c16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,8 @@ AUX_SOURCE_DIRECTORY(src DIR_SRCS) AUX_SOURCE_DIRECTORY(include DIR_INCLUDE) # 生成可执行文件 -add_executable(SingularityJudger main.cpp ${DIR_SRCS} ${DIR_INCLUDE}) +add_executable(SingularityJudger main.cpp ${DIR_SRCS} ${DIR_INCLUDE} + include/alg.h) # 生成静态库 #set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) diff --git a/include/utils.h b/include/utils.h index d93d585..2c19e2e 100644 --- a/include/utils.h +++ b/include/utils.h @@ -13,5 +13,4 @@ namespace utils { void restart(); void end() const; }; - } diff --git a/main.cpp b/main.cpp index 2b4dc58..98109a3 100644 --- a/main.cpp +++ b/main.cpp @@ -193,7 +193,11 @@ int main() { ifstream fin; // fin.open(R"(intersectTest\singularCase3\surfaces.txt)"); - fin.open(R"(intersectTest\casea3\surfaces.txt)"); + fin.open(R"(E:\Proj\SingularityJudger\intersectTest\casea3\surfaces.txt)"); + if (!fin.is_open()) { + cout << "file not found" << endl; + return 0; + } string str; string tmp; diff --git a/src/SingularityJudger.cpp b/src/SingularityJudger.cpp index d77c032..c680046 100644 --- a/src/SingularityJudger.cpp +++ b/src/SingularityJudger.cpp @@ -17,7 +17,7 @@ bool SingularityJudger::judge(pair focusRange_u1, pair focus } // TODO loop detection to retain patch pair that must have loop or singular intersection LoopDetector loopDetector(mesh1.evaluation, mesh2.evaluation, mesh1.tangent_u, mesh2.tangent_u, mesh1.tangent_v, - mesh2.tangent_v, mesh1.normal, mesh2.normal, srf1); + mesh2.tangent_v, mesh1.normal, mesh2.normal, srf1, srf2); loopDetector.detect(focusRange_u1, focusRange_v1, focusRange_u2, focusRange_v2); judgeRes = vector >(loopDetector.s_subPatchEdgeSampleCnt_u - 1, vector(loopDetector.s_subPatchEdgeSampleCnt_v - 1, 0));