diff --git a/.github/workflows/continuous.yml b/.github/workflows/continuous.yml index 995fecb..aa95cc7 100644 --- a/.github/workflows/continuous.yml +++ b/.github/workflows/continuous.yml @@ -71,8 +71,8 @@ jobs: - name: Debug build run: cmake --build build --parallel --config Debug - - name: Debug run - delete facet - run: build/Debug/entrypoint_exec_win_addon.exe path=mesh/quarterdisk_tri.mesh + # - name: Debug run - delete facet + # run: build/Debug/entrypoint_exec_win_addon.exe path=mesh/quarterdisk_tri.mesh - name: Deploy uses: xresloader/upload-to-github-release@v1 diff --git a/src/borderOrientation.cpp b/src/borderOrientation.cpp index 1531ceb..58e60a6 100644 --- a/src/borderOrientation.cpp +++ b/src/borderOrientation.cpp @@ -68,7 +68,6 @@ class borderOrientation { void calculateIntersectionBorder(Triangles &triangle, Quads &quad, FacetAttribute &fa, PointAttribute &pa, CornerAttribute &ca, std::vector ®ions, bool gifmode = false) { for (auto ®ion : regions) { - std::cout << "Get border vertice..." << std::endl; std::vector borderVertices = region.getBorderVertice(ca); @@ -87,11 +86,9 @@ class borderOrientation { if (regionMeet.size() > 2) { std::vector listRegionMeet = std::vector(); listRegionMeet = std::vector(regionMeet.begin(), regionMeet.end()); - std::cout << "Generate key name..." << std::endl; std::string key = generatorKeyNameList(listRegionMeet); intersectMapBorder[key] = borderVertices[i]; - std::cout << "Fill intersect..." << std::endl; fillIntersect(key, borderVertices[i], triangle, fa); } @@ -110,9 +107,7 @@ class borderOrientation { for (auto ®ion : regions) { int idGroup = region.getIdGroup(); - std::cout << "get id group " << std::endl; std::vector borderHalfEdge = region.getBorderHalfEdge(ca); - std::cout << "get border halfedge " << std::endl; for (auto fId : borderHalfEdge) { auto f = Surface::Halfedge(triangle, fId); @@ -121,7 +116,6 @@ class borderOrientation { key = generateKeyName(idGroup, borderOut); else key = generateKeyName(idGroup, fa[f.opposite().facet()]); - std::cout << "gen keyframe " << std::endl; auto key_it = mapBorder.emplace(key, std::set()).first; key_it->second.insert(f.from()); diff --git a/src/intersectData.cpp b/src/intersectData.cpp index 4b3b9d5..4fb43f2 100644 --- a/src/intersectData.cpp +++ b/src/intersectData.cpp @@ -53,33 +53,21 @@ void fillIntersect(std::string keyIntersect, int vertices, Triangles &triangle, for (auto halfedge: verticesIntersect.iter_halfedges()) { processed++; auto f = Surface::Halfedge(triangle, halfedge); - std::cout << "regionfacet..." << std::endl; auto region = regionFacet[f.facet()]; - std::cout << "regionfacet opp..." << std::endl; auto regionOposite = f.opposite().active() ? regionFacet[f.opposite().facet()] : borderOut; // if (f.opposite() == -1) { - std::cout << "activdo..." << std::endl; // if (!f.opposite().active()) { // regionOposite = borderOut; // } - std::cout << "gen key..." << std::endl; std::string key = generateKey(region, regionOposite); - std::cout << "emplace..." << std::endl; intersectDataFolder.emplace(keyIntersect,std::vector()); - std::cout << "push..." << std::endl; - intersectDataFolder[keyIntersect].push_back(IntersectData(key, std::to_string(region), Mode::OUTPUT)); - std::cout << "push..." << std::endl; - intersectDataFolder[keyIntersect].push_back(IntersectData(key, std::to_string(regionOposite), Mode::INPUT)); - std::cout << "posh..." << std::endl; - } - std::cout << "isElementString..." << std::endl; // Case where the intersect has a border with void and so the halfedge doesn't exist if (isElementInString(keyIntersect, borderOut) == true) { @@ -88,7 +76,6 @@ void fillIntersect(std::string keyIntersect, int vertices, Triangles &triangle, auto f = Surface::Halfedge(triangle, halfedge); auto region = regionFacet[f.facet()]; auto regionOposite = borderOut; - std::cout << "generateKey..." << std::endl; std::string key = generateKey(region, regionOposite); intersectDataFolder[keyIntersect].push_back(IntersectData(key, std::to_string(region), Mode::OUTPUT)); diff --git a/src/region.h b/src/region.h index 841c86a..a4e6057 100644 --- a/src/region.h +++ b/src/region.h @@ -143,6 +143,7 @@ class Region { std::vector getBorderHalfEdge(CornerAttribute &ca) const { std::vector border; + // TODO here it blocks in Windows Debug mode after 5 iter on mesh/quarterdisk_tri.mesh ! I don't know why... for (int i = 0; i < region.size(); i++) { //parcours les 3 voisin de chaque facet et ajouté au vecteur si il n'est pas déjà dans la region ou dans les voisins de la region auto f = Surface::Facet(triangle, region[i]); @@ -151,17 +152,15 @@ class Region { auto v1 = f.halfedge(1); auto v2 = f.halfedge(2); - std::cout << "a" << std::endl; + if (!isElementInVector(region, v0.opposite().facet()) || v0.opposite() == -1) { border.push_back(v0); ca[v0] = idGroup; } - std::cout << "b" << std::endl; if (!isElementInVector(region, v1.opposite().facet()) || v1.opposite() == -1) { border.push_back(v1); ca[v1] = idGroup; } - std::cout << "c" << std::endl; if (!isElementInVector(region, v2.opposite().facet()) || v2.opposite() == -1) { border.push_back(v2); ca[v2] = idGroup; diff --git a/src/triToQuadRegion.cpp b/src/triToQuadRegion.cpp index 9aafff6..d7e5fc8 100644 --- a/src/triToQuadRegion.cpp +++ b/src/triToQuadRegion.cpp @@ -191,24 +191,24 @@ void process(Triangles &triangle, Quads &quad, FacetAttribute &fa, PointAtt borderOrientation borderOrientation; - std::cout << "Calculate border..." << std::endl; + borderOrientation.calculateBorder(triangle, quad, fa, pa, ca, regions, gifmode); - std::cout << "Calculate section border..." << std::endl; + borderOrientation.calculateIntersectionBorder(triangle, quad, fa, pa, ca, regions, gifmode); - std::cout << "Map<>..." << std::endl; + std::map idVerticeFromKey = std::map(); intersectIndex = regions.size(); - std::cout << "Map intersection border..." << std::endl; + borderIndex = intersectIndex + borderOrientation.getMapIntersectBorder().size(); quad.points.create_points(regions.size() + borderOrientation.getMapIntersectBorder().size() + borderOrientation.getMapBorder().size()); - std::cout << "Transform quads..." << std::endl; + for (auto ®ion : regions) { //continue; transformQuad(triangle, quad, fa, pa, ca, region, borderOrientation, idVerticeFromKey, faQuad, gifmode); } - std::cout << "Connect..." << std::endl; + quad.connect(); - std::cout << "Smooth..." << std::endl; + smoothFacet(quad); }