Add aligned rectilinear infill functionality by @m-schubert
Implements [Feature Request] Aligned rectilinear infill #1938
This commit is contained in:
Vojtech Bubnik 2020-11-21 14:10:10 +01:00
parent 47dae80835
commit f0606c2a76
4 changed files with 18 additions and 1 deletions

View file

@ -29,6 +29,7 @@ Fill* Fill::new_from_type(const InfillPattern type)
case ip3DHoneycomb: return new Fill3DHoneycomb();
case ipGyroid: return new FillGyroid();
case ipRectilinear: return new FillRectilinear();
case ipAlignedRectilinear: return new FillAlignedRectilinear();
case ipMonotonic: return new FillMonotonic();
case ipLine: return new FillLine();
case ipGrid: return new FillGrid();

View file

@ -29,6 +29,17 @@ protected:
bool fill_surface_by_multilines(const Surface *surface, FillParams params, const std::initializer_list<SweepParams> &sweep_params, Polylines &polylines_out);
};
class FillAlignedRectilinear : public FillRectilinear
{
public:
Fill* clone() const override { return new FillAlignedRectilinear(*this); };
~FillAlignedRectilinear() override = default;
protected:
// Always generate infill at the same angle.
virtual float _layer_angle(size_t idx) const { return 0.f; }
};
class FillMonotonic : public FillRectilinear
{
public: