Skip to content

Commit

Permalink
precision wip
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill committed Sep 18, 2024
1 parent 5158294 commit 5a7fcd0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/libslic3r/Fill/Fill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,12 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
const_cast<SurfaceFillParams&>(params).idx = surface_fills.size();
surface_fills.emplace_back(params);
}
for (size_t region_id = 0; region_id < layer.regions().size(); ++region_id) {
const LayerRegion &layerm = *layer.regions()[region_id];
for (const Surface &surface : layerm.fill_surfaces()) {
surface.expolygon.assert_valid();
}
}

for (size_t region_id = 0; region_id < layer.regions().size(); ++ region_id) {
const LayerRegion &layerm = *layer.regions()[region_id];
Expand Down
3 changes: 2 additions & 1 deletion src/libslic3r/PrintObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2743,6 +2743,7 @@ template<typename T> void debug_draw(std::string name, const T& a, const T& b, c
void PrintObject::replaceSurfaceType(SurfaceType st_to_replace, SurfaceType st_replacement, SurfaceType st_under_it)
{
BOOST_LOG_TRIVIAL(info) << "overextrude over Bridge...";
coord_t scaled_resolution = std::max(SCALED_EPSILON, scale_t(print()->config().resolution.value));

for (size_t region_id = 0; region_id < this->num_printing_regions(); ++region_id) {
const PrintRegion& region = this->printing_region(region_id);
Expand Down Expand Up @@ -2779,7 +2780,7 @@ void PrintObject::replaceSurfaceType(SurfaceType st_to_replace, SurfaceType st_r
if (poly_to_replace.empty()) continue;

// compute the remaning internal solid surfaces as difference
ExPolygons not_expoly_to_replace = diff_ex(poly_to_check, poly_to_replace, ApplySafetyOffset::Yes);
ExPolygons not_expoly_to_replace = ensure_valid(diff_ex(poly_to_check, poly_to_replace, ApplySafetyOffset::Yes), scaled_resolution);
// build the new collection of fill_surfaces
{
Surfaces new_surfaces;
Expand Down

0 comments on commit 5a7fcd0

Please sign in to comment.