Skip to content

Commit a4fcfba

Browse files
committed
Merge branch 'main' into CURA-12474_set-fixed-0-gap-for-brim-support
2 parents ebdba8d + 2630cc4 commit a4fcfba

File tree

10 files changed

+24
-19
lines changed

10 files changed

+24
-19
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ if (ENABLE_THREADING)
279279
use_threads(CuraEngine)
280280
endif ()
281281

282-
if (CMAKE_CXX_PLATFORM_ID STREQUAL "emscripten")
282+
if (EMSCRIPTEN)
283283
message(STATUS "Building for Emscripten")
284284
target_link_options(_CuraEngine
285285
PUBLIC
@@ -301,7 +301,7 @@ if (CMAKE_CXX_PLATFORM_ID STREQUAL "emscripten")
301301
$<$<CONFIG:Debug>:SHELL:-g3>
302302
$<$<CONFIG:Debug>:SHELL:-gsource-map>
303303
"SHELL:-lembind"
304-
"SHELL:--embind-emit-tsd CuraEngine.d.ts"
304+
"SHELL:--emit-tsd CuraEngine.d.ts"
305305
)
306306
endif ()
307307

conanfile.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ def requirements(self):
133133
self.requires("boost/1.86.0")
134134
self.requires("rapidjson/cci.20230929")
135135
self.requires("stb/cci.20230920")
136-
self.requires("spdlog/1.12.0")
137-
self.requires("fmt/10.2.1")
136+
self.requires("spdlog/1.15.1")
137+
self.requires("fmt/11.1.3")
138138
self.requires("range-v3/0.12.0")
139139
self.requires("zlib/1.3.1")
140140
self.requires("mapbox-wagyu/0.5.0@ultimaker/stable")
@@ -190,6 +190,11 @@ def layout(self):
190190
self.cpp.build.includedirs = ["."] # To package the generated headers
191191
self.cpp.package.libs = ["_CuraEngine"]
192192

193+
if self.settings.os == "Emscripten":
194+
self.cpp.build.bin = ["CuraEngine.js"]
195+
self.cpp.package.bin = ["CuraEngine.js"]
196+
self.cpp.build.bindirs += ["CuraEngine"]
197+
193198
def build(self):
194199
cmake = CMake(self)
195200
cmake.configure()

include/plugins/types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ template<>
1919
struct formatter<cura::plugins::v0::SlotID>
2020
{
2121
template<typename FormatContext>
22-
auto format(cura::plugins::v0::SlotID slot_id, FormatContext& ctx)
22+
auto format(cura::plugins::v0::SlotID slot_id, FormatContext& ctx) const
2323
{
2424
std::string slot_name;
2525

@@ -67,7 +67,7 @@ struct formatter<grpc::string_ref>
6767
}
6868

6969
template<typename FormatContext>
70-
auto format(const grpc::string_ref& str, FormatContext& ctx)
70+
auto format(const grpc::string_ref& str, FormatContext& ctx) const
7171
{
7272
return format_to(ctx.out(), "{}", std::string_view{ str.data(), str.size() });
7373
}

include/settings/types/Duration.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ struct Duration
7171
double value_ = 0;
7272
};
7373

74-
constexpr Duration operator"" _s(const long double seconds)
74+
constexpr Duration operator""_s(const long double seconds)
7575
{
7676
return Duration(static_cast<double>(seconds));
7777
}

include/settings/types/Ratio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ struct Ratio : public utils::NumericFacade<double>
3232
: base_type{ static_cast<value_type>(numerator) / static_cast<value_type>(divisor) } {};
3333
};
3434

35-
constexpr Ratio operator"" _r(const long double ratio)
35+
constexpr Ratio operator""_r(const long double ratio)
3636
{
3737
return { ratio };
3838
}

include/utils/Coord_t.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ namespace cura
1616

1717
using coord_t = ClipperLib::cInt;
1818

19-
static inline coord_t operator"" _mu(unsigned long long i)
19+
static inline coord_t operator""_mu(unsigned long long i)
2020
{
2121
return static_cast<coord_t>(i);
2222
}
2323

2424
#define INT2MM(n) (static_cast<double>(n) / 1000.0)
2525
#define INT2MM2(n) (static_cast<double>(n) / 1000000.0)
26-
#define MM2INT(n) (static_cast<coord_t>((n)*1000 + 0.5 * (((n) > 0) - ((n) < 0))))
27-
#define MM2_2INT(n) (static_cast<coord_t>((n)*1000000 + 0.5 * (((n) > 0) - ((n) < 0))))
28-
#define MM3_2INT(n) (static_cast<coord_t>((n)*1000000000 + 0.5 * (((n) > 0) - ((n) < 0))))
26+
#define MM2INT(n) (static_cast<coord_t>((n) * 1000 + 0.5 * (((n) > 0) - ((n) < 0))))
27+
#define MM2_2INT(n) (static_cast<coord_t>((n) * 1000000 + 0.5 * (((n) > 0) - ((n) < 0))))
28+
#define MM3_2INT(n) (static_cast<coord_t>((n) * 1000000000 + 0.5 * (((n) > 0) - ((n) < 0))))
2929

3030
#define INT2MICRON(n) ((n) / 1)
31-
#define MICRON2INT(n) ((n)*1)
31+
#define MICRON2INT(n) ((n) * 1)
3232

3333
template<utils::floating_point FactorType>
3434
[[nodiscard]] inline coord_t lerp(coord_t a, coord_t b, FactorType t)

include/utils/format/filesystem_path.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct formatter<std::filesystem::path> : formatter<string_view>
3030
}
3131

3232
template<typename FormatContext>
33-
auto format(const std::filesystem::path& path, FormatContext& ctx)
33+
auto format(const std::filesystem::path& path, FormatContext& ctx) const
3434
{
3535
return formatter<string_view>::format(anonymizePath(path.generic_string()), ctx);
3636
}

include/utils/format/thread_id.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
#ifndef UTILS_FORMAT_THREAD_ID_H
55
#define UTILS_FORMAT_THREAD_ID_H
66

7-
#include <fmt/core.h>
8-
97
#include <sstream>
108
#include <string_view>
119
#include <thread>
1210

11+
#include <fmt/core.h>
12+
1313
namespace fmt
1414
{
1515
template<>
1616
struct formatter<std::thread::id> : formatter<string_view>
1717
{
1818
template<typename FormatContext>
19-
auto format(std::thread::id thread_id, FormatContext& ctx)
19+
auto format(std::thread::id thread_id, FormatContext& ctx) const
2020
{
2121
std::ostringstream oss;
2222
oss << thread_id;

src/TreeSupportTipGenerator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ TreeSupportTipGenerator::TreeSupportTipGenerator(const SliceMeshStorage& mesh, T
6666

6767
if (max_overhang_speed < 2)
6868
{
69-
max_overhang_insert_lag_ = std::numeric_limits<coord_t>::max();
69+
max_overhang_insert_lag_ = std::numeric_limits<size_t>::max();
7070
}
7171
else
7272
{

src/WallToolPaths.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const std::vector<VariableWidthLines>& WallToolPaths::generate()
131131
const Ratio wall_add_middle_threshold = std::max(1.0, std::min(99.0, 100.0 * min_odd_wall_line_width / wall_line_width_x)) / 100.0;
132132

133133
const int wall_distribution_count = settings_.get<int>("wall_distribution_count");
134-
const size_t max_bead_count = (inset_count_ < std::numeric_limits<coord_t>::max() / 2) ? 2 * inset_count_ : std::numeric_limits<coord_t>::max();
134+
const size_t max_bead_count = (inset_count_ < std::numeric_limits<size_t>::max() / 2) ? 2 * inset_count_ : std::numeric_limits<size_t>::max();
135135
const auto beading_strat = BeadingStrategyFactory::makeStrategy(
136136
bead_width_0_,
137137
bead_width_x_,

0 commit comments

Comments
 (0)