Remapping the paintings after cut

This commit is contained in:
Noisyfox
2026-05-04 20:32:39 +08:00
parent ded2e72dcc
commit 24458ba5a2
4 changed files with 349 additions and 24 deletions

View File

@@ -372,6 +372,13 @@ public:
// The operation may merge split triangles if they are being assigned the same color.
void seed_fill_apply_on_triangles(EnforcerBlockerType new_state);
// Remap painting data from source mesh to target mesh using spatial mapping.
// Both meshes must be in the same coordinate space.
static TriangleSplittingData remap_painting(
const indexed_triangle_set& source_its,
const TriangleSplittingData& source_painting,
const indexed_triangle_set& target_its);
protected:
// Triangle and info about how it's split.
class Triangle {
@@ -521,11 +528,10 @@ private:
int m_free_triangles_head { -1 };
int m_free_vertices_head { -1 };
friend class TriangleCursor;
};
} // namespace Slic3r
#endif // libslic3r_TriangleSelector_hpp_