Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into CURA-11830_smart_seam…
Browse files Browse the repository at this point in the history
…_unretract
  • Loading branch information
wawanbreton committed May 24, 2024
2 parents 218f527 + 09dfa73 commit ac760c9
Show file tree
Hide file tree
Showing 43 changed files with 285 additions and 297 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/conan-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,23 @@ on:
tags:
- '[0-9]+.[0-9]+.[0-9]*'
- '[0-9]+.[0-9]+.[0-9]'
pull_request:
types: [opened, reopened, synchronize]
paths:
- 'include/**'
- 'src/**'
- 'test_package/**'
- 'conanfile.py'
- 'conandata.yml'
- 'CMakeLists.txt'
- '.github/workflows/conan-package.yml'
branches:
- main
- 'CURA-*'
- 'PP-*'
- 'NP-*'
- '[0-9].[0-9]*'
- '[0-9].[0-9][0-9]*'

jobs:
conan-recipe-version:
Expand All @@ -37,23 +54,23 @@ jobs:

conan-package-create-macos:
needs: [ conan-recipe-version, conan-package-export ]
if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) }}
if: ${{ ((github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) || github.event_name == 'pull_request') }}
uses: ultimaker/cura-workflows/.github/workflows/conan-package-create-macos.yml@main
with:
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
secrets: inherit

conan-package-create-windows:
needs: [ conan-recipe-version, conan-package-export ]
if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) }}
if: ${{ ((github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) || github.event_name == 'pull_request') }}
uses: ultimaker/cura-workflows/.github/workflows/conan-package-create-windows.yml@main
with:
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
secrets: inherit

conan-package-create-linux:
needs: [ conan-recipe-version, conan-package-export ]
if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) }}
if: ${{ ((github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) || github.event_name == 'pull_request') }}
uses: ultimaker/cura-workflows/.github/workflows/conan-package-create-linux.yml@main
with:
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
Expand Down
27 changes: 2 additions & 25 deletions .github/workflows/gcodeanalyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,28 +81,6 @@ jobs:
fetch-depth: 1
token: ${{ secrets.GITHUB_TOKEN }}

- name: Determine the corresponding Cura branch
id: curabranch
run: |
status_code=$(curl -s -o /dev/null -w "%{http_code}" "https://api.github.com/repos/ultimaker/cura/branches/${{ github.head_ref }}")
if [ "$status_code" -eq 200 ]; then
echo "The branch exists in Cura"
echo "branch=${{ github.head_ref }}" >> $GITHUB_OUTPUT
else
echo "branch=main" >> $GITHUB_OUTPUT
fi
- name: Checkout Cura
uses: actions/checkout@v3
with:
repository: 'Ultimaker/Cura'
ref: ${{ steps.curabranch.outputs.branch}}
path: 'Cura'
fetch-depth: 1
sparse-checkout: |
resources/definitions
resources/extruders
- name: Sync pip requirements
run: curl -O https://raw.githubusercontent.com/Ultimaker/cura-workflows/main/.github/workflows/requirements-runner.txt
working-directory: CuraEngine/.github/workflows
Expand Down Expand Up @@ -159,15 +137,14 @@ jobs:
${{ runner.os }}-conan-downloads-
- name: Install dependencies
run: conan install . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} -s build_type=Release --build=missing --update -g GitHubActionsRunEnv -g GitHubActionsBuildEnv -c tools.build:skip_test=True
run: conan install . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} -s build_type=Release --build=missing --update -g GitHubActionsRunEnv -g GitHubActionsBuildEnv -c tools.build:skip_test=True -o with_cura_resources=True
working-directory: CuraEngine

- name: Set Environment variables from Conan install (bash)
if: ${{ runner.os != 'Windows' }}
run: |
. ./activate_github_actions_runenv.sh
. ./activate_github_actions_buildenv.sh
echo "CURA_ENGINE_SEARCH_PATH=$GITHUB_WORKSPACE/Cura/resources/definitions:$GITHUB_WORKSPACE/Cura/resources/extruders" >> $GITHUB_ENV
working-directory: CuraEngine/build/Release/generators

- name: Build CuraEngine and tests
Expand All @@ -180,7 +157,7 @@ jobs:
run: |
for file in `ls ../NightlyTestModels/*.stl`;
do
( time ./build/Release/CuraEngine slice --force-read-parent --force-read-nondefault -v -p -j ../Cura/resources/definitions/ultimaker_s3.def.json -l $file -o ../`basename $file .stl`.gcode ) 2> ../`basename $file .stl`.time
( time ./build/Release/CuraEngine slice --force-read-parent --force-read-nondefault -v -p -j $CURA_RESOURCES/definitions/ultimaker_s3.def.json -l $file -o ../`basename $file .stl`.gcode ) 2> ../`basename $file .stl`.time
done
working-directory: CuraEngine

Expand Down
3 changes: 2 additions & 1 deletion benchmark/infill_benchmark.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 UltiMaker
// Copyright (c) 2024 UltiMaker
// CuraEngine is released under the terms of the AGPLv3 or higher

#ifndef CURAENGINE_INFILL_BENCHMARK_H
Expand All @@ -8,6 +8,7 @@

#include "geometry/OpenLinesSet.h"
#include "geometry/OpenPolyline.h"
#include "geometry/LinesSet.h"
#include "infill.h"

namespace cura
Expand Down
2 changes: 2 additions & 0 deletions conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ requirements_arcus:
- "arcus/5.3.1"
requirements_plugins:
- "curaengine_grpc_definitions/(latest)@ultimaker/testing"
requirements_cura_resources:
- "cura_resources/(latest)@ultimaker/testing"
5 changes: 5 additions & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class CuraEngineConan(ConanFile):
"enable_plugins": [True, False],
"enable_sentry": [True, False],
"enable_remote_plugins": [True, False],
"with_cura_resources": [True, False],
}
default_options = {
"enable_arcus": True,
Expand All @@ -40,6 +41,7 @@ class CuraEngineConan(ConanFile):
"enable_plugins": True,
"enable_sentry": False,
"enable_remote_plugins": False,
"with_cura_resources": False,
}

def set_version(self):
Expand Down Expand Up @@ -116,6 +118,9 @@ def requirements(self):
self.requires("grpc/1.50.1")
for req in self.conan_data["requirements_plugins"]:
self.requires(req)
if self.options.with_cura_resources:
for req in self.conan_data["requirements_cura_resources"]:
self.requires(req)
if self.options.enable_arcus or self.options.enable_plugins:
self.requires("protobuf/3.21.12")
self.requires("clipper/6.4.2@ultimaker/stable")
Expand Down
5 changes: 2 additions & 3 deletions include/FffGcodeWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@

#include "ExtruderUse.h"
#include "FanSpeedLayerTime.h"
#include "GCodePathConfig.h"
#include "LayerPlanBuffer.h"
#include "gcodeExport.h"
#include "settings/MeshPathConfigs.h"
#include "settings/PathConfigStorage.h" //For the MeshPathConfigs subclass.
#include "utils/ExtrusionLine.h" //Processing variable-width paths.
#include "utils/NoCopy.h"
#include "utils/gettime.h"

Expand All @@ -27,6 +25,7 @@ class SliceDataStorage;
class SliceMeshStorage;
class SliceLayer;
class SliceLayerPart;
struct MeshPathConfigs;

/*!
* Secondary stage in Fused Filament Fabrication processing: The generated polygons are used in the gcode generation.
Expand Down
2 changes: 2 additions & 0 deletions include/LayerPlan.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include "PathOrderOptimizer.h"
#include "SpaceFillType.h"
#include "gcodeExport.h"
#include "geometry/LinesSet.h"
#include "geometry/OpenLinesSet.h"
#include "geometry/Polygon.h"
#include "pathPlanning/GCodePath.h"
#include "pathPlanning/NozzleTempInsert.h"
Expand Down
6 changes: 2 additions & 4 deletions include/LayerPlanBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,15 @@
#include <list>
#include <vector>

#include "ExtruderPlan.h"
#include "LayerPlan.h"
#include "Preheat.h"
#include "gcodeExport.h"
#include "settings/Settings.h"
#include "settings/types/Duration.h"

namespace cura
{


class LayerPlan;
class ExtruderPlan;
class GCodeExport;

/*!
Expand Down
2 changes: 2 additions & 0 deletions include/TreeSupportTipGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include "TreeSupportEnums.h"
#include "TreeSupportSettings.h"
#include "boost/functional/hash.hpp" // For combining hashes
#include "geometry/LinesSet.h"
#include "geometry/OpenLinesSet.h"
#include "geometry/Polygon.h"
#include "polyclipping/clipper.hpp"
#include "settings/EnumSettings.h"
Expand Down
2 changes: 2 additions & 0 deletions include/TreeSupportUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include "TreeSupportEnums.h"
#include "TreeSupportSettings.h"
#include "boost/functional/hash.hpp" // For combining hashes
#include "geometry/LinesSet.h"
#include "geometry/OpenLinesSet.h"
#include "geometry/OpenPolyline.h"
#include "geometry/Polygon.h"
#include "infill.h"
Expand Down
2 changes: 1 addition & 1 deletion include/gcodeExport.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "settings/types/LayerIndex.h"
#include "settings/types/Temperature.h" //Bed temperature.
#include "settings/types/Velocity.h"
#include "sliceDataStorage.h"
#include "timeEstimate.h"
#include "utils/AABB3D.h" //To track the used build volume for the Griffin header.
#include "utils/NoCopy.h"
Expand All @@ -26,6 +25,7 @@ namespace cura
{

class RetractionConfig;
class SliceDataStorage;
struct WipeScriptConfig;

// The GCodeExport class writes the actual GCode. This is the only class that knows how GCode looks and feels.
Expand Down
4 changes: 4 additions & 0 deletions include/geometry/LinesSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class OpenPolyline;

enum class CheckNonEmptyParam
{
OnlyIfValid,
OnlyIfNotEmpty,
EvenIfEmpty
};
Expand Down Expand Up @@ -288,6 +289,9 @@ class LinesSet
os << "]";
return os;
}

private:
bool checkAdd(const LineType& line, CheckNonEmptyParam check_non_empty);
};

} // namespace cura
Expand Down
2 changes: 2 additions & 0 deletions include/infill.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#include <range/v3/range/concepts.hpp>

#include "geometry/LinesSet.h"
#include "geometry/OpenLinesSet.h"
#include "geometry/Point2LL.h"
#include "infill/LightningGenerator.h"
#include "infill/ZigzagConnectorProcessor.h"
Expand Down
7 changes: 3 additions & 4 deletions include/infill/GyroidInfill.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Copyright (c) 2020 Ultimaker B.V.
// Copyright (c) 2024 UltiMaker
// CuraEngine is released under the terms of the AGPLv3 or higher.

#include "../utils/Coord_t.h"
#include "geometry/LinesSet.h"
#include "geometry/OpenLinesSet.h"
#include "utils/Coord_t.h"

namespace cura
{

class Shape;

class GyroidInfill
Expand Down Expand Up @@ -38,5 +38,4 @@ class GyroidInfill

private:
};

} // namespace cura
9 changes: 5 additions & 4 deletions include/infill/LightningLayer.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 UltiMaker
// Copyright (c) 2024 UltiMaker
// CuraEngine is released under the terms of the AGPLv3 or higher

#ifndef LIGHTNING_LAYER_H
Expand All @@ -9,9 +9,11 @@
#include <unordered_map>
#include <vector>

#include "../utils/SquareGrid.h"
#include "../utils/polygonUtils.h"
#include "geometry/LinesSet.h"
#include "geometry/OpenLinesSet.h"
#include "infill/LightningTreeNode.h"
#include "utils/SquareGrid.h"
#include "utils/polygonUtils.h"

namespace cura
{
Expand Down Expand Up @@ -74,7 +76,6 @@ class LightningLayer

void fillLocator(SparseLightningTreeNodeGrid& tree_node_locator);
};

} // namespace cura

#endif // LIGHTNING_LAYER_H
4 changes: 3 additions & 1 deletion include/infill/LightningTreeNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
#include <optional>
#include <vector>

#include "../utils/polygonUtils.h"
#include "geometry/LinesSet.h"
#include "geometry/OpenLinesSet.h"
#include "geometry/Polygon.h"
#include "geometry/Shape.h"
#include "utils/polygonUtils.h"

namespace cura
{
Expand Down
1 change: 1 addition & 0 deletions include/infill/NoZigZagConnectorProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#define INFILL_NO_ZIGZAG_CONNECTOR_PROCESSOR_H

#include "ZigzagConnectorProcessor.h"
#include "geometry/OpenLinesSet.h"

namespace cura
{
Expand Down
2 changes: 2 additions & 0 deletions include/plugins/converters.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include "cura/plugins/slots/postprocess/v0/modify.pb.h"
#include "cura/plugins/slots/simplify/v0/modify.grpc.pb.h"
#include "cura/plugins/slots/simplify/v0/modify.pb.h"
#include "geometry/LinesSet.h"
#include "geometry/OpenLinesSet.h"
#include "geometry/Polygon.h"
#include "pathPlanning/GCodePath.h"
#include "pathPlanning/SpeedDerivatives.h"
Expand Down
15 changes: 7 additions & 8 deletions include/plugins/slotproxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@
#ifndef PLUGINS_SLOTPROXY_H
#define PLUGINS_SLOTPROXY_H

#include "plugins/converters.h"
#include "plugins/pluginproxy.h"
#include "plugins/types.h"
#include "plugins/validator.h"
#include "utils/types/char_range_literal.h"

#include <boost/asio/use_awaitable.hpp>

#include <concepts>
#include <functional>
#include <grpcpp/channel.h>
#include <memory>
#include <optional>

#include <boost/asio/use_awaitable.hpp>

#include "plugins/pluginproxy.h"
#include "plugins/types.h"
#include "plugins/validator.h"
#include "utils/types/char_range_literal.h"

namespace cura::plugins
{

Expand Down
6 changes: 0 additions & 6 deletions include/plugins/slots.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,16 @@
#include <tuple>
#include <utility>

#include "WallToolPaths.h"
#include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h"
#include "cura/plugins/slots/gcode_paths/v0/modify.grpc.pb.h"
#include "cura/plugins/slots/infill/v0/generate.grpc.pb.h"
#include "cura/plugins/slots/postprocess/v0/modify.grpc.pb.h"
#include "cura/plugins/slots/simplify/v0/modify.grpc.pb.h"
#include "cura/plugins/v0/slot_id.pb.h"
#include "geometry/Point2LL.h"
#include "geometry/Polygon.h"
#include "infill.h"
#include "plugins/converters.h"
#include "plugins/slotproxy.h"
#include "plugins/types.h"
#include "plugins/validator.h"
#include "utils/Simplify.h" // TODO: Remove once the simplify slot has been removed
#include "utils/types/char_range_literal.h"

namespace cura
{
Expand Down
Loading

0 comments on commit ac760c9

Please sign in to comment.