1 #ifndef slic3r_FillGyroid_hpp_
2 #define slic3r_FillGyroid_hpp_
3 
4 #include "../libslic3r.h"
5 
6 #include "FillBase.hpp"
7 
8 namespace Slic3r {
9 
10 class FillGyroid : public Fill
11 {
12 public:
FillGyroid()13     FillGyroid() {}
clone() const14     Fill* clone() const override { return new FillGyroid(*this); }
15 
16     // require bridge flow since most of this pattern hangs in air
use_bridge_flow() const17     bool use_bridge_flow() const override { return false; }
18 
19     // Correction applied to regular infill angle to maximize printing
20     // speed in default configuration (degrees)
21     static constexpr float CorrectionAngle = -45.;
22 
23     // Density adjustment to have a good %of weight.
24     static constexpr double DensityAdjust = 2.44;
25 
26     // Gyroid upper resolution tolerance (mm^-2)
27     static constexpr double PatternTolerance = 0.2;
28 
29 
30 protected:
31     void _fill_surface_single(
32         const FillParams                &params,
33         unsigned int                     thickness_layers,
34         const std::pair<float, Point>   &direction,
35         ExPolygon                        expolygon,
36         Polylines                       &polylines_out) override;
37 };
38 
39 } // namespace Slic3r
40 
41 #endif // slic3r_FillGyroid_hpp_
42