SLA backend refactored, except Hollowing

This commit is contained in:
tamasmeszaros 2021-05-21 14:08:05 +02:00
parent 1c35dfe591
commit 1009f78862
22 changed files with 687 additions and 404 deletions

View file

@ -6,6 +6,8 @@
#include <cmath>
#include <string>
struct indexed_triangle_set;
namespace Slic3r {
class ExPolygon;
@ -13,25 +15,23 @@ class Polygon;
using ExPolygons = std::vector<ExPolygon>;
using Polygons = std::vector<Polygon>;
class TriangleMesh;
namespace sla {
using ThrowOnCancel = std::function<void(void)>;
/// Calculate the polygon representing the silhouette.
void pad_blueprint(
const TriangleMesh &mesh, // input mesh
const indexed_triangle_set &mesh, // input mesh
ExPolygons & output, // Output will be merged with
const std::vector<float> &, // Exact Z levels to sample
ThrowOnCancel thrfn = [] {}); // Function that throws if cancel was requested
void pad_blueprint(
const TriangleMesh &mesh,
ExPolygons & output,
float samplingheight = 0.1f, // The height range to sample
float layerheight = 0.05f, // The sampling height
ThrowOnCancel thrfn = [] {});
const indexed_triangle_set &mesh,
ExPolygons & output,
float samplingheight = 0.1f, // The height range to sample
float layerheight = 0.05f, // The sampling height
ThrowOnCancel thrfn = [] {});
struct PadConfig {
double wall_thickness_mm = 1.;
@ -82,11 +82,12 @@ struct PadConfig {
std::string validate() const;
};
void create_pad(const ExPolygons &support_contours,
const ExPolygons &model_contours,
TriangleMesh & output_mesh,
const PadConfig & = PadConfig(),
ThrowOnCancel throw_on_cancel = []{});
void create_pad(
const ExPolygons & support_contours,
const ExPolygons & model_contours,
indexed_triangle_set &output_mesh,
const PadConfig & = PadConfig(),
ThrowOnCancel throw_on_cancel = [] {});
} // namespace sla
} // namespace Slic3r