Skip to content

Commit 7bbbe1c

Browse files
committed
Fix off by one error in shape rounding
1 parent fdd1062 commit 7bbbe1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vpython/shapespaths.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def roundc(cps, roundness=0.1, invert=False, nseg=16):
7070
v = p1 - center
7171
dtheta = -dtheta
7272

73-
for j in range(nseg):
73+
for j in range(1,nseg): # don't repeat the starting point of this arc
7474
v1 = center + v.rotate(j*dtheta)
7575
ncp.append([v1.x, v1.y])
7676

0 commit comments

Comments
 (0)