Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Svg2Gcode/Svg/Paths/PathShapeParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ private IEnumerable<PathCommand> parse(string data)
skipWhiteSpace = false;
if (char.IsLetter(commandKey) && commandKey != 'e') // new command
{
var arg = builder.ToString();
if (!string.IsNullOrEmpty(arg))
arguments.Add(arg);

if (i > 0) // process the previous command
{
ICommandParser parser = getParser(previousCommandKey);
Expand All @@ -47,6 +51,7 @@ private IEnumerable<PathCommand> parse(string data)

previousCommandKey = commandKey;
arguments.Clear();
builder.Clear();
skipWhiteSpace = true;
}
else if (commandKey == ' ' || commandKey == ',')
Expand Down