Skip to content

Commit 5dd8bda

Browse files
committed
LineJoin and LayerJoin get same arguments as LineEnd and LayerEnd
1 parent fb31884 commit 5dd8bda

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

vpype_gcode/gwrite.py

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,22 @@ def gwrite(document: vp.Document, output: typing.TextIO, profile: str):
217217
)
218218
)
219219
if line_join is not None and lines_index != lastlines_index:
220-
output.write(line_join)
220+
output.write(
221+
line_join.format(
222+
x=last_x,
223+
y=last_y,
224+
ix=xx,
225+
iy=yy,
226+
index=lines_index,
227+
index1=lines_index + 1,
228+
lines_index=lines_index,
229+
lines_index1=lines_index + 1,
230+
layer_index=layer_index,
231+
layer_index1=layer_index + 1,
232+
layer_id=layer_id,
233+
filename=filename,
234+
)
235+
)
221236
if layer_end is not None:
222237
output.write(
223238
layer_end.format(
@@ -234,7 +249,20 @@ def gwrite(document: vp.Document, output: typing.TextIO, profile: str):
234249
)
235250
)
236251
if layer_join is not None and layer_index != lastlayer_index:
237-
output.write(layer_join)
252+
output.write(
253+
layer_join.format(
254+
x=last_x,
255+
y=last_y,
256+
ix=xx,
257+
iy=yy,
258+
index=layer_index,
259+
index1=layer_index + 1,
260+
layer_index=layer_index,
261+
layer_index1=layer_index + 1,
262+
layer_id=layer_id,
263+
filename=filename,
264+
)
265+
)
238266
if document_end is not None:
239267
output.write(document_end.format(filename=filename))
240268
output.flush()

0 commit comments

Comments
 (0)