Skip to content

Commit

Permalink
NP 207 conan wasm package (#2084)
Browse files Browse the repository at this point in the history
  • Loading branch information
jellespijker authored Jun 5, 2024
2 parents c87105c + 793e742 commit b93f69b
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 18 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/conan-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,32 @@ 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')) || github.event_name == 'pull_request') }}
if: ${{ ((github.event_name == 'push' && (github.ref_name == 'main' || 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')) || github.event_name == 'pull_request') }}
if: ${{ ((github.event_name == 'push' && (github.ref_name == 'main' || 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')) || github.event_name == 'pull_request') }}
if: ${{ ((github.event_name == 'push' && (github.ref_name == 'main' || 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 }}
secrets: inherit

conan-package-create-wasm:
needs: [ conan-recipe-version, conan-package-export ]
if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) }}
uses: ultimaker/cura-workflows/.github/workflows/conan-package-create-wasm.yml@main
with:
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
secrets: inherit
3 changes: 3 additions & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ def build(self):
self.run(f"sentry-cli --auth-token {os.environ['SENTRY_TOKEN']} releases set-commits -o {sentry_org} -p {sentry_project} --commit \"Ultimaker/CuraEngine@{self.conan_data['commit']}\" {self.version}")
self.run(f"sentry-cli --auth-token {os.environ['SENTRY_TOKEN']} releases finalize -o {sentry_org} -p {sentry_project} {self.version}")

def deploy(self):
copy(self, "CuraEngine*", src=os.path.join(self.package_folder, "bin"), dst=self.install_folder)

def package(self):
match self.settings.os:
case "Windows":
Expand Down
2 changes: 1 addition & 1 deletion include/BeadingStrategy/LimitedBeadingStrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class LimitedBeadingStrategy : public BeadingStrategy
coord_t getOptimalThickness(coord_t bead_count) const override;
coord_t getTransitionThickness(coord_t lower_bead_count) const override;
coord_t getOptimalBeadCount(coord_t thickness) const override;
virtual std::string toString() const override;
std::string toString() const override;

coord_t getTransitioningLength(coord_t lower_bead_count) const override;

Expand Down
2 changes: 1 addition & 1 deletion include/BeadingStrategy/OuterWallInsetBeadingStrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class OuterWallInsetBeadingStrategy : public BeadingStrategy
coord_t getOptimalBeadCount(coord_t thickness) const override;
coord_t getTransitioningLength(coord_t lower_bead_count) const override;

virtual std::string toString() const;
std::string toString() const override;

private:
BeadingStrategyPtr parent_;
Expand Down
2 changes: 1 addition & 1 deletion include/BeadingStrategy/RedistributeBeadingStrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class RedistributeBeadingStrategy : public BeadingStrategy
coord_t getTransitioningLength(coord_t lower_bead_count) const override;
double getTransitionAnchorPos(coord_t lower_bead_count) const override;

virtual std::string toString() const;
std::string toString() const override;

protected:
/*!
Expand Down
16 changes: 8 additions & 8 deletions include/BeadingStrategy/WideningBeadingStrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ class WideningBeadingStrategy : public BeadingStrategy

virtual ~WideningBeadingStrategy() override = default;

virtual Beading compute(coord_t thickness, coord_t bead_count) const override;
virtual coord_t getOptimalThickness(coord_t bead_count) const override;
virtual coord_t getTransitionThickness(coord_t lower_bead_count) const override;
virtual coord_t getOptimalBeadCount(coord_t thickness) const override;
virtual coord_t getTransitioningLength(coord_t lower_bead_count) const override;
virtual double getTransitionAnchorPos(coord_t lower_bead_count) const override;
virtual std::vector<coord_t> getNonlinearThicknesses(coord_t lower_bead_count) const override;
virtual std::string toString() const override;
Beading compute(coord_t thickness, coord_t bead_count) const override;
coord_t getOptimalThickness(coord_t bead_count) const override;
coord_t getTransitionThickness(coord_t lower_bead_count) const override;
coord_t getOptimalBeadCount(coord_t thickness) const override;
coord_t getTransitioningLength(coord_t lower_bead_count) const override;
double getTransitionAnchorPos(coord_t lower_bead_count) const override;
std::vector<coord_t> getNonlinearThicknesses(coord_t lower_bead_count) const override;
std::string toString() const override;

protected:
BeadingStrategyPtr parent_;
Expand Down
8 changes: 4 additions & 4 deletions src/BeadingStrategy/BeadingStrategyFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,22 @@ BeadingStrategyPtr BeadingStrategyFactory::makeStrategy(
wall_add_middle_threshold,
inward_distributed_center_wall_count);
spdlog::debug("Applying the Redistribute meta-strategy with outer-wall width = {}, inner-wall width = {}", preferred_bead_width_outer, preferred_bead_width_inner);
ret = make_unique<RedistributeBeadingStrategy>(preferred_bead_width_outer, minimum_variable_line_ratio, move(ret));
ret = make_unique<RedistributeBeadingStrategy>(preferred_bead_width_outer, minimum_variable_line_ratio, std::move(ret));

if (print_thin_walls)
{
spdlog::debug("Applying the Widening Beading meta-strategy with minimum input width {} and minimum output width {}.", min_feature_size, min_bead_width);
ret = make_unique<WideningBeadingStrategy>(move(ret), min_feature_size, min_bead_width);
ret = make_unique<WideningBeadingStrategy>(std::move(ret), min_feature_size, min_bead_width);
}
if (outer_wall_offset > 0)
{
spdlog::debug("Applying the OuterWallOffset meta-strategy with offset = {}", outer_wall_offset);
ret = make_unique<OuterWallInsetBeadingStrategy>(outer_wall_offset, move(ret));
ret = make_unique<OuterWallInsetBeadingStrategy>(outer_wall_offset, std::move(ret));
}

// Apply the LimitedBeadingStrategy last, since that adds a 0-width marker wall which other beading strategies shouldn't touch.
spdlog::debug("Applying the Limited Beading meta-strategy with maximum bead count = {}", max_bead_count);
ret = make_unique<LimitedBeadingStrategy>(max_bead_count, move(ret));
ret = make_unique<LimitedBeadingStrategy>(max_bead_count, std::move(ret));
return ret;
}
} // namespace cura
1 change: 1 addition & 0 deletions src/slicer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "Application.h"
#include "Slice.h"
#include "geometry/OpenPolyline.h"
#include "geometry/SingleShape.h" // Needed in order to call splitIntoParts()
#include "plugins/slots.h"
#include "raft.h"
#include "settings/AdaptiveLayerHeights.h"
Expand Down

0 comments on commit b93f69b

Please sign in to comment.