Skip to content

Commit

Permalink
Merge branch '5.7' into CURA-11717_prime_tower_has_unused_material
Browse files Browse the repository at this point in the history
  • Loading branch information
wawanbreton authored Mar 29, 2024
2 parents ba6ebd6 + 84252c8 commit fa6025f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/LayerPlan.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class LayerPlan : public NoCopy

public:
const PathConfigStorage configs_storage_; //!< The line configs for this layer for each feature type
coord_t z_;
const coord_t z_;
coord_t final_travel_z_;
bool mode_skip_agressive_merge_; //!< Whether to give every new path the 'skip_agressive_merge_hint' property (see GCodePath); default is false.

Expand Down
2 changes: 1 addition & 1 deletion include/gcodeExport.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ class GCodeExport : public NoCopy
*/
void addExtraPrimeAmount(double extra_prime_volume);

Point3LL getPosition() const;
const Point3LL& getPosition() const;

Point2LL getPositionXY() const;

Expand Down
7 changes: 7 additions & 0 deletions src/LayerPlan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2185,6 +2185,13 @@ void LayerPlan::writeGCode(GCodeExport& gcode)
ss << "MESH:" << (current_mesh ? current_mesh->mesh_name : "NONMESH");
gcode.writeComment(ss.str());
}

if (! path.spiralize && (! path.retract || ! path.perform_z_hop) && (z_ + path.z_offset != gcode.getPositionZ()) && (path_idx > 0 || layer_nr_ > 0))
{
// First move to desired height to then make a plain horizontal move
gcode.writeTravel(Point3LL(gcode.getPosition().x_, gcode.getPosition().y_, z_ + path.z_offset), speed);
}

if (path.config.isTravelPath())
{ // early comp for travel paths, which are handled more simply
if (! path.perform_z_hop && final_travel_z_ != z_ && extruder_plan_idx == (extruder_plans_.size() - 1) && path_idx == (paths.size() - 1))
Expand Down
2 changes: 1 addition & 1 deletion src/SkirtBrim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ void SkirtBrim::generateSecondarySkirtBrim(Polygons& covered_area, std::vector<P
if (first)
{
ref_polys_or_idx = &reference_outline;
offset_from_reference = extruder_config.line_width_ / 2 + extruder_config.gap_;
offset_from_reference = extruder_config.line_width_ / 2;
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/gcodeExport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ void GCodeExport::setFlowRateExtrusionSettings(double max_extrusion_offset, doub
this->extrusion_offset_factor_ = extrusion_offset_factor;
}

Point3LL GCodeExport::getPosition() const
const Point3LL& GCodeExport::getPosition() const
{
return current_position_;
}
Expand Down

0 comments on commit fa6025f

Please sign in to comment.