Skip to content

Commit a921fb3

Browse files
committed
Fix projection of degenerate triangles
CURA-12766 Increasing the epsilon to 0.0001 seems to be enough in practice, so setting 0.001 to have some margin. A value of 0.1 also doesn't seem to cause any trouble, so this change should not hurt. To be confirmed on different platforms.
1 parent 58b5a5f commit a921fb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/project.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ std::optional<std::vector<Point3F>> getBarycentricCoordinates(const Polygon& pol
6767
const double denom = d00 * d11 - d01 * d01;
6868

6969
// Check if triangle is degenerate
70-
constexpr double epsilon_triangle_cross_products = 0.000001;
70+
constexpr double epsilon_triangle_cross_products = 0.001;
7171
if (std::abs(denom) < epsilon_triangle_cross_products)
7272
{
7373
return std::nullopt;

0 commit comments

Comments
 (0)