Skip to content

Conversation

Copy link

Copilot AI commented Dec 2, 2025

The C1 surface creation algorithm was modified to use centroid-based polygon detection with inner/outer point separation, which didn't match expected behavior. Users expect simple sequential connections based on point IDs.

Changes

  • Reverted CreateurSurfaceC1::creerSurfaces() to original algorithm: sort points by ID, connect sequentially, close polygon
// Before: complex centroid/angle-based polygon with inner point connections
// After: simple ID-ordered closed polygon
sort(pts.begin(), pts.end(), [](Point* a, Point* b){ return a->getId() < b->getId(); });
for (size_t i = 0; i + 1 < pts.size(); ++i) {
    segs.push_back({ pts[i]->x(), pts[i]->y(), pts[i+1]->x(), pts[i+1]->y() });
}
segs.push_back({ pts.back()->x(), pts.back()->y(), pts.front()->x(), pts.front()->y() });

The nuage display format changes (using "elements" vs "points" based on content type) are preserved.

Original prompt

remet l'algorithme de dessin de c1 la modification que tu as fait ne correspond pas a mes attentes a l'execution mais l'Autre que tu as faite pour avoir > a
Liste:
0: (2,0) textures: 'o#'
1: (28,8) textures: '#'
2: (28,0) textures: '#'
3: (2,8) textures: 'o#'
4: (15,16) textures: 'o#'
5: Nuage 'o' contient les points: 0 3 4
6: Nuage '#' contient les elements: 1 2 5 est correcte


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Dec 2, 2025
Co-authored-by: Kojo-san <179737549+Kojo-san@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor drawing algorithm to meet expectations Revert C1 surface algorithm to simple ID-based ordering Dec 2, 2025
Copilot AI requested a review from Kojo-san December 2, 2025 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants