You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Applying speed corrections for minimal layer times and determine the fanSpeed.
726
726
*
@@ -834,20 +834,34 @@ class LayerPlan : public NoCopy
834
834
PrintFeatureType feature,
835
835
bool update_extrusion_offset = false);
836
836
837
+
/*!
838
+
* \brief Alias for a function definition that adds an extrusion segment
839
+
* \param start The start position of the segment
840
+
* \param end The end position of the segment
841
+
* \param speed_factor The speed factor to be applied when extruding this specific segment (relative to nominal speed for the entire path)
842
+
* \param flow_ratio The flow ratio to be applied when extruding this specific segment (relative to nominal flow for the entire path)
843
+
* \param line_width_ratio The line width ratio to be applied when extruding this specific segment (relative to nominal line width for the entire path)
844
+
* \param distance_to_bridge_start The calculate distance to the next bridge start, which may be irrelevant in some cases
845
+
*/
846
+
using AddExtrusionSegmentFunction = std::function<void(
847
+
const Point3LL& start,
848
+
const Point3LL& end,
849
+
const Ratio& speed_factor,
850
+
const Ratio& flow_ratio,
851
+
const Ratio& line_width_ratio,
852
+
constcoord_t distance_to_bridge_start)>;
853
+
837
854
/*!
838
855
* \brief Add a wall to the gcode with optimized order, but split into pieces in order to facilitate the scarf seam and/or speed gradient.
856
+
* \tparam PathType The type of path to be processed, either ExtrusionLine or some subclass of Polyline
839
857
* \param wall The full wall to be added
840
858
* \param wall_length The pre-calculated full wall length
841
859
* \param start_idx The index of the point where to start printing the wall
842
860
* \param direction The direction along which to print the wall, which should be 1 or -1
843
861
* \param max_index The last index to be used when iterating over the wall segments
844
-
* \param settings The settings which should apply to this wall added to the layer plan
845
862
* \param default_config The config with which to print the wall lines that are not spanning a bridge or are exposed to air
846
-
* \param roofing_config The config with which to print the wall lines that are exposed to air
847
-
* \param bridge_config The config with which to print the wall lines that are spanning a bridge
848
863
* \param flow_ratio The ratio with which to multiply the extrusion amount
849
-
* \param line_width_ratio The line width ratio to be applied
850
-
* \param non_bridge_line_volume A pseudo-volume that is derived from the print speed and flow of the non-bridge lines that have preceded this lin
864
+
* \param nominal_line_width The nominal line width for the wall
851
865
* \param min_bridge_line_len The minimum line width to allow an extrusion move to be processed as a bridge move
852
866
* \param always_retract Whether to force a retraction when moving to the start of the polygon (used for outer walls)
853
867
* \param is_small_feature Indicates whether the wall is so small that it should be processed differently
@@ -864,26 +878,26 @@ class LayerPlan : public NoCopy
864
878
* \param end_speed_ratio The ratio of the top speed to be applied when finishing a segment
865
879
* \param decelerate_length The pre-calculated length of the deceleration phase
866
880
* \param is_scarf_closure Indicates whether this function is called to make the scarf closure (overlap over the first scarf pass) or the normal first pass of the wall
881
+
* \param compute_distance_to_bridge_start Whether we should compute the distance to start of bridge. This is
882
+
* possible only if PathType is ExtrusionLine and will be ignored otherwise.
883
+
* \param func_add_segment The function to be called to actually add an extrusion segment with the given parameters
867
884
*/
885
+
template<classPathType>
868
886
voidaddSplitWall(
869
-
constExtrusionLine& wall,
887
+
constPathAdapter<PathType>& wall,
870
888
constcoord_t wall_length,
871
-
size_t start_idx,
872
-
constint direction,
889
+
constsize_t start_idx,
873
890
constsize_t max_index,
874
-
constSettings& settings,
891
+
constint direction,
875
892
const GCodePathConfig& default_config,
876
-
const GCodePathConfig& roofing_config,
877
-
const GCodePathConfig& bridge_config,
878
-
constdouble flow_ratio,
879
-
const Ratio line_width_ratio,
880
-
double& non_bridge_line_volume,
881
-
constcoord_t min_bridge_line_len,
882
893
constbool always_retract,
883
894
constbool is_small_feature,
884
895
Ratio small_feature_speed_factor,
885
896
constcoord_t max_area_deviation,
886
897
constauto max_resolution,
898
+
constdouble flow_ratio,
899
+
constcoord_t nominal_line_width,
900
+
constcoord_t min_bridge_line_len,
887
901
constauto scarf_seam_length,
888
902
constauto scarf_seam_start_ratio,
889
903
constauto scarf_split_distance,
@@ -893,7 +907,71 @@ class LayerPlan : public NoCopy
0 commit comments