jminardi/mecode

Visualization failure with no first move Z

danfitz7 opened this issue · 2 comments

Sometimes the rendered g code view will not have any lines when the Z coordinate of the first move is unspecified.
See Gist: https://gist.github.com/danfitz7/196dbe75051ea3c34dcc

See z coordinate on fourth-to-last line.

https://github.com/jminardi/mecode/blob/master/mecode/main.py#L788-L791 ?

We append a 'z' without it definitely being defined.

self.current_position is a defaultdict, which means if you try to read a key that doesn't exists a default value will be returned to the caller and stored under that key.

https://github.com/jminardi/mecode/blob/master/mecode/main.py#L136