Skip to content

Commit

Permalink
Applied clang-format.
Browse files Browse the repository at this point in the history
  • Loading branch information
saumyaj3 authored and github-actions[bot] committed Apr 19, 2024
1 parent 5e62a85 commit 8c6d99e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
12 changes: 6 additions & 6 deletions include/PathOrderOptimizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class PathOrderOptimizer
, reverse_direction_(reverse_direction)
, _group_outer_walls(group_outer_walls)
, order_requirements_(&order_requirements)
, mesh_paths_ {}
, mesh_paths_{}

{
}
Expand Down Expand Up @@ -211,7 +211,8 @@ class PathOrderOptimizer

// For some Z seam types the start position can be pre-computed.
// This is faster since we don't need to re-compute the start position at each step then.
precompute_start &= seam_config_.type_ == EZSeamType::SUPPORT || seam_config_.type_ == EZSeamType::RANDOM || seam_config_.type_ == EZSeamType::USER_SPECIFIED || seam_config_.type_ == EZSeamType::SHARPEST_CORNER;
precompute_start &= seam_config_.type_ == EZSeamType::SUPPORT || seam_config_.type_ == EZSeamType::RANDOM || seam_config_.type_ == EZSeamType::USER_SPECIFIED
|| seam_config_.type_ == EZSeamType::SHARPEST_CORNER;
if (precompute_start)
{
for (auto& path : paths_)
Expand Down Expand Up @@ -575,7 +576,7 @@ class PathOrderOptimizer

bool isVertexCloseToPolygonPath(Point2LL point)
{
for( const auto& points : ranges::front(mesh_paths_))
for (const auto& points : ranges::front(mesh_paths_))
{
for (const auto& polygon_point : points)
{
Expand Down Expand Up @@ -637,12 +638,12 @@ class PathOrderOptimizer

size_t pathIfzeamSupportIsCloseToModel(size_t best_pos, const OrderablePath& path)
{
if (!mesh_paths_.empty())
if (! mesh_paths_.empty())
{
Point2LL current_candidate = (*path.converted_)[best_pos];
if (isVertexCloseToPolygonPath(current_candidate))
{
best_pos = pathIfzeamSupportIsCloseToModel(best_pos+1, path);
best_pos = pathIfzeamSupportIsCloseToModel(best_pos + 1, path);
}
}
return best_pos;
Expand Down Expand Up @@ -789,7 +790,6 @@ class PathOrderOptimizer
if (seam_config_.type_ == EZSeamType::SUPPORT)
{
best_i = pathIfzeamSupportIsCloseToModel(best_i, path);

}
return best_i;
}
Expand Down
7 changes: 2 additions & 5 deletions src/FffGcodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
#include "utils/Simplify.h" //Removing micro-segments created by offsetting.
#include "utils/ThreadPool.h"
#include "utils/linearAlg2D.h"
#include "utils/polygonUtils.h"
#include "utils/math.h"
#include "utils/orderOptimizer.h"
#include "utils/polygonUtils.h"

namespace cura
{
Expand Down Expand Up @@ -3456,10 +3456,7 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer
Point2LL start_pos;

start_pos = gcode_layer.getLastPlannedPositionOrStartingPosition();
z_seam_config = ZSeamConfig(EZSeamType::SUPPORT,
start_pos,
EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE,
false);
z_seam_config = ZSeamConfig(EZSeamType::SUPPORT, start_pos, EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE, false);


InsetOrderOptimizer wall_orderer(
Expand Down
8 changes: 4 additions & 4 deletions src/InsetOrderOptimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,19 @@ bool InsetOrderOptimizer::addToLayer()
order_optimizer.addPolyline(&line);
}
}
if (z_seam_config_.type_== EZSeamType::SUPPORT)
if (z_seam_config_.type_ == EZSeamType::SUPPORT)
{
for (std::shared_ptr<SliceMeshStorage> mesh_ptr : storage_.meshes)
{
auto& mesh = *mesh_ptr;
for (auto &part : mesh.layers[layer_nr_].parts)
for (auto& part : mesh.layers[layer_nr_].parts)
{
mesh_paths_.push_back(part.print_outline.paths);
}
}
if (!mesh_paths_.empty())
if (! mesh_paths_.empty())
{
order_optimizer.addMeshPathsinfo(mesh_paths_,settings_.get<coord_t >("support_z_seam_min_distance"));
order_optimizer.addMeshPathsinfo(mesh_paths_, settings_.get<coord_t>("support_z_seam_min_distance"));
}
}

Expand Down

0 comments on commit 8c6d99e

Please sign in to comment.