Skip to content

Commit

Permalink
ci: add debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
lbinria committed Jul 30, 2024
1 parent ad2824e commit 45d98c4
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/borderOrientation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ 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);

for (int i = 0; i < borderVertices.size(); i++) {
Expand All @@ -85,8 +87,12 @@ 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 Down
19 changes: 18 additions & 1 deletion src/intersectData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,42 @@ 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 = regionFacet[f.opposite().facet()];
if (f.opposite() == -1) {
// 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) {
for (auto halfedge: verticesIntersect.iter_halfedges()) {
if (halfedge.next().next().next().opposite() == -1 ) {
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
7 changes: 7 additions & 0 deletions src/triToQuadRegion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,17 +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 45d98c4

Please sign in to comment.