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:
bubnikv 2017-07-27 10:39:43 +02:00
parent 3b51f64411
commit a6ea01a23f
19 changed files with 2106 additions and 289 deletions

View file

@ -74,7 +74,10 @@ public:
void export_region_slices_to_svg_debug(const char *name);
void export_region_fill_surfaces_to_svg_debug(const char *name);
private:
// Is there any valid extrusion assigned to this LayerRegion?
bool has_extrusions() const { return ! this->perimeters.entities.empty() || ! this->fills.entities.empty(); }
private:
Layer *_layer;
PrintRegion *_region;
@ -131,7 +134,10 @@ public:
// Export to "out/LayerRegion-name-%d.svg" with an increasing index with every export.
void export_region_slices_to_svg_debug(const char *name);
void export_region_fill_surfaces_to_svg_debug(const char *name);
// Is there any valid extrusion assigned to this LayerRegion?
virtual bool has_extrusions() const { for (auto layerm : this->regions) if (layerm->has_extrusions()) return true; return false; }
protected:
size_t _id; // sequential number of layer, 0-based
PrintObject *_object;
@ -152,6 +158,9 @@ public:
// Extrusion paths for the support base and for the support interface and contacts.
ExtrusionEntityCollection support_fills;
// Is there any valid extrusion assigned to this LayerRegion?
virtual bool has_extrusions() const { return ! support_fills.empty(); }
protected:
SupportLayer(size_t id, PrintObject *object, coordf_t height, coordf_t print_z, coordf_t slice_z) :
Layer(id, object, height, print_z, slice_z) {}