mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-25 05:54:27 +08:00
#110 remove use_bridge from infills
force bridge on "denser infill" layer (as it's removed from the infill now)
This commit is contained in:
parent
86fbd247b7
commit
51bcae96ea
@ -228,6 +228,7 @@ void make_fill(LayerRegion &layerm, ExtrusionEntityCollection &out)
|
||||
&& surface.maxNbSolidLayersOnTop > 0) {
|
||||
density = 42;
|
||||
is_denser = true;
|
||||
is_bridge = true;
|
||||
fill_pattern = ipRectiWithPerimeter;
|
||||
}
|
||||
if (density <= 0)
|
||||
@ -243,7 +244,7 @@ void make_fill(LayerRegion &layerm, ExtrusionEntityCollection &out)
|
||||
Flow flow = layerm.region()->flow(
|
||||
role,
|
||||
h,
|
||||
is_bridge || f->use_bridge_flow(), // bridge flow?
|
||||
is_bridge, // bridge flow?
|
||||
layerm.layer()->id() == 0, // first layer?
|
||||
-1, // auto width
|
||||
*layerm.layer()->object()
|
||||
@ -312,7 +313,7 @@ void make_fill(LayerRegion &layerm, ExtrusionEntityCollection &out)
|
||||
// so we can safely ignore the slight variation that might have
|
||||
// been applied to $f->flow_spacing
|
||||
} else {
|
||||
flow = Flow::new_from_spacing(f->spacing, flow.nozzle_diameter, (float)h, is_bridge || f->use_bridge_flow());
|
||||
flow = Flow::new_from_spacing(f->spacing, flow.nozzle_diameter, (float)h, is_bridge);
|
||||
}
|
||||
|
||||
//adjust flow (to over-extrude when needed)
|
||||
|
@ -15,9 +15,6 @@ public:
|
||||
virtual Fill* clone() const { return new Fill3DHoneycomb(*this); };
|
||||
virtual ~Fill3DHoneycomb() {}
|
||||
|
||||
// require bridge flow since most of this pattern hangs in air
|
||||
virtual bool use_bridge_flow() const { return true; }
|
||||
|
||||
protected:
|
||||
virtual void _fill_surface_single(
|
||||
const FillParams ¶ms,
|
||||
|
@ -55,24 +55,6 @@ Fill* Fill::new_from_type(const std::string &type)
|
||||
return (it == enum_keys_map.end()) ? nullptr : new_from_type(InfillPattern(it->second));
|
||||
}
|
||||
|
||||
// Force initialization of the Fill::use_bridge_flow() internal static map in a thread safe fashion even on compilers
|
||||
// not supporting thread safe non-static data member initializers.
|
||||
static bool use_bridge_flow_initializer = Fill::use_bridge_flow(ipGrid);
|
||||
|
||||
bool Fill::use_bridge_flow(const InfillPattern type)
|
||||
{
|
||||
static std::vector<unsigned char> cached;
|
||||
if (cached.empty()) {
|
||||
cached.assign(size_t(ipCount), 0);
|
||||
for (size_t i = 0; i < cached.size(); ++ i) {
|
||||
auto *fill = Fill::new_from_type((InfillPattern)i);
|
||||
cached[i] = fill->use_bridge_flow();
|
||||
delete fill;
|
||||
}
|
||||
}
|
||||
return cached[type] != 0;
|
||||
}
|
||||
|
||||
Polylines Fill::fill_surface(const Surface *surface, const FillParams ¶ms)
|
||||
{
|
||||
// Perform offset.
|
||||
|
@ -94,13 +94,9 @@ public:
|
||||
|
||||
static Fill* new_from_type(const InfillPattern type);
|
||||
static Fill* new_from_type(const std::string &type);
|
||||
static bool use_bridge_flow(const InfillPattern type);
|
||||
|
||||
void set_bounding_box(const Slic3r::BoundingBox &bbox) { bounding_box = bbox; }
|
||||
|
||||
// Use bridge flow for the fill?
|
||||
virtual bool use_bridge_flow() const { return false; }
|
||||
|
||||
// Do not sort the fill lines to optimize the print head path?
|
||||
virtual bool no_sort() const { return false; }
|
||||
|
||||
|
@ -13,9 +13,6 @@ public:
|
||||
FillGyroid() {}
|
||||
virtual Fill* clone() const { return new FillGyroid(*this); }
|
||||
|
||||
// require bridge flow since most of this pattern hangs in air
|
||||
virtual bool use_bridge_flow() const { return false; }
|
||||
|
||||
// Correction applied to regular infill angle to maximize printing
|
||||
// speed in default configuration (degrees)
|
||||
static constexpr float CorrectionAngle = -45.;
|
||||
|
@ -76,8 +76,6 @@ protected:
|
||||
class FillRectilinear2Peri : public FillRectilinear2
|
||||
{
|
||||
public:
|
||||
// require bridge flow since it's a pre-bridge over very sparse infill
|
||||
virtual bool use_bridge_flow() const { return true; }
|
||||
|
||||
virtual Fill* clone() const { return new FillRectilinear2Peri(*this); };
|
||||
virtual ~FillRectilinear2Peri() {}
|
||||
@ -102,8 +100,6 @@ protected:
|
||||
|
||||
class FillRectilinearSawtooth : public FillRectilinear2 {
|
||||
public:
|
||||
// require bridge flow since it's a pre-bridge over very sparse infill
|
||||
virtual bool use_bridge_flow() const { return true; }
|
||||
|
||||
virtual Fill* clone() const { return new FillRectilinearSawtooth(*this); };
|
||||
virtual ~FillRectilinearSawtooth() {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user