mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-30 05:09:12 -07:00
Refactored Fill / Flow for readability.
Added an "overlap" member variable to fill classes in the preparation for futher move of the "infill / perimeter" overlap to the Fill class. Moved the orientation predicates from Fill to Geometry.
This commit is contained in:
@@ -15,11 +15,11 @@ namespace Slic3r {
|
||||
|
||||
struct SurfaceGroupAttrib
|
||||
{
|
||||
SurfaceGroupAttrib() : is_solid(false), fw(0.f), pattern(-1) {}
|
||||
SurfaceGroupAttrib() : is_solid(false), flow_width(0.f), pattern(-1) {}
|
||||
bool operator==(const SurfaceGroupAttrib &other) const
|
||||
{ return is_solid == other.is_solid && fw == other.fw && pattern == other.pattern; }
|
||||
{ return is_solid == other.is_solid && flow_width == other.flow_width && pattern == other.pattern; }
|
||||
bool is_solid;
|
||||
float fw;
|
||||
float flow_width;
|
||||
// pattern is of type InfillPattern, -1 for an unset pattern.
|
||||
int pattern;
|
||||
};
|
||||
@@ -68,7 +68,7 @@ void make_fill(LayerRegion &layerm, ExtrusionEntityCollection &out)
|
||||
const Surface &surface = *groups[i].front();
|
||||
if (surface.is_solid() && (!surface.is_bridge() || layerm.layer()->id() == 0)) {
|
||||
group_attrib[i].is_solid = true;
|
||||
group_attrib[i].fw = (surface.surface_type == stTop) ? top_solid_infill_flow.width : solid_infill_flow.width;
|
||||
group_attrib[i].flow_width = (surface.surface_type == stTop) ? top_solid_infill_flow.width : solid_infill_flow.width;
|
||||
group_attrib[i].pattern = surface.is_external() ? layerm.region()->config.external_fill_pattern.value : ipRectilinear;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user