mirror of
https://github.com/Nexoniarz/Fry3DX.git
synced 2026-11-03 12:34:27 +00:00
Editable cuts: Object > Cut out, editable: the cutters stay objects (see-through red), moved or changed and the hole follows; they go with what they cut when it's moved; Apply makes one or all for good; saved; exported and printed with the cut made; tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f9ba30ab3d
commit
5394eeb3d8
4 changed files with 202 additions and 14 deletions
11
src/scene.h
11
src/scene.h
|
|
@ -66,6 +66,9 @@ struct Object {
|
|||
int smoothLevels = 0;
|
||||
bool smoothKeepSharp = false;
|
||||
std::set<std::pair<int, int>> creases; // edges (points, the lower first) smoothing keeps sharp
|
||||
// An editable cut: this object is taken out of that one (its id), and stays an object you can
|
||||
// move and change (the hole follows); shown see-through, not exported or printed itself.
|
||||
uint32_t cuts = 0;
|
||||
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.
|
||||
|
|
@ -138,6 +141,14 @@ struct Scene {
|
|||
uint32_t nextId = 1;
|
||||
};
|
||||
|
||||
// Editable cuts: whether something's cut out of it, and it with them cut out (and its finishing
|
||||
// touches; only the mirror with mirrorOnly) in its own space. The scene with each cut made for
|
||||
// good and its cutters hidden, for exporting.
|
||||
const Object* cutTarget(const Scene& s, const Object& cutter); // (what it cuts, if it's there)
|
||||
bool hasCuts(const Scene& s, const Object& o);
|
||||
Mesh cutMesh(const Scene& s, const Object& o, bool mirrorOnly = false);
|
||||
Scene withCutsMade(const Scene& s);
|
||||
|
||||
// Materials to start from: a colour (unless `keepColor`: only how metal and rough it is) and
|
||||
// how metal and rough. Shown in the view (Solid and Rendered) and exported with the object.
|
||||
struct MaterialPreset {
|
||||
|
|
|
|||
Loading…
Reference in a new issue