{"action":"created","comment":{"url":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/comments/217059874","pull_request_review_id":154683581,"id":217059874,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzA1OTg3NA==","diff_hunk":"@@ -61,38 +65,38 @@ void SpaghettiInfill::generateTotalSpaghettiInfill(SliceMeshStorage& mesh)\n \n void SpaghettiInfill::generateSpaghettiInfill(SliceMeshStorage& mesh)\n {\n-    const bool total_volume_at_once = !mesh.getSettingBoolean(\"spaghetti_infill_stepped\");\n+    const bool total_volume_at_once = !mesh.settings.get<bool>(\"spaghetti_infill_stepped\");\n \n     if (total_volume_at_once)\n     {\n         generateTotalSpaghettiInfill(mesh);\n         return;\n     }\n \n-    const coord_t line_width = mesh.getSettingInMicrons(\"infill_line_width\");\n-    coord_t spaghetti_max_height = mesh.getSettingInMicrons(\"spaghetti_max_height\");\n+    const coord_t line_width = mesh.settings.get<coord_t>(\"infill_line_width\");\n+    coord_t spaghetti_max_height = mesh.settings.get<coord_t>(\"spaghetti_max_height\");\n \n-    coord_t filling_area_inset = mesh.getSettingInMicrons(\"spaghetti_inset\");\n+    coord_t filling_area_inset = mesh.settings.get<coord_t>(\"spaghetti_inset\");\n     \n     coord_t connection_inset_dist;\n-    if (mesh.getSettingInAngleDegrees(\"spaghetti_max_infill_angle\") >= 90)\n+    if (mesh.settings.get<AngleDegrees>(\"spaghetti_max_infill_angle\") >= 90)\n     {\n         connection_inset_dist = MM2INT(500); // big enough for all standard printers.\n     }\n     else\n     {\n-        connection_inset_dist = tan(mesh.getSettingInAngleRadians(\"spaghetti_max_infill_angle\")) * mesh.getSettingInMicrons(\"layer_height\"); // Horizontal component of the spaghetti_max_infill_angle\n+        connection_inset_dist = tan(mesh.settings.get<AngleRadians>(\"spaghetti_max_infill_angle\")) * mesh.settings.get<coord_t>(\"layer_height\"); // Horizontal component of the spaghetti_max_infill_angle\n     }\n \n     std::list<SpaghettiInfill::InfillPillar> pillar_base;\n     coord_t current_z = 0;\n \n-    size_t max_layer = mesh.layers.size() - 1 - mesh.getSettingAsCount(\"top_layers\");\n-    for (size_t layer_idx = 0; layer_idx <= max_layer; layer_idx++) //Skip every few layers, but extrude more.\n+    LayerIndex max_layer = mesh.layers.size() - 1 - mesh.settings.get<size_t>(\"top_layers\");\n+    for (LayerIndex layer_idx = 0; layer_idx <= max_layer; layer_idx++) //Skip every few layers, but extrude more.\n     {\n-        const coord_t layer_height = (layer_idx == 0)? mesh.getSettingInMicrons(\"layer_height_0\") : mesh.getSettingInMicrons(\"layer_height\");\n+        const coord_t layer_height = (layer_idx == 0)? mesh.settings.get<coord_t>(\"layer_height_0\") : mesh.settings.get<coord_t>(\"layer_height\");\n         current_z += layer_height;\n-        if (static_cast<int>(layer_idx) < mesh.getSettingAsCount(\"bottom_layers\"))\n+        if (layer_idx < static_cast<LayerIndex>(mesh.settings.get<size_t>(\"bottom_layers\")))","path":"src/infill/SpaghettiInfill.cpp","position":81,"original_position":82,"commit_id":"0a00ecfff58425a96bcbe4840ea8916d794704a8","original_commit_id":"c760cceb7c272c4ee6282730ade9778d555dbaf4","user":{"login":"Ghostkeeper","id":2448634,"node_id":"MDQ6VXNlcjI0NDg2MzQ=","avatar_url":"https://avatars1.githubusercontent.com/u/2448634?v=4","gravatar_id":"","url":"https://api.github.com/users/Ghostkeeper","html_url":"https://github.com/Ghostkeeper","followers_url":"https://api.github.com/users/Ghostkeeper/followers","following_url":"https://api.github.com/users/Ghostkeeper/following{/other_user}","gists_url":"https://api.github.com/users/Ghostkeeper/gists{/gist_id}","starred_url":"https://api.github.com/users/Ghostkeeper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ghostkeeper/subscriptions","organizations_url":"https://api.github.com/users/Ghostkeeper/orgs","repos_url":"https://api.github.com/users/Ghostkeeper/repos","events_url":"https://api.github.com/users/Ghostkeeper/events{/privacy}","received_events_url":"https://api.github.com/users/Ghostkeeper/received_events","type":"User","site_admin":false},"body":"Because the setting is a number of layers (not a layer index), and then gets interpreted as \"when you're this many layers above the build plate then do blabla\". Layer indices are in the front-end displayed as 1-indexed, starting counting from 1. In the back-end we need to interpret this as 0-indexed, so if you were to get this as a layer index, you'd subtract 1 from the number of bottom layers which is not what you want.","created_at":"2018-09-12T14:39:59Z","updated_at":"2018-09-12T14:40:00Z","html_url":"https://github.com/Ultimaker/CuraEngine/pull/830#discussion_r217059874","pull_request_url":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/830","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/comments/217059874"},"html":{"href":"https://github.com/Ultimaker/CuraEngine/pull/830#discussion_r217059874"},"pull_request":{"href":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/830"}},"in_reply_to_id":215319533},"pull_request":{"url":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/830","id":209526188,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5NTI2MTg4","html_url":"https://github.com/Ultimaker/CuraEngine/pull/830","diff_url":"https://github.com/Ultimaker/CuraEngine/pull/830.diff","patch_url":"https://github.com/Ultimaker/CuraEngine/pull/830.patch","issue_url":"https://api.github.com/repos/Ultimaker/CuraEngine/issues/830","number":830,"state":"open","locked":false,"title":"Refactor singleton settingsbase","user":{"login":"jackha","id":1016604,"node_id":"MDQ6VXNlcjEwMTY2MDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1016604?v=4","gravatar_id":"","url":"https://api.github.com/users/jackha","html_url":"https://github.com/jackha","followers_url":"https://api.github.com/users/jackha/followers","following_url":"https://api.github.com/users/jackha/following{/other_user}","gists_url":"https://api.github.com/users/jackha/gists{/gist_id}","starred_url":"https://api.github.com/users/jackha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackha/subscriptions","organizations_url":"https://api.github.com/users/jackha/orgs","repos_url":"https://api.github.com/users/jackha/repos","events_url":"https://api.github.com/users/jackha/events{/privacy}","received_events_url":"https://api.github.com/users/jackha/received_events","type":"User","site_admin":false},"body":"Summary of the changes that were applied:\r\n\r\n* Added Application singleton class.\r\n* Moved communication with front-end from CommandSocket to ArcusCommunication.\r\n* Moved command-line slicing routine from main to CommandLine.\r\n* Added a Scene class, containing MeshGroups and ExtruderTrains. The scene is statically available through Application.\r\n* Moved settings from SettingsBaseVirtual to settings class. Settings are no longer included through inheritance in SliceMeshData and such. These settings classes are stored in every object of the scene (Scene, MeshGroup, ExtruderTrain and Mesh).\r\n* Added additional types for certain units, such as Velocity, Temperature, etc. Wherever I found that a variable represented that unit, I changed the type of that variable.\r\n* Removed the settings structure visualiser and streamlined the JSON loading code.\r\n* Instead of relying on the machine_extruder_count setting, it now uses the actual number of extruders in the scene everywhere (except when creating these extruders).\r\n* Added unit tests for Settings class and ArcusCommunication class.\r\n\r\n","created_at":"2018-08-20T13:45:18Z","updated_at":"2018-09-12T14:40:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"69174f990f707ea7ce1a294227118b6835fe2587","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/830/commits","review_comments_url":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/830/comments","review_comment_url":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ultimaker/CuraEngine/issues/830/comments","statuses_url":"https://api.github.com/repos/Ultimaker/CuraEngine/statuses/0a00ecfff58425a96bcbe4840ea8916d794704a8","head":{"label":"Ultimaker:refactor_singleton_settingsbase","ref":"refactor_singleton_settingsbase","sha":"0a00ecfff58425a96bcbe4840ea8916d794704a8","user":{"login":"Ultimaker","id":499557,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5OTU1Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/499557?v=4","gravatar_id":"","url":"https://api.github.com/users/Ultimaker","html_url":"https://github.com/Ultimaker","followers_url":"https://api.github.com/users/Ultimaker/followers","following_url":"https://api.github.com/users/Ultimaker/following{/other_user}","gists_url":"https://api.github.com/users/Ultimaker/gists{/gist_id}","starred_url":"https://api.github.com/users/Ultimaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ultimaker/subscriptions","organizations_url":"https://api.github.com/users/Ultimaker/orgs","repos_url":"https://api.github.com/users/Ultimaker/repos","events_url":"https://api.github.com/users/Ultimaker/events{/privacy}","received_events_url":"https://api.github.com/users/Ultimaker/received_events","type":"Organization","site_admin":false},"repo":{"id":8556864,"node_id":"MDEwOlJlcG9zaXRvcnk4NTU2ODY0","name":"CuraEngine","full_name":"Ultimaker/CuraEngine","owner":{"login":"Ultimaker","id":499557,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5OTU1Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/499557?v=4","gravatar_id":"","url":"https://api.github.com/users/Ultimaker","html_url":"https://github.com/Ultimaker","followers_url":"https://api.github.com/users/Ultimaker/followers","following_url":"https://api.github.com/users/Ultimaker/following{/other_user}","gists_url":"https://api.github.com/users/Ultimaker/gists{/gist_id}","starred_url":"https://api.github.com/users/Ultimaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ultimaker/subscriptions","organizations_url":"https://api.github.com/users/Ultimaker/orgs","repos_url":"https://api.github.com/users/Ultimaker/repos","events_url":"https://api.github.com/users/Ultimaker/events{/privacy}","received_events_url":"https://api.github.com/users/Ultimaker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Ultimaker/CuraEngine","description":"CuraEngine is a powerful, fast and robust engine for processing 3D models into 3D printing instruction for Ultimaker and other GCode based 3D printers. It is part of the larger open source project called \"Cura\".","fork":false,"url":"https://api.github.com/repos/Ultimaker/CuraEngine","forks_url":"https://api.github.com/repos/Ultimaker/CuraEngine/forks","keys_url":"https://api.github.com/repos/Ultimaker/CuraEngine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ultimaker/CuraEngine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ultimaker/CuraEngine/teams","hooks_url":"https://api.github.com/repos/Ultimaker/CuraEngine/hooks","issue_events_url":"https://api.github.com/repos/Ultimaker/CuraEngine/issues/events{/number}","events_url":"https://api.github.com/repos/Ultimaker/CuraEngine/events","assignees_url":"https://api.github.com/repos/Ultimaker/CuraEngine/assignees{/user}","branches_url":"https://api.github.com/repos/Ultimaker/CuraEngine/branches{/branch}","tags_url":"https://api.github.com/repos/Ultimaker/CuraEngine/tags","blobs_url":"https://api.github.com/repos/Ultimaker/CuraEngine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ultimaker/CuraEngine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ultimaker/CuraEngine/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ultimaker/CuraEngine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ultimaker/CuraEngine/statuses/{sha}","languages_url":"https://api.github.com/repos/Ultimaker/CuraEngine/languages","stargazers_url":"https://api.github.com/repos/Ultimaker/CuraEngine/stargazers","contributors_url":"https://api.github.com/repos/Ultimaker/CuraEngine/contributors","subscribers_url":"https://api.github.com/repos/Ultimaker/CuraEngine/subscribers","subscription_url":"https://api.github.com/repos/Ultimaker/CuraEngine/subscription","commits_url":"https://api.github.com/repos/Ultimaker/CuraEngine/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ultimaker/CuraEngine/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ultimaker/CuraEngine/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ultimaker/CuraEngine/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ultimaker/CuraEngine/contents/{+path}","compare_url":"https://api.github.com/repos/Ultimaker/CuraEngine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ultimaker/CuraEngine/merges","archive_url":"https://api.github.com/repos/Ultimaker/CuraEngine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ultimaker/CuraEngine/downloads","issues_url":"https://api.github.com/repos/Ultimaker/CuraEngine/issues{/number}","pulls_url":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls{/number}","milestones_url":"https://api.github.com/repos/Ultimaker/CuraEngine/milestones{/number}","notifications_url":"https://api.github.com/repos/Ultimaker/CuraEngine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ultimaker/CuraEngine/labels{/name}","releases_url":"https://api.github.com/repos/Ultimaker/CuraEngine/releases{/id}","deployments_url":"https://api.github.com/repos/Ultimaker/CuraEngine/deployments","created_at":"2013-03-04T14:12:08Z","updated_at":"2018-09-12T14:25:28Z","pushed_at":"2018-09-12T12:32:03Z","git_url":"git://github.com/Ultimaker/CuraEngine.git","ssh_url":"git@github.com:Ultimaker/CuraEngine.git","clone_url":"https://github.com/Ultimaker/CuraEngine.git","svn_url":"https://github.com/Ultimaker/CuraEngine","homepage":"https://ultimaker.com/en/products/cura-software","size":48576,"stargazers_count":727,"watchers_count":727,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":494,"mirror_url":null,"archived":false,"open_issues_count":71,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":494,"open_issues":71,"watchers":727,"default_branch":"master"}},"base":{"label":"Ultimaker:master","ref":"master","sha":"af1f1bf6c82bd046c5a31edd289ce291f1998678","user":{"login":"Ultimaker","id":499557,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5OTU1Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/499557?v=4","gravatar_id":"","url":"https://api.github.com/users/Ultimaker","html_url":"https://github.com/Ultimaker","followers_url":"https://api.github.com/users/Ultimaker/followers","following_url":"https://api.github.com/users/Ultimaker/following{/other_user}","gists_url":"https://api.github.com/users/Ultimaker/gists{/gist_id}","starred_url":"https://api.github.com/users/Ultimaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ultimaker/subscriptions","organizations_url":"https://api.github.com/users/Ultimaker/orgs","repos_url":"https://api.github.com/users/Ultimaker/repos","events_url":"https://api.github.com/users/Ultimaker/events{/privacy}","received_events_url":"https://api.github.com/users/Ultimaker/received_events","type":"Organization","site_admin":false},"repo":{"id":8556864,"node_id":"MDEwOlJlcG9zaXRvcnk4NTU2ODY0","name":"CuraEngine","full_name":"Ultimaker/CuraEngine","owner":{"login":"Ultimaker","id":499557,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5OTU1Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/499557?v=4","gravatar_id":"","url":"https://api.github.com/users/Ultimaker","html_url":"https://github.com/Ultimaker","followers_url":"https://api.github.com/users/Ultimaker/followers","following_url":"https://api.github.com/users/Ultimaker/following{/other_user}","gists_url":"https://api.github.com/users/Ultimaker/gists{/gist_id}","starred_url":"https://api.github.com/users/Ultimaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ultimaker/subscriptions","organizations_url":"https://api.github.com/users/Ultimaker/orgs","repos_url":"https://api.github.com/users/Ultimaker/repos","events_url":"https://api.github.com/users/Ultimaker/events{/privacy}","received_events_url":"https://api.github.com/users/Ultimaker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Ultimaker/CuraEngine","description":"CuraEngine is a powerful, fast and robust engine for processing 3D models into 3D printing instruction for Ultimaker and other GCode based 3D printers. It is part of the larger open source project called \"Cura\".","fork":false,"url":"https://api.github.com/repos/Ultimaker/CuraEngine","forks_url":"https://api.github.com/repos/Ultimaker/CuraEngine/forks","keys_url":"https://api.github.com/repos/Ultimaker/CuraEngine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ultimaker/CuraEngine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ultimaker/CuraEngine/teams","hooks_url":"https://api.github.com/repos/Ultimaker/CuraEngine/hooks","issue_events_url":"https://api.github.com/repos/Ultimaker/CuraEngine/issues/events{/number}","events_url":"https://api.github.com/repos/Ultimaker/CuraEngine/events","assignees_url":"https://api.github.com/repos/Ultimaker/CuraEngine/assignees{/user}","branches_url":"https://api.github.com/repos/Ultimaker/CuraEngine/branches{/branch}","tags_url":"https://api.github.com/repos/Ultimaker/CuraEngine/tags","blobs_url":"https://api.github.com/repos/Ultimaker/CuraEngine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ultimaker/CuraEngine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ultimaker/CuraEngine/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ultimaker/CuraEngine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ultimaker/CuraEngine/statuses/{sha}","languages_url":"https://api.github.com/repos/Ultimaker/CuraEngine/languages","stargazers_url":"https://api.github.com/repos/Ultimaker/CuraEngine/stargazers","contributors_url":"https://api.github.com/repos/Ultimaker/CuraEngine/contributors","subscribers_url":"https://api.github.com/repos/Ultimaker/CuraEngine/subscribers","subscription_url":"https://api.github.com/repos/Ultimaker/CuraEngine/subscription","commits_url":"https://api.github.com/repos/Ultimaker/CuraEngine/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ultimaker/CuraEngine/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ultimaker/CuraEngine/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ultimaker/CuraEngine/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ultimaker/CuraEngine/contents/{+path}","compare_url":"https://api.github.com/repos/Ultimaker/CuraEngine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ultimaker/CuraEngine/merges","archive_url":"https://api.github.com/repos/Ultimaker/CuraEngine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ultimaker/CuraEngine/downloads","issues_url":"https://api.github.com/repos/Ultimaker/CuraEngine/issues{/number}","pulls_url":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls{/number}","milestones_url":"https://api.github.com/repos/Ultimaker/CuraEngine/milestones{/number}","notifications_url":"https://api.github.com/repos/Ultimaker/CuraEngine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ultimaker/CuraEngine/labels{/name}","releases_url":"https://api.github.com/repos/Ultimaker/CuraEngine/releases{/id}","deployments_url":"https://api.github.com/repos/Ultimaker/CuraEngine/deployments","created_at":"2013-03-04T14:12:08Z","updated_at":"2018-09-12T14:25:28Z","pushed_at":"2018-09-12T12:32:03Z","git_url":"git://github.com/Ultimaker/CuraEngine.git","ssh_url":"git@github.com:Ultimaker/CuraEngine.git","clone_url":"https://github.com/Ultimaker/CuraEngine.git","svn_url":"https://github.com/Ultimaker/CuraEngine","homepage":"https://ultimaker.com/en/products/cura-software","size":48576,"stargazers_count":727,"watchers_count":727,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":494,"mirror_url":null,"archived":false,"open_issues_count":71,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":494,"open_issues":71,"watchers":727,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/830"},"html":{"href":"https://github.com/Ultimaker/CuraEngine/pull/830"},"issue":{"href":"https://api.github.com/repos/Ultimaker/CuraEngine/issues/830"},"comments":{"href":"https://api.github.com/repos/Ultimaker/CuraEngine/issues/830/comments"},"review_comments":{"href":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/830/comments"},"review_comment":{"href":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/830/commits"},"statuses":{"href":"https://api.github.com/repos/Ultimaker/CuraEngine/statuses/0a00ecfff58425a96bcbe4840ea8916d794704a8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Ghostkeeper"}}