|
|
@@ -526,8 +526,16 @@ get_connected_segments(RopeNode::CurveSegments &curve_segments,
|
|
|
LPoint3 point;
|
|
|
result->eval_segment_point(segment, 0.0f, point);
|
|
|
|
|
|
+ // We need a bit more relaxed threshold to prevent breaks between
|
|
|
+ // segments, see GitHub issue #1325.
|
|
|
+#ifdef STDFLOAT_DOUBLE
|
|
|
+ static const double threshold = 1.0e-8;
|
|
|
+#else
|
|
|
+ static const float threshold = 1.0e-4f;
|
|
|
+#endif
|
|
|
+
|
|
|
if (curve_segment == nullptr ||
|
|
|
- !point.almost_equal(last_point)) {
|
|
|
+ !point.almost_equal(last_point, threshold)) {
|
|
|
// If the first point of this segment is different from the last point
|
|
|
// of the previous segment, end the previous segment and begin a new
|
|
|
// one.
|