2021-05-02 17:18:49 +00:00
|
|
|
|
|
|
|
def main_block (x,y, xpoint,ypoint,sl,pl,gl,tgl,right_bottom_stitches,width_stitches,height_stitches):
|
|
|
|
#start of main block
|
|
|
|
tl=0
|
|
|
|
|
|
|
|
#move from start to bottom right corner
|
|
|
|
for i in range(0,right_bottom_stitches):
|
|
|
|
xpoint.append(x)
|
|
|
|
ypoint.append(y)
|
2021-06-18 15:16:20 +00:00
|
|
|
x += sl;
|
|
|
|
tl += sl;
|
2021-05-02 17:18:49 +00:00
|
|
|
|
|
|
|
#step upwards 2 gap lengths
|
|
|
|
for step in range(0,2):
|
|
|
|
xpoint.append(x)
|
|
|
|
ypoint.append(y)
|
2021-06-18 15:16:20 +00:00
|
|
|
y += gl;
|
|
|
|
tl += gl;
|
2021-05-02 17:18:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
#repeating columns for main block
|
|
|
|
for i in range(0,width_stitches):
|
|
|
|
for i in range (0,height_stitches):
|
|
|
|
xpoint.append(x)
|
|
|
|
ypoint.append(y)
|
2021-06-18 15:16:20 +00:00
|
|
|
y += sl;
|
|
|
|
tl += sl;
|
2021-05-02 17:18:49 +00:00
|
|
|
xpoint.append(x)
|
|
|
|
ypoint.append(y)
|
2021-06-18 15:16:20 +00:00
|
|
|
x -= gl;
|
|
|
|
tl += gl;
|
2021-05-02 17:18:49 +00:00
|
|
|
for i in range(0,height_stitches):
|
|
|
|
xpoint.append(x)
|
|
|
|
ypoint.append(y)
|
2021-06-18 15:16:20 +00:00
|
|
|
y -= sl;
|
|
|
|
tl += sl;
|
2021-05-02 17:18:49 +00:00
|
|
|
xpoint.append(x)
|
|
|
|
ypoint.append(y)
|
2021-06-18 15:16:20 +00:00
|
|
|
x -= gl;
|
|
|
|
tl += gl;
|
2021-05-02 17:18:49 +00:00
|
|
|
#end of while loop, vertical tabs done
|
|
|
|
|
|
|
|
x=x+gl; #cancel x jump of last loop
|
|
|
|
|
|
|
|
for step in range(0,2):
|
|
|
|
xpoint.append(x)
|
|
|
|
ypoint.append(y)
|
2021-06-18 15:16:20 +00:00
|
|
|
y -= gl; #step down to start return path
|
|
|
|
tl += gl;
|
2021-05-02 17:18:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
#return to left terminal pad
|
|
|
|
while x < -pl-tgl:
|
|
|
|
#for i in range(0,left_bottom_stitches):
|
|
|
|
xpoint.append(x)
|
|
|
|
ypoint.append(y)
|
2021-06-18 15:16:20 +00:00
|
|
|
x += sl;
|
|
|
|
tl += sl;
|
2021-05-02 17:18:49 +00:00
|
|
|
#print(xpoint)
|
|
|
|
return(x,y, xpoint,ypoint,tl)
|