Skip to content

Commit f9bf324

Browse files
authored
Merge branch '5.10' into NP-732-for-neoprep-staging
2 parents e36bf62 + 3bf923f commit f9bf324

File tree

9 files changed

+59
-32
lines changed

9 files changed

+59
-32
lines changed

conandata.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "5.11.0-alpha.0"
1+
version: "5.10.0"
22
commit: "unknown"
33
requirements:
44
- "scripta/[>=1.1.0]@ultimaker/testing"
@@ -7,4 +7,4 @@ requirements_arcus:
77
requirements_plugins:
88
- "curaengine_grpc_definitions/0.3.1"
99
requirements_cura_resources:
10-
- "cura_resources/5.11.0-alpha.0@ultimaker/testing"
10+
- "cura_resources/5.10.0"

conanfile.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class CuraEngineConan(ConanFile):
2323
exports = "LICENSE*"
2424
settings = "os", "compiler", "build_type", "arch"
2525
package_type = "application"
26-
python_requires = "sentrylibrary/1.0.0", "npmpackage/[>=1.0.0]@ultimaker/stable"
26+
python_requires = "sentrylibrary/1.0.0", "npmpackage/[>=1.0.0]"
2727
python_requires_extend = "sentrylibrary.SentryLibrary"
2828

2929
options = {
@@ -108,8 +108,6 @@ def validate(self):
108108

109109
def build_requirements(self):
110110
self.test_requires("standardprojectsettings/[>=0.2.0]")
111-
if self.options.enable_arcus or self.options.enable_plugins:
112-
self.tool_requires("protobuf/3.21.12")
113111
if not self.conf.get("tools.build:skip_test", False, check_type=bool):
114112
self.test_requires("gtest/1.14.0")
115113
if self.options.enable_benchmarks:
@@ -126,16 +124,13 @@ def requirements(self):
126124
self.requires(req)
127125
if self.options.enable_plugins:
128126
self.requires("neargye-semver/0.3.0")
129-
self.requires("asio-grpc/2.9.2")
130127
for req in self.conan_data["requirements_plugins"]:
131128
self.requires(req)
132129
if self.options.with_cura_resources:
133130
for req in self.conan_data["requirements_cura_resources"]:
134131
self.requires(req)
135-
if self.options.enable_arcus or self.options.enable_plugins:
136-
self.requires("protobuf/3.21.12")
137132
self.requires("clipper/6.4.2@ultimaker/stable")
138-
self.requires("boost/1.83.0")
133+
self.requires("boost/1.86.0")
139134
self.requires("rapidjson/cci.20230929")
140135
self.requires("stb/cci.20230920")
141136
self.requires("spdlog/1.12.0")

include/FffGcodeWriter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ class FffGcodeWriter : public NoCopy
377377
const SliceMeshStorage& mesh,
378378
const size_t extruder_nr,
379379
const MeshPathConfigs& mesh_config,
380-
const SliceLayerPart& part,
380+
SliceLayerPart& part,
381381
LayerPlan& gcode_layer) const;
382382

383383
/*!
@@ -448,7 +448,7 @@ class FffGcodeWriter : public NoCopy
448448
const SliceMeshStorage& mesh,
449449
const size_t extruder_nr,
450450
const MeshPathConfigs& mesh_config,
451-
const SliceLayerPart& part) const;
451+
SliceLayerPart& part) const;
452452

453453
/*!
454454
* Generate the a spiralized wall for a given layer part.

include/utils/SVG.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class SVG : NoCopy
147147

148148
void writePolygons(const Shape& polys, const ColorObject color = Color::BLACK, const double stroke_width = 1.0, const bool flush = true) const;
149149

150-
void writePolygon(Polygon poly, const ColorObject color = Color::BLACK, const double stroke_width = 1.0, const bool flush = true) const;
150+
void writePolygon(const Polygon& poly, const ColorObject color = Color::BLACK, const double stroke_width = 1.0, const bool flush = true) const;
151151

152152
void writePolylines(const Shape& polys, const ColorObject color = Color::BLACK, const double stroke_width = 1.0, const bool flush = true) const;
153153

src/FffGcodeWriter.cpp

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1790,7 +1790,7 @@ void FffGcodeWriter::addMeshLayerToGCode(
17901790
const MeshPathConfigs& mesh_config,
17911791
LayerPlan& gcode_layer) const
17921792
{
1793-
const auto& mesh = *mesh_ptr;
1793+
auto& mesh = *mesh_ptr;
17941794
if (gcode_layer.getLayerNr() > mesh.layer_nr_max_filled_layer)
17951795
{
17961796
return;
@@ -1801,7 +1801,7 @@ void FffGcodeWriter::addMeshLayerToGCode(
18011801
return;
18021802
}
18031803

1804-
const SliceLayer& layer = mesh.layers[gcode_layer.getLayerNr()];
1804+
SliceLayer& layer = mesh.layers[gcode_layer.getLayerNr()];
18051805

18061806
if (layer.parts.empty())
18071807
{
@@ -1819,8 +1819,8 @@ void FffGcodeWriter::addMeshLayerToGCode(
18191819
mesh.settings.get<EZSeamCornerPrefType>("z_seam_corner"),
18201820
mesh.settings.get<coord_t>("wall_line_width_0") * 2);
18211821
}
1822-
PathOrderOptimizer<const SliceLayerPart*> part_order_optimizer(gcode_layer.getLastPlannedPositionOrStartingPosition(), z_seam_config);
1823-
for (const SliceLayerPart& part : layer.parts)
1822+
PathOrderOptimizer<SliceLayerPart*> part_order_optimizer(gcode_layer.getLastPlannedPositionOrStartingPosition(), z_seam_config);
1823+
for (SliceLayerPart& part : layer.parts)
18241824
{
18251825
if (part.outline.empty())
18261826
{
@@ -1831,7 +1831,7 @@ void FffGcodeWriter::addMeshLayerToGCode(
18311831

18321832
part_order_optimizer.optimize(false);
18331833

1834-
for (const PathOrdering<const SliceLayerPart*>& path : part_order_optimizer.paths_)
1834+
for (const PathOrdering<SliceLayerPart*>& path : part_order_optimizer.paths_)
18351835
{
18361836
addMeshPartToGCode(storage, mesh, extruder_nr, mesh_config, *path.vertices_, gcode_layer);
18371837
}
@@ -1853,7 +1853,7 @@ void FffGcodeWriter::addMeshPartToGCode(
18531853
const SliceMeshStorage& mesh,
18541854
const size_t extruder_nr,
18551855
const MeshPathConfigs& mesh_config,
1856-
const SliceLayerPart& part,
1856+
SliceLayerPart& part,
18571857
LayerPlan& gcode_layer) const
18581858
{
18591859
const Settings& mesh_group_settings = Application::getInstance().current_slice_->scene.current_mesh_group->settings;
@@ -2976,7 +2976,7 @@ bool FffGcodeWriter::processInsets(
29762976
const SliceMeshStorage& mesh,
29772977
const size_t extruder_nr,
29782978
const MeshPathConfigs& mesh_config,
2979-
const SliceLayerPart& part) const
2979+
SliceLayerPart& part) const
29802980
{
29812981
bool added_something = false;
29822982
if (extruder_nr != mesh.settings.get<ExtruderTrain&>("wall_0_extruder_nr").extruder_nr_ && extruder_nr != mesh.settings.get<ExtruderTrain&>("wall_x_extruder_nr").extruder_nr_)
@@ -3099,7 +3099,16 @@ bool FffGcodeWriter::processInsets(
30993099
// which is required because when the walls are being generated, the vertices do not fall on the part's outline
31003100
// but, instead, are 1/2 a line width inset from the outline
31013101

3102-
gcode_layer.setBridgeWallMask(compressed_air.offset(max_air_gap + half_outer_wall_width));
3102+
Shape bridge_mask = compressed_air.offset(max_air_gap + half_outer_wall_width);
3103+
gcode_layer.setBridgeWallMask(bridge_mask);
3104+
3105+
// Override flooring/skin areas to register bridging areas to be treated as normal skin
3106+
for (SkinPart& skin_part : part.skin_parts)
3107+
{
3108+
Shape moved_area = skin_part.flooring_fill.intersection(bridge_mask).offset(10);
3109+
skin_part.flooring_fill = skin_part.flooring_fill.difference(moved_area);
3110+
skin_part.skin_fill = skin_part.skin_fill.unionPolygons(moved_area);
3111+
}
31033112
}
31043113
else
31053114
{

src/geometry/Shape.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ size_t Shape::findInside(const Point2LL& p, bool border_result) const
262262
{
263263
if (empty())
264264
{
265-
return 0;
265+
return NO_INDEX;
266266
}
267267

268268
// NOTE: Keep these vectors fixed-size, they replace an (non-standard, sized at runtime) arrays.

src/path_ordering.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ const PointsSet& PathOrdering<const SliceLayerPart*>::getVertexData()
2828
return vertices_->outline.outerPolygon();
2929
}
3030

31+
template<>
32+
const PointsSet& PathOrdering<SliceLayerPart*>::getVertexData()
33+
{
34+
return vertices_->outline.outerPolygon();
35+
}
36+
3137
template<>
3238
const PointsSet& PathOrdering<const SupportInfillPart*>::getVertexData()
3339
{

src/support.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <fstream> // ifstream.good()
99
#include <utility> // pair
1010

11+
#include <range/v3/algorithm/all_of.hpp>
1112
#include <range/v3/view/concat.hpp>
1213
#include <range/v3/view/drop.hpp>
1314
#include <range/v3/view/drop_last.hpp>
@@ -1013,6 +1014,23 @@ void AreaSupport::generateSupportAreasForMesh(
10131014
return;
10141015
}
10151016

1017+
if (ranges::all_of(
1018+
mesh.overhang_areas,
1019+
[](const Shape& overhang_area)
1020+
{
1021+
return overhang_area.empty();
1022+
})
1023+
&& ranges::all_of(
1024+
mesh.full_overhang_areas,
1025+
[](const Shape& overhang_area)
1026+
{
1027+
return overhang_area.empty();
1028+
}))
1029+
{
1030+
// Mesh has no overhang, skip support generation
1031+
return;
1032+
}
1033+
10161034
// Compute the areas that are disallowed by the X/Y distance.
10171035
std::vector<Shape> xy_disallowed_per_layer;
10181036
xy_disallowed_per_layer.resize(layer_count);

src/utils/SVG.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,13 @@ void SVG::handleFlush(const bool flush) const
6969

7070

7171
SVG::SVG(std::string filename, AABB aabb, Point2LL canvas_size, ColorObject background)
72-
: SVG(
73-
filename,
74-
aabb,
75-
std::min(
76-
static_cast<double>(canvas_size.X - canvas_size.X / 5 * 2) / static_cast<double>(aabb.max_.X - aabb.min_.X),
77-
static_cast<double>(canvas_size.Y - canvas_size.Y / 5) / static_cast<double>(aabb.max_.Y - aabb.min_.Y)),
78-
canvas_size,
79-
background)
72+
: SVG(filename,
73+
aabb,
74+
std::min(
75+
static_cast<double>(canvas_size.X - canvas_size.X / 5 * 2) / static_cast<double>(aabb.max_.X - aabb.min_.X),
76+
static_cast<double>(canvas_size.Y - canvas_size.Y / 5) / static_cast<double>(aabb.max_.Y - aabb.min_.Y)),
77+
canvas_size,
78+
background)
8079
{
8180
}
8281

@@ -355,7 +354,7 @@ void SVG::writePolygons(const Shape& polys, const ColorObject color, const doubl
355354
handleFlush(flush);
356355
}
357356

358-
void SVG::writePolygon(const Polygon poly, const ColorObject color, const double stroke_width, const bool flush) const
357+
void SVG::writePolygon(const Polygon& poly, const ColorObject color, const double stroke_width, const bool flush) const
359358
{
360359
if (poly.size() == 0)
361360
{
@@ -364,7 +363,7 @@ void SVG::writePolygon(const Polygon poly, const ColorObject color, const double
364363
int size = static_cast<int>(poly.size());
365364
Point2LL p0 = poly.back();
366365
int i = 0;
367-
for (Point2LL p1 : poly)
366+
for (const Point2LL& p1 : poly)
368367
{
369368
if (color.color_ == Color::RAINBOW)
370369
{
@@ -382,7 +381,7 @@ void SVG::writePolygon(const Polygon poly, const ColorObject color, const double
382381
}
383382
else
384383
{
385-
writeLine(p0, p1, color, stroke_width);
384+
writeLine(p0, p1, color, stroke_width, false);
386385
}
387386
p0 = p1;
388387
i++;

0 commit comments

Comments
 (0)