Skip to content

Commit 2e7eb82

Browse files
committed
Building base architecture for separate generators
CURA-12250
1 parent 441e1e5 commit 2e7eb82

File tree

20 files changed

+2911
-2838
lines changed

20 files changed

+2911
-2838
lines changed

include/GCodePathConfig.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ struct GCodePathConfig
2323
coord_t z_offset{}; //<! vertical offset from 'full' layer height, to be applied to the whole path
2424
PrintFeatureType type{}; //!< name of the feature type
2525
coord_t line_width{}; //!< width of the line extruded
26-
// coord_t layer_thickness{}; //!< current layer height in micron
26+
#warning remove this, thickness should be on LayerPlan only
27+
coord_t layer_thickness{}; //!< current layer height in micron
2728
Ratio flow{}; //!< extrusion flow modifier.
2829
SpeedDerivatives speed_derivatives{}; //!< The speed settings (and acceleration and jerk) of the extruded line. May be changed when smoothSpeed is called.
2930
bool is_bridge_path{ false }; //!< whether current config is used when bridging

include/feature_generation/FeatureGenerator.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <vector>
77

88
#include "print_operation/ExtruderPlanPtr.h"
9-
#include "print_operation/FeatureExtrusionPtr.h"
109

1110
namespace cura
1211
{

include/operation_transformation/LayerPlanTravelMovesInserter.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ namespace cura
1313
{
1414

1515
class TravelMoveGenerator;
16+
struct SpeedDerivatives;
1617

1718
class LayerPlanTravelMovesInserter : public PrintOperationTransformer<LayerPlan>
1819
{

include/print_operation/ExtruderPlan.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,23 @@ namespace cura
99
{
1010

1111
class FeatureExtrusion;
12+
struct SpeedDerivatives;
1213

1314
class ExtruderPlan : public PrintOperationSequence
1415
{
1516
public:
16-
explicit ExtruderPlan(const size_t extruder_nr) noexcept;
17+
explicit ExtruderPlan(const size_t extruder_nr, const SpeedDerivatives& travel_speed) noexcept;
1718

1819
size_t getExtruderNr() const noexcept;
1920

21+
const SpeedDerivatives& getTravelSpeed() const noexcept;
22+
2023
void appendFeatureExtrusion(const std::shared_ptr<FeatureExtrusion>& feature_extrusion, const bool check_non_empty = true);
2124

2225
private:
2326
const size_t extruder_nr_;
27+
#warning use a shared_ptr
28+
const SpeedDerivatives& travel_speed_;
2429
};
2530

2631
} // namespace cura

include/print_operation/FeatureExtrusion.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ class FeatureExtrusion : public PrintOperationSequence
2727

2828
coord_t getLineWidth() const;
2929

30-
coord_t getLayerThickness() const;
31-
3230
private:
3331
const Ratio& getFlow() const;
3432

include/print_operation/LayerPlan.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
namespace cura
1111
{
1212

13+
struct PathConfigStorage;
14+
1315
class LayerPlan : public PrintOperationSequence
1416
{
1517
public:
16-
LayerPlan(const LayerIndex& layer_index, const coord_t z, const coord_t thickness);
18+
LayerPlan(const LayerIndex& layer_index, const coord_t z, const coord_t thickness, const std::shared_ptr<PathConfigStorage>& configs);
1719

1820
virtual ~LayerPlan() = default;
1921

@@ -23,16 +25,19 @@ class LayerPlan : public PrintOperationSequence
2325

2426
coord_t getZ() const;
2527

28+
coord_t getThickness() const;
29+
2630
void write(PlanExporter& exporter) const override;
2731

2832
std::optional<Point3LL> findExtruderStartPosition() const;
2933

30-
Point3LL getAbsolutePosition(const ContinuousExtruderMoveSequence& extruder_move_set, const Point3LL& relative_position) const;
34+
Point3LL getAbsolutePosition(const ContinuousExtruderMoveSequence& move_sequence, const Point3LL& relative_position) const;
3135

3236
private:
3337
const LayerIndex layer_index_;
3438
const coord_t z_;
3539
const coord_t thickness_;
40+
const std::shared_ptr<PathConfigStorage> configs_;
3641
};
3742

3843
} // namespace cura

0 commit comments

Comments
 (0)