mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-04 22:07:41 -07:00
parent
e8b9b21630
commit
f9fdba29a2
3 changed files with 12 additions and 22 deletions
|
|
@ -1,7 +1,6 @@
|
|||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <memory>
|
||||
#include <algorithm>
|
||||
|
||||
#include "../ClipperUtils.hpp"
|
||||
#include "../Geometry.hpp"
|
||||
|
|
@ -1289,17 +1288,13 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
|
|||
f->spacing = surface_fill.params.spacing;
|
||||
surface_fill.surface.expolygon = std::move(expoly);
|
||||
|
||||
if(surface_fill.params.bridge && surface_fill.surface.is_external() && surface_fill.params.density > 99.0){
|
||||
const float bridge_density_raw = std::max(0.0001f, float(layerm->region().config().bridge_density.get_abs_value(1.0)));
|
||||
const float bridge_density = std::min(bridge_density_raw, 1.0f);
|
||||
params.density = bridge_density;
|
||||
params.dont_adjust = bridge_density < 0.9999f;
|
||||
}
|
||||
if(surface_fill.params.bridge && surface_fill.surface.is_external() && surface_fill.params.density > 99.0){
|
||||
params.density = layerm->region().config().bridge_density.get_abs_value(1.0);
|
||||
params.dont_adjust = true;
|
||||
}
|
||||
if(surface_fill.surface.is_internal_bridge()){
|
||||
const float internal_bridge_density_raw = std::max(0.0001f, float(f->print_object_config->internal_bridge_density.get_abs_value(1.0)));
|
||||
const float internal_bridge_density = std::min(internal_bridge_density_raw, 1.0f);
|
||||
params.density = internal_bridge_density;
|
||||
params.dont_adjust = internal_bridge_density < 0.9999f;
|
||||
params.density = f->print_object_config->internal_bridge_density.get_abs_value(1.0);
|
||||
params.dont_adjust = true;
|
||||
}
|
||||
// BBS: make fill
|
||||
f->fill_surface_extrusion(&surface_fill.surface,
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
#include "../ShortestPath.hpp"
|
||||
#include "../Surface.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "FillLine.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
|
@ -20,9 +18,8 @@ void FillLine::_fill_surface_single(
|
|||
expolygon.rotate(- direction.first);
|
||||
|
||||
this->_min_spacing = scale_(this->spacing);
|
||||
assert(params.density > 0.0001f);
|
||||
const float density = std::max(params.density, 0.0001f);
|
||||
this->_line_spacing = coord_t(coordf_t(this->_min_spacing) / density);
|
||||
assert(params.density > 0.0001f && params.density <= 1.f);
|
||||
this->_line_spacing = coord_t(coordf_t(this->_min_spacing) / params.density);
|
||||
this->_diagonal_distance = this->_line_spacing * 2;
|
||||
this->_line_oscillation = this->_line_spacing - this->_min_spacing; // only for Line infill
|
||||
BoundingBox bounding_box = expolygon.contour.bounding_box();
|
||||
|
|
|
|||
|
|
@ -2764,9 +2764,8 @@ bool FillRectilinear::fill_surface_by_lines(const Surface *surface, const FillPa
|
|||
rotate_vector.first += float(M_PI/2.);
|
||||
rotate_vector.first += angleBase;
|
||||
|
||||
assert(params.density > 0.0001f);
|
||||
const float density = std::max(params.density, 0.0001f);
|
||||
coord_t line_spacing = coord_t(scale_(this->spacing) / density);
|
||||
assert(params.density > 0.0001f && params.density <= 1.f);
|
||||
coord_t line_spacing = coord_t(scale_(this->spacing) / params.density);
|
||||
|
||||
// On the polygons of poly_with_offset, the infill lines will be connected.
|
||||
ExPolygonWithOffset poly_with_offset(
|
||||
|
|
@ -2999,8 +2998,7 @@ bool FillRectilinear::fill_surface_by_multilines(const Surface *surface, FillPar
|
|||
assert(sweep_params.size() >= 1);
|
||||
assert(!params.full_infill());
|
||||
params.density /= double(sweep_params.size());
|
||||
assert(params.density > 0.0001f);
|
||||
const float density = std::max(params.density, 0.0001f);
|
||||
assert(params.density > 0.0001f && params.density <= 1.f);
|
||||
|
||||
ExPolygonWithOffset poly_with_offset_base(surface->expolygon, 0, float(scale_(this->overlap - 0.5 * this->spacing)));
|
||||
if (poly_with_offset_base.n_contours == 0)
|
||||
|
|
@ -3009,7 +3007,7 @@ bool FillRectilinear::fill_surface_by_multilines(const Surface *surface, FillPar
|
|||
|
||||
Polylines fill_lines;
|
||||
coord_t line_width = coord_t(scale_(this->spacing));
|
||||
coord_t line_spacing = coord_t(scale_(this->spacing) * params.multiline / density);
|
||||
coord_t line_spacing = coord_t(scale_(this->spacing) * params.multiline / params.density);
|
||||
std::pair<float, Point> rotate_vector = this->_infill_direction(surface);
|
||||
for (const SweepParams &sweep : sweep_params) {
|
||||
// Rotate polygons so that we can work with vertical lines here
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue