/// src/path.h // // Copyright (C) 2026 by Martin Michalec // // SPDX-License-Identifier: MIT // /// Commentary: // /// Code: #ifndef INCLUDED_PATH_H #define INCLUDED_PATH_H #include "utils.h" #include "rs274ngc_cst.h" #include "vec2.h" #define PEF_TRAVERSING (1 << 0) // 0 means technological #define PEF_ARC (1 << 1) // 0 means line #define PEF_CCW (1 << 2) // 0 means CW #define PEF_RELATIVE (1 << 3) // 0 means absolute #define PEF_INCH (1 << 4) // 0 means mm // ... struct path_element { struct sv line; double x, y; // end coords (abs mm) double f; // feed rate (mm/s) double i, j; // centers for arcs (abs mm) int flags; }; struct path { struct path_element *items; uint32_t count; uint32_t capacity; double initial_x; double initial_y; }; struct path build_path (struct rs274ngc_cst_parser parser); struct vec2 path_element_start (const struct path *, const struct path_element *); #endif // INCLUDED_PATH_H /// src/path.h ends here