Crease (Shift+E): picked edges stay sharp when the shape's smoothed (carried through each level and the mirror; saved); shown in magenta; tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Nexoniarz 2026-10-21 07:58:43 +02:00
commit ab554f277f
6 changed files with 108 additions and 6 deletions

View file

@ -10,6 +10,7 @@
#include <cstdint>
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <string_view>
#include <vector>
@ -64,6 +65,7 @@ struct Object {
int roundSteps = 3;
int smoothLevels = 0;
bool smoothKeepSharp = false;
std::set<std::pair<int, int>> creases; // edges (points, the lower first) smoothing keeps sharp
bool hasFinish() const { return mirror || round > 0.0f || smoothLevels > 0; }
// A painted picture on it: where each face corner sits on it (0..1), and the picture
// (shared with the undo steps until it's painted on again). Saved beside the .fry as a PNG.