include first point for bezier length
This commit is contained in:
parent
ad7d62d13e
commit
b5feaa6678
1 changed files with 1 additions and 1 deletions
|
@ -132,7 +132,7 @@ def calc_bezier_length(bezier_point_1, bezier_point_2, resolution=20):
|
|||
step = 1/resolution
|
||||
previous_p = bezier_point_1.co
|
||||
length = 0
|
||||
for i in range(0, resolution):
|
||||
for i in range(-1, resolution):
|
||||
t = (i + 1) * step
|
||||
p = calc_point_on_bezier(bezier_point_1, bezier_point_2, t)
|
||||
length += (p - previous_p).length
|
||||
|
|
Loading…
Reference in a new issue