Skip to content

Commit

Permalink
Fixed variable initialization ordering warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
wawanbreton committed Nov 22, 2023
1 parent 4556a18 commit c74f4bb
Show file tree
Hide file tree
Showing 7 changed files with 234 additions and 237 deletions.
2 changes: 1 addition & 1 deletion include/PathOrderOptimizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ class PathOrderOptimizer
, combing_boundary_((combing_boundary != nullptr && ! combing_boundary->empty()) ? combing_boundary : nullptr)
, detect_loops_(detect_loops)
, reverse_direction_(reverse_direction)
, order_requirements_(&order_requirements)
, _group_outer_walls(group_outer_walls)
, order_requirements_(&order_requirements)
{
}

Expand Down
8 changes: 4 additions & 4 deletions include/TreeSupportElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ struct TreeSupportElement
, missing_roof_layers_(elem.missing_roof_layers_)
, skip_ovalisation_(elem.skip_ovalisation_)
, all_tips_(elem.all_tips_)
, influence_area_limit_area_(elem.influence_area_limit_area_)
, influence_area_limit_range_(elem.influence_area_limit_range_)
, influence_area_limit_active_(elem.influence_area_limit_active_)
, influence_area_limit_range_(elem.influence_area_limit_range_)
, influence_area_limit_area_(elem.influence_area_limit_area_)
{
parents_.insert(parents_.begin(), elem.parents_.begin(), elem.parents_.end());
}
Expand Down Expand Up @@ -149,9 +149,9 @@ struct TreeSupportElement
, missing_roof_layers_(element_above->missing_roof_layers_)
, skip_ovalisation_(false)
, all_tips_(element_above->all_tips_)
, influence_area_limit_area_(element_above->influence_area_limit_area_)
, influence_area_limit_range_(element_above->influence_area_limit_range_)
, influence_area_limit_active_(element_above->influence_area_limit_active_)
, influence_area_limit_range_(element_above->influence_area_limit_range_)
, influence_area_limit_area_(element_above->influence_area_limit_area_)
{
parents_ = { element_above };
}
Expand Down
61 changes: 29 additions & 32 deletions include/TreeSupportTipGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,138 +176,135 @@ class TreeSupportTipGenerator
*/
void removeUselessAddedPoints(std::vector<std::set<TreeSupportElement*>>& move_bounds, SliceDataStorage& storage, std::vector<Polygons>& additional_support_areas);

/*!
* \brief Contains config settings to avoid loading them in every function. This was done to improve readability of the code.
*/
TreeSupportSettings config_;

/*!
* \brief If large areas should be supported by a roof out of regular support lines.
*/
bool use_fake_roof;
bool use_fake_roof_;

/*!
* \brief Generator for model collision, avoidance and internal guide volumes.
*/
TreeModelVolumes& volumes_;

/*!
* \brief Contains config settings to avoid loading them in every function. This was done to improve readability of the code.
*/
TreeSupportSettings config;


/*!
* \brief Minimum area an overhang has to have to be supported.
*/
const double minimum_support_area;
const double minimum_support_area_;

/*!
* \brief Minimum area an overhang has to have to become a roof.
*/
const double minimum_roof_area;
const double minimum_roof_area_;

/*!
* \brief Amount of layers of roof. Zero if roof is disabled
*/
const size_t support_roof_layers;
const size_t support_roof_layers_;

/*!
* \brief Distance between tips, so that the tips form a lime. Is smaller than Tip Diameter.
*/
const coord_t connect_length;
const coord_t connect_length_;

/*!
* \brief Distance between tips, if the tips support an overhang.
*/
const coord_t support_tree_branch_distance;
const coord_t support_tree_branch_distance_;

/*!
* \brief Distance between support roof lines. Is required for generating roof patterns.
*/
const coord_t support_roof_line_distance;
const coord_t support_roof_line_distance_;


/*!
* \brief Amount of offset to each overhang for support with regular branches (as opposed to roof).
*/
const coord_t support_outset;
const coord_t support_outset_;

/*!
* \brief Amount of offset to each overhang for support with roof (as opposed to regular branches).
*/
const coord_t roof_outset;
const coord_t roof_outset_;

/*!
* \brief Whether tips should be printed as roof
*/
const bool force_tip_to_roof;
const bool force_tip_to_roof_;

/*!
* \brief Whether the maximum distance a branch should from a point they support should be limited. Can be violated if required.
*/
const bool support_tree_limit_branch_reach;
const bool support_tree_limit_branch_reach_;

/*!
* \brief Maximum distance a branch should from a point they support (in the xy plane). Can be violated if required.
*/
const coord_t support_tree_branch_reach_limit;
const coord_t support_tree_branch_reach_limit_;

/*!
* \brief Distance in layers from the overhang to the first layer with support. This is the z distance in layers+1
*/
const size_t z_distance_delta;
const size_t z_distance_delta_;

/*!
* \brief Whether the Support Distance Priority is X/Y Overrides Z
*/
const bool xy_overrides;
const bool xy_overrides_;

/*!
* \brief Amount of layers further down than required an overhang can be supported, when Support Distance Priority is X/Y Overrides Z
*/
size_t max_overhang_insert_lag;
size_t max_overhang_insert_lag_;

/*!
* \brief Area of a tip.
*/
const double tip_roof_size;
const double tip_roof_size_;

/*!
* \brief Whether only support that can rest on a flat surface should be supported.
*/
const bool only_gracious = SUPPORT_TREE_ONLY_GRACIOUS_TO_MODEL;
const bool only_gracious_ = SUPPORT_TREE_ONLY_GRACIOUS_TO_MODEL;

/*!
* \brief Whether minimum_roof_area is a hard limit. If false the roof will be combined with roof above and below, to see if a part of this roof may be part of a valid roof
* further up/down.
*/
const bool force_minimum_roof_area = SUPPORT_TREE_MINIMUM_ROOF_AREA_HARD_LIMIT;
const bool force_minimum_roof_area_ = SUPPORT_TREE_MINIMUM_ROOF_AREA_HARD_LIMIT;

/*!
* \brief Distance between branches when the branches support a support pattern
*/
coord_t support_supporting_branch_distance;
coord_t support_supporting_branch_distance_;

/*!
* \brief Required to generate cross infill patterns
*/
std::shared_ptr<SierpinskiFillProvider> cross_fill_provider;
std::shared_ptr<SierpinskiFillProvider> cross_fill_provider_;

/*!
* \brief Map that saves locations of already inserted tips. Used to prevent tips far to close together from being added.
*/
std::vector<std::unordered_set<Point2LL>> already_inserted;
std::vector<std::unordered_set<Point2LL>> already_inserted_;

/*!
* \brief Areas that will be saved as support roof
*/
std::vector<Polygons> support_roof_drawn;
std::vector<Polygons> support_roof_drawn_;

/*!
* \brief Areas that will be saved as support roof, originating from tips being replaced with roof areas.
*/
std::vector<Polygons> roof_tips_drawn;

std::vector<Polygons> roof_tips_drawn_;

std::mutex critical_move_bounds;
std::mutex critical_roof_tips;
std::mutex critical_move_bounds_;
std::mutex critical_roof_tips_;
};

} // namespace cura
Expand Down
8 changes: 4 additions & 4 deletions src/BeadingStrategy/BeadingStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ BeadingStrategy::BeadingStrategy(
Ratio wall_add_middle_threshold,
coord_t default_transition_length,
double transitioning_angle)
: optimal_width_(optimal_width)
: name_("Unknown")
, optimal_width_(optimal_width)
, wall_split_middle_threshold_(wall_split_middle_threshold)
, wall_add_middle_threshold_(wall_add_middle_threshold)
, default_transition_length_(default_transition_length)
, transitioning_angle_(transitioning_angle)
{
name_ = "Unknown";
}

BeadingStrategy::BeadingStrategy(const BeadingStrategy& other)
: optimal_width_(other.optimal_width_)
: name_(other.name_)
, optimal_width_(other.optimal_width_)
, wall_split_middle_threshold_(other.wall_split_middle_threshold_)
, wall_add_middle_threshold_(other.wall_add_middle_threshold_)
, default_transition_length_(other.default_transition_length_)
, transitioning_angle_(other.transitioning_angle_)
, name_(other.name_)
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/SkeletalTrapezoidation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,9 @@ SkeletalTrapezoidation::SkeletalTrapezoidation(
, transition_filter_dist_(transition_filter_dist)
, allowed_filter_deviation_(allowed_filter_deviation)
, beading_propagation_transition_dist_(beading_propagation_transition_dist)
, beading_strategy_(beading_strategy)
, layer_idx_(layer_idx)
, section_type_(section_type)
, beading_strategy_(beading_strategy)
{
scripta::log("skeletal_trapezoidation_0", polys, section_type, layer_idx);
constructFromPolygons(polys);
Expand Down
Loading

0 comments on commit c74f4bb

Please sign in to comment.