SPE-742: Builtin pad feature in zero elevation mode.

This commit is contained in:
tamasmeszaros 2019-06-11 12:40:07 +02:00
parent c7ba8c4daa
commit ddd0a9abb6
8 changed files with 685 additions and 232 deletions

View file

@ -8,7 +8,9 @@
namespace Slic3r {
class ExPolygon;
class Polygon;
using ExPolygons = std::vector<ExPolygon>;
using Polygons = std::vector<Polygon>;
class TriangleMesh;
@ -23,12 +25,24 @@ void base_plate(const TriangleMesh& mesh, // input mesh
float layerheight = 0.05f, // The sampling height
ThrowOnCancel thrfn = [](){}); // Will be called frequently
// Function to cut tiny connector cavities for a given polygon. The input poly
// will be offsetted by "padding" and small rectangle shaped cavities will be
// inserted along the perimeter in every "stride" distance. The stick rectangles
// will have a with about "stick_width". The input dimensions are in world
// measure, not the scaled clipper units.
void offset_with_breakstick_holes(ExPolygon& poly,
double padding,
double stride,
double stick_width,
double penetration = 0.0);
struct PoolConfig {
double min_wall_thickness_mm = 2;
double min_wall_height_mm = 5;
double max_merge_distance_mm = 50;
double edge_radius_mm = 1;
double wall_slope = std::atan(1.0); // Universal constant for Pi/4
bool embed_object = false;
ThrowOnCancel throw_on_cancel = [](){};
@ -42,8 +56,9 @@ struct PoolConfig {
};
/// Calculate the pool for the mesh for SLA printing
void create_base_pool(const ExPolygons& base_plate,
void create_base_pool(const Polygons& base_plate,
TriangleMesh& output_mesh,
const ExPolygons& holes,
const PoolConfig& = PoolConfig());
/// TODO: Currently the base plate of the pool will have half the height of the