File tree Expand file tree Collapse file tree 3 files changed +28
-4
lines changed
Expand file tree Collapse file tree 3 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -511,6 +511,7 @@ class LayerPlan : public NoCopy
511511 * If unset, this causes it to start near the last planned location.
512512 * \param scarf_seam Indicates whether we may use a scarf seam for the path
513513 * \param smooth_speed Indicates whether we may use a speed gradient for the path
514+ * \param texture_data_provider The texture provider to be used to place the seam
514515 */
515516 void addPolygonsByOptimizer (
516517 const Shape& polygons,
@@ -524,7 +525,8 @@ class LayerPlan : public NoCopy
524525 bool reverse_order = false,
525526 const std::optional<Point2LL> start_near_location = std::optional<Point2LL>(),
526527 bool scarf_seam = false,
527- bool smooth_acceleration = false);
528+ bool smooth_acceleration = false,
529+ const std::shared_ptr<TextureDataProvider>& texture_data_provider = nullptr);
528530
529531 /* !
530532 * Add a single line that is part of a wall to the gcode.
Original file line number Diff line number Diff line change @@ -1787,7 +1787,8 @@ void FffGcodeWriter::addMeshLayerToGCode_meshSurfaceMode(const SliceMeshStorage&
17871787 reverse_order,
17881788 start_near_location,
17891789 scarf_seam,
1790- smooth_speed);
1790+ smooth_speed,
1791+ layer->texture_data_provider_ );
17911792
17921793 addMeshOpenPolyLinesToGCode (mesh, mesh_config, gcode_layer);
17931794}
Original file line number Diff line number Diff line change @@ -865,13 +865,34 @@ void LayerPlan::addPolygonsByOptimizer(
865865 bool reverse_order,
866866 const std::optional<Point2LL> start_near_location,
867867 bool scarf_seam,
868- bool smooth_speed)
868+ bool smooth_speed,
869+ const std::shared_ptr<TextureDataProvider>& texture_data_provider)
869870{
870871 if (polygons.empty ())
871872 {
872873 return ;
873874 }
874- PathOrderOptimizer<const Polygon*> orderOptimizer (start_near_location ? start_near_location.value () : getLastPlannedPositionOrStartingPosition (), z_seam_config);
875+
876+ constexpr bool detect_loops = false ;
877+ constexpr Shape* combing_boundary = nullptr ;
878+ constexpr bool reverse_direction = false ;
879+ const std::unordered_multimap<const Polygon*, const Polygon*>& order_requirements = PathOrderOptimizer<const Polygon*>::no_order_requirements_;
880+ constexpr bool group_outer_walls = false ;
881+ const Shape disallowed_areas_for_seams = {}; // <- The Mac compiler we use in builds can't handle this as a `constexpr`, put back when that's updated.
882+ constexpr bool use_shortest_for_inner_walls = false ;
883+ const Shape overhang_areas = Shape (); // <- The Mac compiler we use in builds can't handle this as a `constexpr`, put back when that's updated.
884+ PathOrderOptimizer<const Polygon*> orderOptimizer (
885+ start_near_location ? start_near_location.value () : getLastPlannedPositionOrStartingPosition (),
886+ z_seam_config,
887+ detect_loops,
888+ combing_boundary,
889+ reverse_direction,
890+ order_requirements,
891+ group_outer_walls,
892+ disallowed_areas_for_seams,
893+ use_shortest_for_inner_walls,
894+ overhang_areas,
895+ texture_data_provider);
875896 for (size_t poly_idx = 0 ; poly_idx < polygons.size (); poly_idx++)
876897 {
877898 orderOptimizer.addPolygon (&polygons[poly_idx]);
You can’t perform that action at this time.
0 commit comments