James Harton
ad8f6c44ef
It turns out that G-code is a turing complete programming language. That was a surprise! I've implemented enough of the parser to be able to parse the output of Fusion 360 and Cura, both of which I use on a daily basis. It is not a complete implementation.
17 lines
292 B
Elixir
17 lines
292 B
Elixir
defmodule FixtureHelper do
|
|
@moduledoc false
|
|
|
|
def read_fixture(name) do
|
|
name
|
|
|> fixture_path()
|
|
|> File.read!()
|
|
end
|
|
|
|
def fixture_path(name),
|
|
do:
|
|
:gcode
|
|
|> :code.priv_dir()
|
|
|> List.to_string()
|
|
|> Path.join("fixtures")
|
|
|> Path.join(name)
|
|
end
|