polychemprint3.sequence.GCodeFileInkscape module

Parameterized code for reading in a gcode file and reprocessing for PCP3

First created on 2020/05/14 18:16:00
Revised: 2020/12/17
Author: Bijal Patel
class polychemprint3.sequence.GCodeFileInkscape.GCodeFileInkscape(axes: polychemprint3.axes.axes3DSpec.Axes3DSpec = <polychemprint3.axes.nullAxes.nullAxes object>, tool: polychemprint3.tools.toolSpec.toolSpec = <polychemprint3.tools.nullTool.nullTool object>, **kwargs)

Bases: polychemprint3.sequence.sequenceSpec.sequenceSpec

Sequence template for importing GCODE motion commands and tool triggers into PCP Recipe framework

genSequence()

Loads print sequence into a list into cmdList attribute.

Returns:Whether successfully reached the end or not.
Return type:bool
importFromGFile()

Attempts to read line by line from GcodeFile at GCodeFilePath and return the read lines as a list.

Returns:
  • bool – True if read from file without an error.
  • list of str – A list containing each line read in as a separate str element.
insertToolCode(procGlines)

Augments procGlines with tool on/off/trv values based on the z-carriage height.

Returns:fullLines – The combined list of Gcode and tool commands.
Return type:list of str
loadLogSelf(logString)

loads log back into dict.

Parameters:logString (String) – log string to be loaded back in
processGCode(GLines)

Parses each line in Glines to remove unusable commands and reconstitutes motion, feed strings with the rates the user provides in the CLI.

Returns:procGlines – A list of GCode lines processed to remove garbage and include user-specified feeds, z height.
Return type:list of str
writeLogSelf()

Generates log string containing dict to be written to log file.

Returns:log in string format
Return type:String