OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
FillCornerSmoothing.cpp File Reference
#include <algorithm>
#include <array>
#include <cstddef>
#include <map>
#include <vector>
#include <utility>
#include <cmath>
#include <cstdlib>
#include "FillCornerSmoothing.hpp"
#include "libslic3r/Point.hpp"
#include "libslic3r/libslic3r.h"
#include "libslic3r/Polyline.hpp"
#include "libslic3r/Polygon.hpp"
Include dependency graph for FillCornerSmoothing.cpp:

Go to the source code of this file.

Classes

struct  Slic3r::UnitCorner
struct  Slic3r::CornerShapes

Namespaces

namespace  Slic3r
 |/ Copyright (c) Prusa Research 2020 - 2023 Enrico Turri @enricoturri1966 |/ |/ PrusaSlicer is released under the terms of the AGPLv3 or higher |/

Typedefs

using Slic3r::ControlPoints = std::array<Vec2d, 6>

Functions

static ControlPoints Slic3r::bezier_control_points (const double reach, const Vec2d &outgoing)
static std::pair< Vec2d, Vec2d > Slic3r::bezier_derivatives (const ControlPoints &control, const double t)
static Vec2d Slic3r::bezier_point (const ControlPoints &control, const double t)
static double Slic3r::peak_curvature_by_reach (const double cosine)
static double Slic3r::tangent_polygon (const double cosine, const size_t count, std::vector< Vec2d > &vertices)
static const UnitCorner & Slic3r::unit_corner (const double cosine, const size_t count)
static Points Slic3r::smooth_corners (const Points &points, const bool polygon, CornerSmoother &smoother)
void Slic3r::smooth_polyline_corners (Polyline &polyline, const CornerSmoothing &smoothing, const double max_corner_distance, const CornerFilter &corner_filter)
void Slic3r::smooth_polylines_corners (Polylines &polylines, const CornerSmoothing &smoothing, const double max_corner_distance, const CornerFilter &corner_filter)
void Slic3r::smooth_polygons_corners (Polygons &polygons, const CornerSmoothing &smoothing, const double max_corner_distance, const CornerFilter &corner_filter)

Variables

static constexpr const double Slic3r::min_smoothed_turn_cosine = -0.9
static constexpr const double Slic3r::control_spacing = 0.3
static constexpr const size_t Slic3r::max_corner_vertices = 256
static constexpr const size_t Slic3r::max_cached_corners = 4096
static CornerShapes Slic3r::corner_shapes

Class Documentation

◆ Slic3r::UnitCorner

struct Slic3r::UnitCorner
Collaboration diagram for Slic3r::UnitCorner:
Class Members
double deviation { 0. }
vector< Vec2d > vertices

◆ Slic3r::CornerShapes

struct Slic3r::CornerShapes
Collaboration diagram for Slic3r::CornerShapes:
Class Members
map< pair< double, size_t >, UnitCorner > corners
map< double, double > peak_curvatures