From 62df53f86eccb04132e975e5a812fd1d740ff323 Mon Sep 17 00:00:00 2001 From: "zhimin.zeng" Date: Thu, 30 Mar 2023 15:05:13 +0800 Subject: [PATCH] FIX: A mesh with overlapping faces cannot be painted STUDIO-2591 Change-Id: Iad566cdc45d123b5c8342c732c0dc964c261753a (cherry picked from commit eb9f7297e0ea0557b32e5f59c3a91692ac8afa5b) --- src/libslic3r/SLA/IndexedMesh.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/libslic3r/SLA/IndexedMesh.cpp b/src/libslic3r/SLA/IndexedMesh.cpp index 07c4203ab..cd1c28278 100644 --- a/src/libslic3r/SLA/IndexedMesh.cpp +++ b/src/libslic3r/SLA/IndexedMesh.cpp @@ -184,10 +184,11 @@ IndexedMesh::query_ray_hits(const Vec3d &s, const Vec3d &dir) const // Remove duplicates. They sometimes appear, for example when the ray is cast // along an axis of a cube due to floating-point approximations in igl (?) - hits.erase(std::unique(hits.begin(), hits.end(), - [](const igl::Hit& a, const igl::Hit& b) - { return a.t == b.t; }), - hits.end()); + // BBS: STUDIO-2591 A mesh with overlapping faces cannot be painted + //hits.erase(std::unique(hits.begin(), hits.end(), + // [](const igl::Hit& a, const igl::Hit& b) + // { return a.t == b.t; }), + // hits.end()); // Convert the igl::Hit into hit_result outs.reserve(hits.size());