Skip to content

Commit 6196437

Browse files
committed
Complete documentation and figure out missing files
CURA-11978
1 parent 83fd0b3 commit 6196437

File tree

5 files changed

+39
-11
lines changed

5 files changed

+39
-11
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ set(engine_SRCS # Except main.cpp.
163163
src/utils/scoring/ExclusionAreaScoringCriterion.cpp
164164
src/utils/scoring/RandomScoringCriterion.cpp
165165

166-
src/geometry/Point2D.cpp
167166
src/geometry/Point2LL.cpp
168167
src/geometry/Point3LL.cpp
169168
src/geometry/Polygon.cpp

include/LayerPlan.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@ class LayerPlan : public NoCopy
8585
{
8686
Duration z_hop; //!< The duration of the Z hop start and end
8787
Duration travel; //!< The duration of the full travel
88-
89-
inline Duration totalDuration() const
90-
{
91-
return travel + 2.0 * z_hop;
92-
}
9388
};
9489

9590
enum class TravelRetractionState
@@ -835,6 +830,7 @@ class LayerPlan : public NoCopy
835830
* @param position The position to move to. The Z coordinate is an offset to the current layer position
836831
* @param speed The actual used speed
837832
* @param path_z_offset The global path Z offset to be applied
833+
* @param retract_distance The absolute retraction distance to be reached during this travel move, or nullopt to leave it unchanged
838834
* @note This function is to be used when dealing with 3D coordinates. If you have 2D coordinates, just call gcode.writeTravel()
839835
*/
840836
void writeTravelRelativeZ(

include/TravelAntiOozing.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Copyright (c) 2023 UltiMaker
2+
// CuraEngine is released under the terms of the AGPLv3 or higher
3+
4+
#ifndef TRAVELANTIOOZING_H
5+
#define TRAVELANTIOOZING_H
6+
7+
#include "geometry/Point2LL.h"
8+
#include "settings/types/Ratio.h"
9+
10+
namespace cura
11+
{
12+
13+
struct ZHopAntiOozing
14+
{
15+
double amount{ 0 }; //!< The absolute amount of retracted material (in mm) to be reached while the nozzle is moved up/down
16+
Ratio ratio; //!< The ratio of the full z-hop move that contains a retract/prime
17+
};
18+
19+
struct TravelAntiOozing
20+
{
21+
double amount_while_still{ 0 }; //!< The absolute amount of retracted material (in mm) to be reached while the nozzle is still
22+
ZHopAntiOozing z_hop; //!< The amount and ratio of retracted material to be processed during z-hop move
23+
double amount_while_travel{ 0 }; //!< The absolute amount of retracted material (in mm) to be reached while the nozzle is travelling
24+
Point2LL segment_split_position; //!< The intermediate position on the last/first segment that contains a retract/prime, where it should actually stop/start
25+
std::vector<double> amount_by_segment; //!< For each intermediate segment containing a retraction/prime, this is the absolute amount to be reached at the end of the segment
26+
};
27+
28+
} // namespace cura
29+
30+
#endif /* TRAVELANTIOOZING_H */

include/gcodeExport.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,13 @@ class GCodeExport : public NoCopy
118118

119119
struct RetractionAmounts
120120
{
121-
double old_e{ 0.0 };
122-
double new_e{ 0.0 };
123-
double diff_e{ 0.0 };
121+
double old_e{ 0.0 }; // The previous absolute retraction amount
122+
double new_e{ 0.0 }; // The new absolute retraction amount
123+
double diff_e{ 0.0 }; // The difference between the new and previous amount, which is to be processed
124124

125+
/*!
126+
* Indicates whether this retraction actually has something to process
127+
*/
125128
inline bool has_retraction() const
126129
{
127130
return std::abs(diff_e) >= 0.000001;
@@ -373,6 +376,7 @@ class GCodeExport : public NoCopy
373376
*
374377
* \param p location to go to
375378
* \param speed movement speed
379+
* \param retract_distance The absolute retraction distance to be reached during this travel, or nullopt to leave it unchanged
376380
*/
377381
void writeTravel(const Point3LL& p, const Velocity& speed, const std::optional<double> retract_distance = std::nullopt);
378382

@@ -438,7 +442,7 @@ class GCodeExport : public NoCopy
438442
* \param y build plate y
439443
* \param z build plate z
440444
* \param speed movement speed
441-
* \param retract_distance The retract disance to be reached during this travel, or nullopt to leave it unchanged
445+
* \param retract_distance The absolute retraction distance to be reached during this travel, or nullopt to leave it unchanged
442446
*/
443447
void writeTravel(const coord_t x, const coord_t y, const coord_t z, const Velocity& speed, const std::optional<double> retract_distance = std::nullopt);
444448

src/LayerPlan.cpp

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

66
#include <algorithm>
77
#include <cstring>
8-
#include <geometry/Point2D.h>
98
#include <numeric>
109
#include <optional>
1110

0 commit comments

Comments
 (0)