Open
Description
Hello! I'm trying to use vpype-gcode with a controller that is expecting commands to tell it to travel to a point and draw a line. Essentially the "point" function is used as a G0 command, and the "line" function is used as a G1 command. The point command is easily solved with "segment_first", but the line command needs to look like the following:
line((start_x, start_y), (end_x, end_y), speed = 4)
Right now my custom profile looks like this:
[gwrite.pewpew]
document_start = ""
segment_first = "point(({x:.4f},{y:.4f}), delay = 0.25, burn = 0)\n"
segment = "line(({x:.4f},{y:.4f}),({x:.4f},{y:.4f}), speed = 4)\n"
document_end = ""
unit = "in"
invert_y = true
info= "This gcode profile is correctly inverted across the y-axis"
The problem is that the segment cannot (as far as I can tell) refer to the coordinates of the previous segment, so I end up making a zero length line at the coordinates of the current segment. Ideally my toml would have the following:
segment = "line(({prev_x:.4f},{prev_y:.4f}),({x:.4f},{y:.4f}), speed = 4)\n"
Is there a way to do this in vpype-gcode or is this outside of the capabilities of the project currently?
Metadata
Metadata
Assignees
Labels
No labels