Skip to content

Commit 49cc4a1

Browse files
committed
Merge remote-tracking branch 'origin/main' into CURA-12580_paint-on-support
2 parents 506cc8b + 8bfb59a commit 49cc4a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1761
-653
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ endif ()
4343

4444
set(engine_SRCS # Except main.cpp.
4545
src/Application.cpp
46-
src/bridge.cpp
4746
src/ConicalOverhang.cpp
4847
src/ExtruderPlan.cpp
4948
src/ExtruderTrain.cpp
@@ -99,6 +98,12 @@ set(engine_SRCS # Except main.cpp.
9998
src/BeadingStrategy/WideningBeadingStrategy.cpp
10099
src/BeadingStrategy/OuterWallInsetBeadingStrategy.cpp
101100

101+
src/bridge/bridge.cpp
102+
src/bridge/ExpansionRange.cpp
103+
src/bridge/SegmentOverlappingData.cpp
104+
src/bridge/TransformedSegment.cpp
105+
src/bridge/TransformedShape.cpp
106+
102107
src/communication/ArcusCommunication.cpp
103108
src/communication/ArcusCommunicationPrivate.cpp
104109
src/communication/CommandLine.cpp

doc/bridging_skin_support.svg

Lines changed: 139 additions & 0 deletions
Loading

include/ExtruderPlan.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class ExtruderPlan
4242
FRIEND_TEST(ExtruderPlanPathsParameterizedTest, BackPressureCompensationFull);
4343
FRIEND_TEST(ExtruderPlanPathsParameterizedTest, BackPressureCompensationHalf);
4444
FRIEND_TEST(ExtruderPlanTest, BackPressureCompensationEmptyPlan);
45-
friend class FffGcodeWriterTest_SurfaceGetsExtraInfillLinesUnderIt_Test;
45+
friend class DISABLED_FffGcodeWriterTest_SurfaceGetsExtraInfillLinesUnderIt_Test;
4646
#endif
4747
public:
4848
size_t extruder_nr_{ 0 }; //!< The extruder used for this paths in the current plan.

include/FffGcodeWriter.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct MeshPathConfigs;
3939
class FffGcodeWriter : public NoCopy
4040
{
4141
friend class FffProcessor; // Because FffProcessor exposes finalize (TODO)
42-
friend class FffGcodeWriterTest_SurfaceGetsExtraInfillLinesUnderIt_Test;
42+
friend class DISABLED_FffGcodeWriterTest_SurfaceGetsExtraInfillLinesUnderIt_Test;
4343

4444
private:
4545
coord_t max_object_height; //!< The maximal height of all previously sliced meshgroups, used to avoid collision when moving to the next meshgroup to print.
@@ -749,9 +749,8 @@ class FffGcodeWriter : public NoCopy
749749
* \param mesh the mesh containing the layer of interest
750750
* \param part \param part The part for which to create gcode
751751
* \param infill_line_width line width of the infill
752-
* \return true if there needs to be a skin edge support wall in this layer, otherwise false
753752
*/
754-
static bool partitionInfillBySkinAbove(
753+
static void partitionInfillBySkinAbove(
755754
Shape& infill_below_skin,
756755
Shape& infill_not_below_skin,
757756
const LayerPlan& gcode_layer,

include/LayerPlan.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class LayerPlan : public NoCopy
5757
friend class LayerPlanBuffer;
5858
#ifdef BUILD_TESTS
5959
friend class AddTravelTest;
60-
friend class FffGcodeWriterTest_SurfaceGetsExtraInfillLinesUnderIt_Test;
60+
friend class DISABLED_FffGcodeWriterTest_SurfaceGetsExtraInfillLinesUnderIt_Test;
6161
friend class AntiOozeAmountsTest;
6262
FRIEND_TEST(AntiOozeAmountsTest, ComputeAntiOozeAmounts);
6363
#endif
@@ -167,6 +167,8 @@ class LayerPlan : public NoCopy
167167

168168
bool min_layer_time_used = false; //!< Wether or not the minimum layer time (cool_min_layer_time) was actually used in this layerplan.
169169

170+
std::map<const SliceMeshStorage*, MixedLinesSet> infill_lines_; //!< Infill lines generated for this layer
171+
170172
const std::vector<FanSpeedLayerTimeSettings> fan_speed_layer_time_settings_per_extruder_;
171173

172174
enum CombBoundary
@@ -417,6 +419,10 @@ class LayerPlan : public NoCopy
417419
*/
418420
void planPrime(double prime_blob_wipe_length = 10.0);
419421

422+
void setGeneratedInfillLines(const SliceMeshStorage* mesh, const MixedLinesSet& infill_lines);
423+
424+
const MixedLinesSet getGeneratedInfillLines(const SliceMeshStorage* mesh) const;
425+
420426
/*!
421427
* Add an extrusion move to a certain point, optionally with a different flow than the one in the \p config.
422428
*

include/LayerPlanBuffer.h

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#ifndef LAYER_PLAN_BUFFER_H
55
#define LAYER_PLAN_BUFFER_H
66

7+
#include <condition_variable>
78
#include <list>
89
#include <vector>
910

@@ -17,6 +18,7 @@ namespace cura
1718
class LayerPlan;
1819
class ExtruderPlan;
1920
class GCodeExport;
21+
struct LayerIndex;
2022

2123
/*!
2224
* Class for buffering multiple layer plans (\ref LayerPlan) / extruder plans within those layer plans, so that temperature commands can be inserted in earlier layer plans.
@@ -57,6 +59,9 @@ class LayerPlanBuffer
5759
*/
5860
std::list<LayerPlan*> buffer_;
5961

62+
std::mutex buffer_mutex_;
63+
std::condition_variable buffer_condition_variable_;
64+
6065
public:
6166
LayerPlanBuffer(GCodeExport& gcode)
6267
: gcode_(gcode)
@@ -66,11 +71,6 @@ class LayerPlanBuffer
6671

6772
void setPreheatConfig();
6873

69-
/*!
70-
* Push a new layer plan into the buffer
71-
*/
72-
void push(LayerPlan& layer_plan);
73-
7474
/*!
7575
* Push a new layer onto the buffer and handle the buffer.
7676
* Write a layer to gcode if it is popped out of the buffer.
@@ -85,6 +85,15 @@ class LayerPlanBuffer
8585
*/
8686
void flush();
8787

88+
/*!
89+
* Gets the layer plan for the given layer, once it has been completed. It will wait for completion if necessary
90+
* @param layer_nr The layer number to get the plan for
91+
* @return The completed layer plan
92+
* @warning Make sure you always ask for a layer plan below the one that is being processed. Since the layers processing is started bottom to top and the engine can be run
93+
* mono-threaded, asking for a layer above could lead to a deadlock because the processing of this layer will never start.
94+
*/
95+
const LayerPlan* getCompletedLayerPlan(const LayerIndex& layer_nr) const;
96+
8897
private:
8998
/*!
9099
* Process all layers in the buffer

include/TreeModelVolumes.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
namespace cura
2121
{
22-
constexpr coord_t EPSILON = 5;
2322
constexpr coord_t FUDGE_LENGTH = 50;
2423

2524
class SliceDataStorage;

0 commit comments

Comments
 (0)