Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin-wawanbreton/master' into optimiz…
Browse files Browse the repository at this point in the history
…ed-prime-tower
  • Loading branch information
wawanbreton committed Nov 2, 2023
2 parents 679537a + 1d88e6c commit 50c8897
Show file tree
Hide file tree
Showing 37 changed files with 1,053 additions and 705 deletions.
6 changes: 3 additions & 3 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ ForEachMacros:
IncludeBlocks: Regroup
IncludeCategories:
- Priority: 2
Regex: ^<(scripta|spdlog|range|fmt|Arcus|agrpc|grpc|boost)/
Regex: '^<(scripta|spdlog|range|fmt|Arcus|agrpc|grpc|boost)/.*'
- Priority: 3
Regex: ^(<|"(gtest|gmock|isl|json)/)
Regex: '^((<|")(gtest|gmock|isl|json)/)'
- Priority: 1
Regex: .*
Regex: '^<.*'
IncludeIsMainRegex: (Test)?$
IndentCaseLabels: false
IndentWidth: 4
Expand Down
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class CuraEngineConan(ConanFile):

def set_version(self):
if not self.version:
self.version = "5.5.0-beta.1"
self.version = "5.6.0-alpha"

def export_sources(self):
copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder)
Expand Down
13 changes: 7 additions & 6 deletions include/FffGcodeWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#ifndef GCODE_WRITER_H
#define GCODE_WRITER_H

#include <fstream>
#include <optional>

#include "ExtruderUse.h"
#include "FanSpeedLayerTime.h"
#include "LayerPlanBuffer.h"
Expand All @@ -13,9 +16,6 @@
#include "utils/ExtrusionLine.h" //Processing variable-width paths.
#include "utils/NoCopy.h"

#include <fstream>
#include <optional>

namespace cura
{

Expand Down Expand Up @@ -570,8 +570,7 @@ class FffGcodeWriter : public NoCopy
const Ratio skin_density,
const bool monotonic,
bool& added_something,
double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT,
const bool is_bridge_skin = false) const;
double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT) const;

/*!
* see if we can avoid printing a lines or zig zag style skin part in multiple segments by moving to
Expand Down Expand Up @@ -636,10 +635,12 @@ class FffGcodeWriter : public NoCopy
* layer.
*
* \param[in] storage Where the slice data is stored.
* \param[in] support_roof_outlines which polygons to generate roofs for -- originally split-up because of fractional (layer-height) layers
* \param[in] current_roof_config config to be used -- most importantly, support has slightly different configs for fractional (layer-height) layers
* \param gcodeLayer The initial planning of the g-code of the layer.
* \return Whether any support skin was added to the layer plan.
*/
bool addSupportRoofsToGCode(const SliceDataStorage& storage, LayerPlan& gcodeLayer) const;
bool addSupportRoofsToGCode(const SliceDataStorage& storage, const Polygons& support_roof_outlines, const GCodePathConfig& current_roof_config, LayerPlan& gcode_layer) const;

/*!
* Add the support bottoms to the layer plan \p gcodeLayer of the current
Expand Down
1 change: 1 addition & 0 deletions include/GCodePathConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace cura
*/
struct GCodePathConfig
{
coord_t z_offset{}; //<! vertical offset from 'full' layer height
PrintFeatureType type{}; //!< name of the feature type
coord_t line_width{}; //!< width of the line extruded
coord_t layer_thickness{}; //!< current layer height in micron
Expand Down
20 changes: 11 additions & 9 deletions include/LayerPlan.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,19 @@ class LayerPlan : public NoCopy
*
* \param config The config used for the path returned
* \param space_fill_type The type of space filling which this path employs
* \param z_offset (optional) Vertical offset w.r.t current layer height, defaults to 0
* \param flow (optional) A ratio for the extrusion speed
* \param spiralize Whether to gradually increase the z while printing. (Note that this path may be part of a sequence of spiralized paths, forming one polygon)
* \param speed_factor (optional) a factor which the speed will be multiplied by.
* \return A path with the given config which is now the last path in LayerPlan::paths
*/
GCodePath* getLatestPathWithConfig(
const GCodePathConfig& config,
SpaceFillType space_fill_type,
const SpaceFillType space_fill_type,
const coord_t z_offset = 0,
const Ratio flow = 1.0_r,
const Ratio width_factor = 1.0_r,
bool spiralize = false,
const bool spiralize = false,
const Ratio speed_factor = 1.0_r);

public:
Expand Down Expand Up @@ -281,7 +283,7 @@ class LayerPlan : public NoCopy
* \param p The point to travel to.
* \param force_retract Whether to force a retraction to occur.
*/
GCodePath& addTravel(const Point p, const bool force_retract = false);
GCodePath& addTravel(const Point& p, const bool force_retract = false, const coord_t z_offset = 0);

/*!
* Add a travel path to a certain point and retract if needed.
Expand All @@ -291,7 +293,7 @@ class LayerPlan : public NoCopy
* \param p The point to travel to
* \param path (optional) The travel path to which to add the point \p p
*/
GCodePath& addTravel_simple(Point p, GCodePath* path = nullptr);
GCodePath& addTravel_simple(const Point& p, GCodePath* path = nullptr);

/*!
* Plan a prime blob at the current location.
Expand All @@ -317,14 +319,14 @@ class LayerPlan : public NoCopy
* \param fan_speed Fan speed override for this path.
*/
void addExtrusionMove(
Point p,
const Point p,
const GCodePathConfig& config,
SpaceFillType space_fill_type,
const SpaceFillType space_fill_type,
const Ratio& flow = 1.0_r,
const Ratio width_factor = 1.0_r,
bool spiralize = false,
Ratio speed_factor = 1.0_r,
double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT);
const bool spiralize = false,
const Ratio speed_factor = 1.0_r,
const double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT);

/*!
* Add polygon to the gcode starting at vertex \p startIdx
Expand Down
Loading

0 comments on commit 50c8897

Please sign in to comment.