{"id":28561706,"url":"https://github.com/ultimaker/ghermeneus","last_synced_at":"2025-09-12T13:39:34.834Z","repository":{"id":150850524,"uuid":"266094160","full_name":"Ultimaker/GHermeneus","owner":"Ultimaker","description":"Fast g-code parser","archived":false,"fork":false,"pushed_at":"2020-10-18T20:12:52.000Z","size":8917,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-08-29T21:59:39.347Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"G-code","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ultimaker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-05-22T11:29:37.000Z","updated_at":"2025-06-03T11:07:06.000Z","dependencies_parsed_at":"2023-04-16T06:00:31.894Z","dependency_job_id":null,"html_url":"https://github.com/Ultimaker/GHermeneus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ultimaker/GHermeneus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ultimaker%2FGHermeneus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ultimaker%2FGHermeneus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ultimaker%2FGHermeneus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ultimaker%2FGHermeneus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ultimaker","download_url":"https://codeload.github.com/Ultimaker/GHermeneus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ultimaker%2FGHermeneus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273654775,"owners_count":25144756,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-10T11:15:36.296Z","updated_at":"2025-09-12T13:39:34.823Z","avatar_url":"https://github.com/Ultimaker.png","language":"G-code","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GHermeneus\n\nIs intended as a fast GCode interpreter.\n\nGCode is read from a stream where each command updates the state of the machine (3D printer), these states are then\nfunneled to an output stream, such as a numpy array. Which can later be used in statistical analysis, which allows\nus to see the difference between Cura settings, versions, materials or even different slicers.\n\nIt could also be used to generate the date for the Cura preview, allowing this data to be run on multiple processors,\nand freeing the GIL (Global Interpreter Lock).\n\n## Work-In-Progess\n\nThis library is currently very much a work in progress and subject to heavy changes.\n\n## State-Space Representation of the dynamics\n\nA machine can have multiple tools, each tool is represented by a state vector. This vector const of the position, velocity\nextrusion speed, temperature etc.\n\n\u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=\\vec{x}_k\u0026space;=\u0026space;[x,\u0026space;y,\u0026space;z,\u0026space;\\dot{x},\u0026space;\\dot{y},\u0026space;\\dot{z},\u0026space;e,\u0026space;\\dot{e},\u0026space;T_t,\u0026space;T_b,\u0026space;t]\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/gif.latex?\\vec{x}_k\u0026space;=\u0026space;[x,\u0026space;y,\u0026space;z,\u0026space;\\dot{x},\u0026space;\\dot{y},\u0026space;\\dot{z},\u0026space;e,\u0026space;\\dot{e},\u0026space;T_t,\u0026space;T_b,\u0026space;t]\" title=\"\\vec{x}_k = [x, y, z, \\dot{x}, \\dot{y}, \\dot{z}, e, \\dot{e}, T_t, T_b, t]\" /\u003e\u003c/a\u003e\n\n - x = coordinates on x-axis\n - y = coordinates on x-axis\n - z = coordinates on x-axis\n - x_dot = velocity on x-axis\n - y_dot = velocity on x-axis\n - z_dot = velocity on x-axis\n - e = position on the extrusion axis\n - e_dot = velocity on the extrusion axis\n - T_t = Temperature of the tool\n - T_b = Temperature of the bed (maybe this should be placed in an other type)\n - t = time at given GCode command\n\nEach GCode command represents a control input \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=\\vec{u}_k\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/gif.latex?\\vec{u}_k\" title=\"\\vec{u}_k\" /\u003e\u003c/a\u003e on the tools system, coupled with a State transition matrix\n\u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=\\mathbf{F}\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/gif.latex?\\mathbf{F}\" title=\"\\mathbf{F}\" /\u003e\u003c/a\u003e, allows us to transform state vector to time \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=k\u0026space;\u0026plus;\u0026space;1\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/gif.latex?k\u0026space;\u0026plus;\u0026space;1\" title=\"k + 1\" /\u003e\u003c/a\u003e\n\n## GCode processing\n\nThe GCode is read from the stream and only handled as std::string_views, this eliminates unwanted copying of strings.\nSince we don't need to manipulate the text data.\n\nhttps://www.modernescpp.com/index.php/c-17-avoid-copying-with-std-string-view\n\nGcode string_views are then processed using the [ranges-v3](https://github.com/ericniebler/range-v3) library, which allows for lazy execution. Each line is split\nin a command and comment. The command is then split in to words. Resulting in there basic command, such as G0, G1, M140\netc. then the parameters are checked, such as X100, Y20, S65 etc. This will result in a certain characteristic which is\nmapped against a known set of control vector and state transition matrix, from which a type is deduced, eq an [Eigen3](http://eigen.tuxfamily.org/index.php?title=Main_Page)\nMatrix with certain dimensions. This type is instantiated with the parameters and placed in the machine que. Where the\nstate transitions are processed using std::async algorithms and consumed by the output stream.\n\nhttps://www.modernescpp.com/index.php/multithreading-in-c-17-and-c-20\n\n\n## Build\n\nThis library makes heavy use of C++17 feautures.\n\nThis library is also intended as an investigation in the usability of [Conan](https://conan.io/) for Ultimaker C++ packages.\nCheck the latest [Conan docs](https://docs.conan.io/en/latest/) for usage and build instructions. When you're developing on Clion it is advised to use [Conan-plugin](https://blog.jetbrains.com/clion/2019/05/getting-started-with-the-conan-clion-plugin/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fultimaker%2Fghermeneus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fultimaker%2Fghermeneus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fultimaker%2Fghermeneus/lists"}