mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-02 11:33:59 -06:00
[Feature] Enabled gap fill algorithm for all solid fill types (#3412)
* ENH: Enabled gap fill algorithm for all solid fill types * Made gap fill an option & refactored code into its own method * Code comment updates * Converted gap fill to enum and control filter out gap fill in the UI * Update label for consistency * Spelling mistake
This commit is contained in:
parent
c0c05c715b
commit
fe148515ce
9 changed files with 143 additions and 7 deletions
|
@ -19,6 +19,7 @@
|
|||
#include "../Flow.hpp"
|
||||
#include "../ExtrusionEntity.hpp"
|
||||
#include "../ExtrusionEntityCollection.hpp"
|
||||
#include "../ShortestPath.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
|
@ -106,6 +107,7 @@ public:
|
|||
FillAdaptive::Octree* adapt_fill_octree = nullptr;
|
||||
|
||||
// PrintConfig and PrintObjectConfig are used by infills that use Arachne (Concentric and FillEnsuring).
|
||||
// Orca: also used by gap fill function.
|
||||
const PrintConfig *print_config = nullptr;
|
||||
const PrintObjectConfig *print_object_config = nullptr;
|
||||
|
||||
|
@ -134,7 +136,7 @@ public:
|
|||
// Perform the fill.
|
||||
virtual Polylines fill_surface(const Surface *surface, const FillParams ¶ms);
|
||||
virtual ThickPolylines fill_surface_arachne(const Surface* surface, const FillParams& params);
|
||||
|
||||
|
||||
// BBS: this method is used to fill the ExtrusionEntityCollection.
|
||||
// It call fill_surface by default
|
||||
virtual void fill_surface_extrusion(const Surface* surface, const FillParams& params, ExtrusionEntitiesPtr& out);
|
||||
|
@ -172,6 +174,10 @@ protected:
|
|||
virtual float _layer_angle(size_t idx) const { return (idx & 1) ? float(M_PI/2.) : 0; }
|
||||
|
||||
virtual std::pair<float, Point> _infill_direction(const Surface *surface) const;
|
||||
|
||||
// Orca: Dedicated function to calculate gap fill lines for the provided surface, according to the print object parameters
|
||||
// and append them to the out ExtrusionEntityCollection.
|
||||
void _create_gap_fill(const Surface* surface, const FillParams& params, ExtrusionEntityCollection* out);
|
||||
|
||||
public:
|
||||
static void connect_infill(Polylines &&infill_ordered, const ExPolygon &boundary, Polylines &polylines_out, const double spacing, const FillParams ¶ms);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue