minor modification
This commit is contained in:
parent
b70b05377f
commit
bef6559c59
480
code/WCM0007.svg
480
code/WCM0007.svg
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 401 KiB After Width: | Height: | Size: 401 KiB |
@ -69,6 +69,7 @@ Currently it ignores the linewidth so it generates constant width paths
|
|||||||
xData : array with arrays of x coordinates
|
xData : array with arrays of x coordinates
|
||||||
yData : array with arrays of y coordinates
|
yData : array with arrays of y coordinates
|
||||||
lineData : array with arrays of lineWhidths
|
lineData : array with arrays of lineWhidths
|
||||||
|
skips : number of spline control points to skip
|
||||||
|
|
||||||
TODO: Take linewidhts into consideration
|
TODO: Take linewidhts into consideration
|
||||||
"""
|
"""
|
||||||
@ -82,7 +83,8 @@ TODO: Take linewidhts into consideration
|
|||||||
|
|
||||||
for arrayX, arrayY in zip(xData, yData):
|
for arrayX, arrayY in zip(xData, yData):
|
||||||
svgStr += f'<path stroke="black" fill="none" d="M{arrayX[0]},{arrayY[0]} '
|
svgStr += f'<path stroke="black" fill="none" d="M{arrayX[0]},{arrayY[0]} '
|
||||||
for x, y, idx in zip(arrayX[1:], arrayY[1:], range(len(arrayX)-1)):
|
idx = range(len(arrayX))
|
||||||
|
for x, y, idx in zip(arrayX[1:], arrayY[1:], idx[1:]):
|
||||||
if idx%3 == 0:
|
if idx%3 == 0:
|
||||||
svgStr = svgStr[:-1] + f' C'
|
svgStr = svgStr[:-1] + f' C'
|
||||||
svgStr += f'{x} {y},'
|
svgStr += f'{x} {y},'
|
||||||
|
Loading…
Reference in New Issue
Block a user