mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 15:44:12 -06:00
Fixed numerical issue with the new algorithm to connect infill lines
with perimeters: 1) Increased accuracy of the contour length parametrization from float to double, as double should capture the difference of 32bit coord_t with full accuracy (or at least very close). 2) The algorithm to insert the T-joint points into the infill perimeter contour was improved to avoid inserting duplicate points.
This commit is contained in:
parent
3c9f3d2b66
commit
93a5906a18
2 changed files with 106 additions and 97 deletions
|
@ -37,7 +37,7 @@ protected:
|
|||
|
||||
bool _can_connect(coord_t dist_X, coord_t dist_Y)
|
||||
{
|
||||
coord_t TOLERANCE = 10 * SCALED_EPSILON;
|
||||
const auto TOLERANCE = coord_t(10 * SCALED_EPSILON);
|
||||
return (dist_X >= (this->_line_spacing - this->_line_oscillation) - TOLERANCE)
|
||||
&& (dist_X <= (this->_line_spacing + this->_line_oscillation) + TOLERANCE)
|
||||
&& (dist_Y <= this->_diagonal_distance);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue