{"action":"opened","issue":{"url":"https://api.github.com/repos/alexrj/Slic3r/issues/3574","repository_url":"https://api.github.com/repos/alexrj/Slic3r","labels_url":"https://api.github.com/repos/alexrj/Slic3r/issues/3574/labels{/name}","comments_url":"https://api.github.com/repos/alexrj/Slic3r/issues/3574/comments","events_url":"https://api.github.com/repos/alexrj/Slic3r/issues/3574/events","html_url":"https://github.com/alexrj/Slic3r/issues/3574","id":189127991,"number":3574,"title":"Custom G-code: wrong extruder IDs injected","user":{"login":"platsch","id":4190756,"avatar_url":"https://avatars.githubusercontent.com/u/4190756?v=3","gravatar_id":"","url":"https://api.github.com/users/platsch","html_url":"https://github.com/platsch","followers_url":"https://api.github.com/users/platsch/followers","following_url":"https://api.github.com/users/platsch/following{/other_user}","gists_url":"https://api.github.com/users/platsch/gists{/gist_id}","starred_url":"https://api.github.com/users/platsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platsch/subscriptions","organizations_url":"https://api.github.com/users/platsch/orgs","repos_url":"https://api.github.com/users/platsch/repos","events_url":"https://api.github.com/users/platsch/events{/privacy}","received_events_url":"https://api.github.com/users/platsch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-14T14:38:54Z","updated_at":"2016-11-14T14:38:54Z","closed_at":null,"body":"### Version\r\n1.3.0 dev\r\n\r\n### Behavior\r\nThe placeholder variable for extruder IDs e.g. for tool change G-code are directly evaluated to the config values, starting with 1. This behavior makes it impossible to use placeholders as gcode variables, since the firmware counts extruders starting with 0.\r\n`[previous_extruder]` and `[next_extruder]` are correctly replaced, i.e. starting with 0.\r\n\r\nExample:\r\n`;perimeter_extruder: [perimeter_extruder]` -> 1\r\n`;previous_extruder: [previous_extruder]` -> 0\r\nbut both are actually the same extruder.\r\n\r\nThe reason is, that `GCode::set_extruder` explicitly injects the correct \"special\" variables but directly imports all settings via `PlaceholderParser::process`."}}
{"actor":{"display_login":"platsch"}}