mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-27 21:39:47 -07:00
Moved some math macros (sqr, lerp, clamp) to libslic3r.h
Added UNUSED macro to libslic3r.h, used it to reduce some compile warnings. Split the Int128 class from Clipper library to a separate file, extended Int128 with intrinsic types wherever possible for performance, added new geometric predicates. Added a draft of new FillRectilinear3, which should reduce overfill near the perimeters in the future.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include <limits>
|
||||
|
||||
#include "libslic3r.h"
|
||||
#include "Slicing.hpp"
|
||||
#include "SlicingAdaptive.hpp"
|
||||
#include "PrintConfig.hpp"
|
||||
@@ -308,19 +309,6 @@ std::vector<coordf_t> layer_height_profile_adaptive(
|
||||
return layer_height_profile;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T clamp(const T low, const T high, const T value)
|
||||
{
|
||||
return std::max(low, std::min(high, value));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T lerp(const T a, const T b, const T t)
|
||||
{
|
||||
assert(t >= T(-EPSILON) && t <= T(1.+EPSILON));
|
||||
return (1. - t) * a + t * b;
|
||||
}
|
||||
|
||||
void adjust_layer_height_profile(
|
||||
const SlicingParameters &slicing_params,
|
||||
std::vector<coordf_t> &layer_height_profile,
|
||||
|
||||
Reference in New Issue
Block a user