{"action":"created","comment":{"url":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/comments/106003584","pull_request_review_id":26907310,"id":106003584,"diff_hunk":"@@ -898,7 +895,74 @@ void FffGcodeWriter::addMeshPartToGCode(SliceDataStorage& storage, SliceMeshStor\n }\n \n             \n+void FffGcodeWriter::processInfill(GCodePlanner& gcode_layer, SliceMeshStorage* mesh, SliceLayerPart& part, unsigned int layer_nr, int infill_line_distance, int infill_overlap, int infill_angle)\n+{\n+    if (mesh->getSettingBoolean(\"spaghetti_infill_enabled\"))\n+    {\n+        processSpaghettiInfill(gcode_layer, mesh,  part, layer_nr, infill_line_distance, infill_overlap, infill_angle);\n+    }\n+    else\n+    {\n+        processMultiLayerInfill(gcode_layer, mesh,  part, layer_nr, infill_line_distance, infill_overlap, infill_angle);\n+        processSingleLayerInfill(gcode_layer, mesh,  part, layer_nr, infill_line_distance, infill_overlap, infill_angle);\n+    }\n+}\n+\n+void FffGcodeWriter::processSpaghettiInfill(GCodePlanner& gcode_layer, SliceMeshStorage* mesh, SliceLayerPart& part, unsigned int layer_nr, int infill_line_distance, int infill_overlap, int infill_angle)\n+{\n+    GCodePathConfig& config = mesh->infill_config[0];\n+    const EFillMethod pattern = mesh->getSettingAsFillMethod(\"infill_pattern\");\n+    const unsigned int infill_line_width = config.getLineWidth();\n+    const int64_t z = layer_nr * getSettingInMicrons(\"layer_height\");\n+    const int64_t infill_shift = 0;\n+    const int64_t outline_offset = 0;\n+\n+    for (std::pair<PolygonsPart, double>& filling_area : part.spaghetti_infill_volumes)\n+    {\n+        Polygons infill_lines;\n+        Polygons infill_polygons;\n+\n+        const PolygonsPart& area = filling_area.first;\n+        const double total_volume = filling_area.second * getSettingAsRatio(\"spaghetti_flow\");\n+        assert(total_volume > 0.0);\n+\n+        Polygons* perimeter_gaps_output = nullptr;\n+        const bool connected_zigzags = true;\n+        const bool use_endpieces = false;\n+        Infill infill_comp(pattern, area, outline_offset, infill_line_width, infill_line_distance, infill_overlap, infill_angle, z, infill_shift, perimeter_gaps_output, connected_zigzags, use_endpieces);\n+        infill_comp.generate(infill_polygons, infill_lines, mesh);\n+\n+        const coord_t total_length = infill_polygons.polygonLength() + infill_lines.polyLineLength();\n+        if (total_length > 0)\n+        {\n+            const double normal_volume = INT2MM(INT2MM(total_length * infill_line_width)) * mesh->getSettingInMillimeters(\"layer_height\");\n+            const float flow_ratio = total_volume / normal_volume;\n+            assert(flow_ratio / getSettingAsRatio(\"spaghetti_flow\") >= 0.9);\n \n+            gcode_layer.addPolygonsByOptimizer(infill_polygons, &config, nullptr, EZSeamType::SHORTEST, Point(0, 0), 0, false, flow_ratio);\n+            if (pattern == EFillMethod::GRID || pattern == EFillMethod::LINES || pattern == EFillMethod::TRIANGLES)\n+            {\n+                gcode_layer.addLinesByOptimizer(infill_lines, &config, SpaceFillType::Lines, mesh->getSettingInMicrons(\"infill_wipe_dist\"), flow_ratio);\n+            }\n+            else\n+            {\n+                gcode_layer.addLinesByOptimizer(infill_lines, &config, (pattern == EFillMethod::ZIG_ZAG)? SpaceFillType::PolyLines : SpaceFillType::Lines, 0, flow_ratio);","path":"src/FffGcodeWriter.cpp","position":96,"original_position":89,"commit_id":"23180cc398bd5d08a5c41da1a7b4d46f73d68481","original_commit_id":"dbf23654fba7f9e50452c446a7de143164f2d53b","user":{"login":"BagelOrb","id":8895761,"avatar_url":"https://avatars1.githubusercontent.com/u/8895761?v=3","gravatar_id":"","url":"https://api.github.com/users/BagelOrb","html_url":"https://github.com/BagelOrb","followers_url":"https://api.github.com/users/BagelOrb/followers","following_url":"https://api.github.com/users/BagelOrb/following{/other_user}","gists_url":"https://api.github.com/users/BagelOrb/gists{/gist_id}","starred_url":"https://api.github.com/users/BagelOrb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BagelOrb/subscriptions","organizations_url":"https://api.github.com/users/BagelOrb/orgs","repos_url":"https://api.github.com/users/BagelOrb/repos","events_url":"https://api.github.com/users/BagelOrb/events{/privacy}","received_events_url":"https://api.github.com/users/BagelOrb/received_events","type":"User","site_admin":false},"body":"Yeah, but because the bug is also present in the normal infill code the question is whether I should fix it in this issue, or make a new issue which will be tested separately?","created_at":"2017-03-14T19:20:43Z","updated_at":"2017-03-14T19:20:43Z","html_url":"https://github.com/Ultimaker/CuraEngine/pull/474#discussion_r106003584","pull_request_url":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/474","_links":{"self":{"href":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/comments/106003584"},"html":{"href":"https://github.com/Ultimaker/CuraEngine/pull/474#discussion_r106003584"},"pull_request":{"href":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/474"}}},"pull_request":{"url":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/474","id":109233715,"html_url":"https://github.com/Ultimaker/CuraEngine/pull/474","diff_url":"https://github.com/Ultimaker/CuraEngine/pull/474.diff","patch_url":"https://github.com/Ultimaker/CuraEngine/pull/474.patch","issue_url":"https://api.github.com/repos/Ultimaker/CuraEngine/issues/474","number":474,"state":"open","locked":false,"title":"Spaghetti Infill","user":{"login":"Ghostkeeper","id":2448634,"avatar_url":"https://avatars2.githubusercontent.com/u/2448634?v=3","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":"This implements a modifier on infill that produces a spaghetti-like infill structure. It can be combined with various infill patterns. The spaghetti infill drops the infill from a larger height so that it doesn't attach to the bottom and becomes chaotic.\r\n\r\nImplements CURA-3238.","created_at":"2017-03-06T10:56:32Z","updated_at":"2017-03-14T19:20:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"32c49b84500950523d06c6ac43cf51882c385534","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/474/commits","review_comments_url":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/474/comments","review_comment_url":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ultimaker/CuraEngine/issues/474/comments","statuses_url":"https://api.github.com/repos/Ultimaker/CuraEngine/statuses/23180cc398bd5d08a5c41da1a7b4d46f73d68481","head":{"label":"Ultimaker:feature_spaghetti_infill","ref":"feature_spaghetti_infill","sha":"23180cc398bd5d08a5c41da1a7b4d46f73d68481","user":{"login":"Ultimaker","id":499557,"avatar_url":"https://avatars2.githubusercontent.com/u/499557?v=3","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,"name":"CuraEngine","full_name":"Ultimaker/CuraEngine","owner":{"login":"Ultimaker","id":499557,"avatar_url":"https://avatars2.githubusercontent.com/u/499557?v=3","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":"2017-03-14T07:26:44Z","pushed_at":"2017-03-14T16:39:46Z","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":42413,"stargazers_count":466,"watchers_count":466,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":372,"mirror_url":null,"open_issues_count":54,"forks":372,"open_issues":54,"watchers":466,"default_branch":"master"}},"base":{"label":"Ultimaker:master","ref":"master","sha":"3377877ee1a4a03cd46524dae683d7c2ceebbc20","user":{"login":"Ultimaker","id":499557,"avatar_url":"https://avatars2.githubusercontent.com/u/499557?v=3","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,"name":"CuraEngine","full_name":"Ultimaker/CuraEngine","owner":{"login":"Ultimaker","id":499557,"avatar_url":"https://avatars2.githubusercontent.com/u/499557?v=3","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":"2017-03-14T07:26:44Z","pushed_at":"2017-03-14T16:39:46Z","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":42413,"stargazers_count":466,"watchers_count":466,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":372,"mirror_url":null,"open_issues_count":54,"forks":372,"open_issues":54,"watchers":466,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/474"},"html":{"href":"https://github.com/Ultimaker/CuraEngine/pull/474"},"issue":{"href":"https://api.github.com/repos/Ultimaker/CuraEngine/issues/474"},"comments":{"href":"https://api.github.com/repos/Ultimaker/CuraEngine/issues/474/comments"},"review_comments":{"href":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/474/comments"},"review_comment":{"href":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ultimaker/CuraEngine/pulls/474/commits"},"statuses":{"href":"https://api.github.com/repos/Ultimaker/CuraEngine/statuses/23180cc398bd5d08a5c41da1a7b4d46f73d68481"}}}}
{"actor":{"display_login":"BagelOrb"}}