Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsupermerill <merill@fr.fr>2019-06-09 20:55:20 +0300
committersupermerill <merill@fr.fr>2019-06-09 20:55:20 +0300
commit6304f7fc285ba0e903ce3fa8a8da865472fec890 (patch)
treed15b3de14dc82d957422abc69b27d1938cc35bf3
parentb4cff5b8bfd2fdc669465f077693ab9722999b6c (diff)
merge bugfixs1.42.0-rc1
-rw-r--r--src/libslic3r/Fill/FillRectilinear2.cpp2
-rw-r--r--src/libslic3r/GCode.cpp3
-rw-r--r--src/libslic3r/MedialAxis.cpp13
-rw-r--r--src/libslic3r/Polygon.cpp2
-rw-r--r--src/libslic3r/Polygon.hpp2
-rw-r--r--src/libslic3r/TriangleMesh.cpp2
6 files changed, 10 insertions, 14 deletions
diff --git a/src/libslic3r/Fill/FillRectilinear2.cpp b/src/libslic3r/Fill/FillRectilinear2.cpp
index 67d187b0f..a0215e30a 100644
--- a/src/libslic3r/Fill/FillRectilinear2.cpp
+++ b/src/libslic3r/Fill/FillRectilinear2.cpp
@@ -1781,7 +1781,7 @@ FillRectilinear2WGapFill::fill_surface_extrusion(const Surface *surface, const F
for (ExPolygon &p : rectilinear_areas)rec_area += p.area();
double gf_area = 0;
for (ExPolygon &p : gapfill_areas)gf_area += p.area();
- std::cout << unscaled(unscaled(surface->expolygon.area())) << " = " << unscaled(unscaled(rec_area)) << " + " << unscaled(unscaled(gf_area)) << "\n";
+ //std::cout << unscaled(unscaled(surface->expolygon.area())) << " = " << unscaled(unscaled(rec_area)) << " + " << unscaled(unscaled(gf_area)) << "\n";
// rectilinear
Polylines polylines_rectilinear;
diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp
index f733dee21..4a1aae3d8 100644
--- a/src/libslic3r/GCode.cpp
+++ b/src/libslic3r/GCode.cpp
@@ -1689,7 +1689,8 @@ void GCode::process_layer(
gcode+="; PURGING FINISHED\n";
for (ObjectByExtruder &object_by_extruder : objects_by_extruder_it->second) {
- const size_t layer_id = &object_by_extruder - objects_by_extruder_it->second.data();
+ const size_t layer_id = &object_by_extruder - objects_by_extruder_it->second.data();
+ std::cout << "Writing gcode for layer at " << layers[layer_id].print_z() << ", " << ((this->m_layer_index *100 )/ this->m_layer_count) << "%" << std::endl;
const PrintObject *print_object = layers[layer_id].object();
if (print_object == nullptr)
// This layer is empty for this particular object, it has neither object extrusions nor support extrusions at this print_z.
diff --git a/src/libslic3r/MedialAxis.cpp b/src/libslic3r/MedialAxis.cpp
index f9b4c1954..3e85718b7 100644
--- a/src/libslic3r/MedialAxis.cpp
+++ b/src/libslic3r/MedialAxis.cpp
@@ -1328,16 +1328,11 @@ MedialAxis::ensure_not_overextrude(ThickPolylines& pp)
void
MedialAxis::simplify_polygon_frontier()
{
- //simplify the boundary between us and the bounds.
- ExPolygon simplified_poly = this->surface;
- simplified_poly.contour.remove_colinear_points(SCALED_EPSILON);
- for (Polygon &hole : simplified_poly.holes)
- hole.remove_colinear_points(SCALED_EPSILON);
//it will remove every point in the surface contour that aren't on the bounds contour
this->expolygon = this->surface;
- this->expolygon.contour.remove_collinear_points(SCALED_EPSILON);
+ this->expolygon.contour.remove_colinear_points(SCALED_EPSILON);
for (Polygon &hole : this->expolygon.holes)
- hole.remove_collinear_points(SCALED_EPSILON);
+ hole.remove_colinear_points(SCALED_EPSILON);
if (&this->surface != this->bounds) {
bool need_intersect = false;
for (size_t i = 0; i < this->expolygon.contour.points.size(); i++) {
@@ -1366,9 +1361,9 @@ MedialAxis::simplify_polygon_frontier()
} else {
//can't simplify that much, reuse the given one
this->expolygon = this->surface;
- this->expolygon.contour.remove_collinear_points(SCALED_EPSILON);
+ this->expolygon.contour.remove_colinear_points(SCALED_EPSILON);
for (Polygon &hole : this->expolygon.holes)
- hole.remove_collinear_points(SCALED_EPSILON);
+ hole.remove_colinear_points(SCALED_EPSILON);
}
}
}
diff --git a/src/libslic3r/Polygon.cpp b/src/libslic3r/Polygon.cpp
index febfde29a..2fe3c4d18 100644
--- a/src/libslic3r/Polygon.cpp
+++ b/src/libslic3r/Polygon.cpp
@@ -316,7 +316,7 @@ Point Polygon::point_projection(const Point &point) const
return proj;
}
-size_t Polygon::remove_collinear_points(coord_t max_offset){
+size_t Polygon::remove_colinear_points(coord_t max_offset){
size_t nb_del = 0;
if (points.size() < 3) return 0;
diff --git a/src/libslic3r/Polygon.hpp b/src/libslic3r/Polygon.hpp
index ee504b258..c1004330d 100644
--- a/src/libslic3r/Polygon.hpp
+++ b/src/libslic3r/Polygon.hpp
@@ -61,7 +61,7 @@ public:
Point point_projection(const Point &point) const;
/// remove points that are (almost) on an existing line from previous & next point.
/// return number of point removed
- size_t remove_collinear_points(coord_t max_offset);
+ size_t remove_colinear_points(coord_t max_offset);
};
extern BoundingBox get_extents(const Polygon &poly);
diff --git a/src/libslic3r/TriangleMesh.cpp b/src/libslic3r/TriangleMesh.cpp
index fb22986a9..086b9bb97 100644
--- a/src/libslic3r/TriangleMesh.cpp
+++ b/src/libslic3r/TriangleMesh.cpp
@@ -1679,7 +1679,7 @@ void TriangleMeshSlicer::make_expolygons(const Polygons &loops, ExPolygons* slic
Polygons filered_polys = loops;
if (this->model_precision > 0){
for (Polygon &hole : filered_polys){
- hole.remove_collinear_points(scale_(this->model_precision));
+ hole.remove_colinear_points(scale_(this->model_precision));
}
}