Fix: Curve to mesh node assert when last profile segment is vector

We need to always add a single point to the last cyclic segment that
completes the loop, because that includes the starting point of the
evaluated edge. The existing code forgot about that point.
This commit is contained in:
Hans Goudey 2021-05-07 18:16:15 -05:00
parent 3185084efb
commit e46b9de6ab
1 changed files with 1 additions and 1 deletions

View File

@ -204,7 +204,7 @@ int BezierSpline::evaluated_points_size() const
const int last_offset = this->control_point_offsets().last();
if (is_cyclic_ && points_len > 1) {
return last_offset + (this->segment_is_vector(points_len - 1) ? 0 : resolution_);
return last_offset + (this->segment_is_vector(points_len - 1) ? 1 : resolution_);
}
return last_offset + 1;