mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-19 06:41:14 -06:00
ENH: add back infill anchor for special case
These two settings is necessary for some specific user case. Signed-off-by: salt.wei <salt.wei@bambulab.com> Change-Id: I9d70679932ac90c34296393d0e8bb8aebd8ebe48
This commit is contained in:
parent
030275a5a1
commit
3ea602091e
10 changed files with 79 additions and 15 deletions
|
@ -190,8 +190,12 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
|
|||
// so that internall infill will be aligned over all layers of the current region.
|
||||
params.spacing = layerm.region().flow(*layer.object(), frInfill, layer.object()->config().layer_height, false).spacing();
|
||||
// Anchor a sparse infill to inner perimeters with the following anchor length:
|
||||
params.anchor_length = float(Fill::infill_anchor * 0.01 * params.spacing);
|
||||
params.anchor_length_max = Fill::infill_anchor_max;
|
||||
params.anchor_length = float(region_config.sparse_infill_anchor);
|
||||
if (region_config.sparse_infill_anchor.percent)
|
||||
params.anchor_length = float(params.anchor_length * 0.01 * params.spacing);
|
||||
params.anchor_length_max = float(region_config.sparse_infill_anchor_max);
|
||||
if (region_config.sparse_infill_anchor_max.percent)
|
||||
params.anchor_length_max = float(params.anchor_length_max * 0.01 * params.spacing);
|
||||
params.anchor_length = std::min(params.anchor_length, params.anchor_length_max);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,11 +28,6 @@
|
|||
|
||||
namespace Slic3r {
|
||||
|
||||
//BBS: 0% of sparse_infill_line_width, no anchor at the start of sparse infill
|
||||
float Fill::infill_anchor = 400;
|
||||
//BBS: 20mm
|
||||
float Fill::infill_anchor_max = 20;
|
||||
|
||||
Fill* Fill::new_from_type(const InfillPattern type)
|
||||
{
|
||||
switch (type) {
|
||||
|
|
|
@ -108,9 +108,6 @@ public:
|
|||
// BBS: all no overlap expolygons in same layer
|
||||
ExPolygons no_overlap_expolygons;
|
||||
|
||||
static float infill_anchor;
|
||||
static float infill_anchor_max;
|
||||
|
||||
public:
|
||||
virtual ~Fill() {}
|
||||
virtual Fill* clone() const = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue