Skip to content

Commit

Permalink
ci: remove debug exec as it loop infinitely for the moment, remove de…
Browse files Browse the repository at this point in the history
…bug messages
  • Loading branch information
lbinria committed Aug 7, 2024
1 parent c8fe23c commit 296d71e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions src/borderOrientation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ class borderOrientation {
void calculateIntersectionBorder(Triangles &triangle, Quads &quad, FacetAttribute<int> &fa, PointAttribute<int> &pa, CornerAttribute<int> &ca, std::vector<Region> &regions, bool gifmode = false) {

for (auto &region : regions) {
std::cout << "Get border vertice..." << std::endl;

std::vector<int> borderVertices = region.getBorderVertice(ca);

Expand All @@ -87,11 +86,9 @@ class borderOrientation {
if (regionMeet.size() > 2) {
std::vector<int> listRegionMeet = std::vector<int>();
listRegionMeet = std::vector<int>(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);
}
Expand All @@ -110,9 +107,7 @@ class borderOrientation {

for (auto &region : regions) {
int idGroup = region.getIdGroup();
std::cout << "get id group " << std::endl;
std::vector<int> borderHalfEdge = region.getBorderHalfEdge(ca);
std::cout << "get border halfedge " << std::endl;

for (auto fId : borderHalfEdge) {
auto f = Surface::Halfedge(triangle, fId);
Expand All @@ -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<int>()).first;
key_it->second.insert(f.from());
Expand Down
13 changes: 0 additions & 13 deletions src/intersectData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<IntersectData>());
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) {
Expand All @@ -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));
Expand Down
5 changes: 2 additions & 3 deletions src/region.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ class Region {
std::vector<int> getBorderHalfEdge(CornerAttribute<int> &ca) const {
std::vector<int> 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]);
Expand All @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions src/triToQuadRegion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,24 +191,24 @@ void process(Triangles &triangle, Quads &quad, FacetAttribute<int> &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<std::string, int> idVerticeFromKey = std::map<std::string, int>();
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 &region : 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);
}

Expand Down

0 comments on commit 296d71e

Please sign in to comment.