mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-05 04:54:08 -06:00
Merge remote-tracking branch 'remotes/origin/lh_multi_material_segmentation' into vb_print_regions
This commit is contained in:
commit
980ca195f5
39 changed files with 2691 additions and 146 deletions
|
@ -55,8 +55,8 @@ static std::vector<coordf_t> perpendPoints(const coordf_t offset, const size_t b
|
|||
static inline void trim(Pointfs &pts, coordf_t minX, coordf_t minY, coordf_t maxX, coordf_t maxY)
|
||||
{
|
||||
for (Vec2d &pt : pts) {
|
||||
pt(0) = clamp(minX, maxX, pt(0));
|
||||
pt(1) = clamp(minY, maxY, pt(1));
|
||||
pt.x() = std::clamp(pt.x(), minX, maxX);
|
||||
pt.y() = std::clamp(pt.y(), minY, maxY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ static inline Polyline make_wave(
|
|||
polyline.points.reserve(points.size());
|
||||
for (auto& point : points) {
|
||||
point(1) += offset;
|
||||
point(1) = clamp(0., height, double(point(1)));
|
||||
point(1) = std::clamp(double(point.y()), 0., height);
|
||||
if (vertical)
|
||||
std::swap(point(0), point(1));
|
||||
polyline.points.emplace_back((point * scaleFactor).cast<coord_t>());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue