Updates in the C++ infill code.

This commit is contained in:
bubnikv 2016-09-13 11:26:38 +02:00
parent b2a6f43923
commit a5b7f14dfa
14 changed files with 645 additions and 305 deletions

View file

@ -9,13 +9,19 @@
namespace Slic3r {
class FillHoneycomb : public FillWithDirection
class FillHoneycomb : public Fill
{
public:
virtual ~FillHoneycomb() {}
virtual Polylines fill_surface(const Surface *surface, const FillParams &params);
protected:
virtual void _fill_surface_single(
const FillParams &params,
unsigned int thickness_layers,
const std::pair<float, Point> &direction,
ExPolygon &expolygon,
Polylines &polylines_out);
// Caching the
struct CacheID
{
@ -42,7 +48,7 @@ protected:
typedef std::map<CacheID, CacheData> Cache;
Cache cache;
virtual float _layer_angle(size_t idx) const { return 0.5f * float(M_PI) * (idx % 3); }
virtual float _layer_angle(size_t idx) const { return float(M_PI/3.) * (idx % 3); }
};
} // namespace Slic3r