Implement clone() for Fill classes

This commit is contained in:
Alessandro Ranellucci 2016-11-30 19:47:45 +01:00 committed by bubnikv
parent 716dc2e650
commit ceb72da632
7 changed files with 13 additions and 0 deletions

View file

@ -67,6 +67,7 @@ src/libslic3r/Geometry.hpp
src/libslic3r/Layer.cpp src/libslic3r/Layer.cpp
src/libslic3r/Layer.hpp src/libslic3r/Layer.hpp
src/libslic3r/LayerRegion.cpp src/libslic3r/LayerRegion.cpp
src/libslic3r/LayerRegionFill.cpp
src/libslic3r/libslic3r.h src/libslic3r/libslic3r.h
src/libslic3r/Line.cpp src/libslic3r/Line.cpp
src/libslic3r/Line.hpp src/libslic3r/Line.hpp

View file

@ -12,6 +12,7 @@ namespace Slic3r {
class Fill3DHoneycomb : public Fill class Fill3DHoneycomb : public Fill
{ {
public: public:
virtual Fill* clone() const { return new Fill3DHoneycomb(*this); };
virtual ~Fill3DHoneycomb() {} virtual ~Fill3DHoneycomb() {}
// require bridge flow since most of this pattern hangs in air // require bridge flow since most of this pattern hangs in air

View file

@ -11,6 +11,7 @@ public:
virtual ~FillConcentric() {} virtual ~FillConcentric() {}
protected: protected:
virtual Fill* clone() const { return new FillConcentric(*this); };
virtual void _fill_surface_single( virtual void _fill_surface_single(
const FillParams &params, const FillParams &params,
unsigned int thickness_layers, unsigned int thickness_layers,

View file

@ -15,6 +15,7 @@ public:
virtual ~FillHoneycomb() {} virtual ~FillHoneycomb() {}
protected: protected:
virtual Fill* clone() const { return new FillHoneycomb(*this); };
virtual void _fill_surface_single( virtual void _fill_surface_single(
const FillParams &params, const FillParams &params,
unsigned int thickness_layers, unsigned int thickness_layers,

View file

@ -34,6 +34,7 @@ protected:
class FillArchimedeanChords : public FillPlanePath class FillArchimedeanChords : public FillPlanePath
{ {
public: public:
virtual Fill* clone() const { return new FillArchimedeanChords(*this); };
virtual ~FillArchimedeanChords() {} virtual ~FillArchimedeanChords() {}
protected: protected:
@ -44,6 +45,7 @@ protected:
class FillHilbertCurve : public FillPlanePath class FillHilbertCurve : public FillPlanePath
{ {
public: public:
virtual Fill* clone() const { return new FillHilbertCurve(*this); };
virtual ~FillHilbertCurve() {} virtual ~FillHilbertCurve() {}
protected: protected:
@ -54,6 +56,7 @@ protected:
class FillOctagramSpiral : public FillPlanePath class FillOctagramSpiral : public FillPlanePath
{ {
public: public:
virtual Fill* clone() const { return new FillOctagramSpiral(*this); };
virtual ~FillOctagramSpiral() {} virtual ~FillOctagramSpiral() {}
protected: protected:

View file

@ -12,6 +12,7 @@ class Surface;
class FillRectilinear : public Fill class FillRectilinear : public Fill
{ {
public: public:
virtual Fill* clone() const { return new FillRectilinear(*this); };
virtual ~FillRectilinear() {} virtual ~FillRectilinear() {}
protected: protected:

View file

@ -12,6 +12,7 @@ class Surface;
class FillRectilinear2 : public Fill class FillRectilinear2 : public Fill
{ {
public: public:
virtual Fill* clone() const { return new FillRectilinear2(*this); };
virtual ~FillRectilinear2() {} virtual ~FillRectilinear2() {}
virtual Polylines fill_surface(const Surface *surface, const FillParams &params); virtual Polylines fill_surface(const Surface *surface, const FillParams &params);
@ -22,6 +23,7 @@ protected:
class FillGrid2 : public FillRectilinear2 class FillGrid2 : public FillRectilinear2
{ {
public: public:
virtual Fill* clone() const { return new FillGrid2(*this); };
virtual ~FillGrid2() {} virtual ~FillGrid2() {}
virtual Polylines fill_surface(const Surface *surface, const FillParams &params); virtual Polylines fill_surface(const Surface *surface, const FillParams &params);
@ -33,6 +35,7 @@ protected:
class FillTriangles : public FillRectilinear2 class FillTriangles : public FillRectilinear2
{ {
public: public:
virtual Fill* clone() const { return new FillTriangles(*this); };
virtual ~FillTriangles() {} virtual ~FillTriangles() {}
virtual Polylines fill_surface(const Surface *surface, const FillParams &params); virtual Polylines fill_surface(const Surface *surface, const FillParams &params);
@ -44,6 +47,7 @@ protected:
class FillStars : public FillRectilinear2 class FillStars : public FillRectilinear2
{ {
public: public:
virtual Fill* clone() const { return new FillStars(*this); };
virtual ~FillStars() {} virtual ~FillStars() {}
virtual Polylines fill_surface(const Surface *surface, const FillParams &params); virtual Polylines fill_surface(const Surface *surface, const FillParams &params);
@ -55,6 +59,7 @@ protected:
class FillCubic : public FillRectilinear2 class FillCubic : public FillRectilinear2
{ {
public: public:
virtual Fill* clone() const { return new FillCubic(*this); };
virtual ~FillCubic() {} virtual ~FillCubic() {}
virtual Polylines fill_surface(const Surface *surface, const FillParams &params); virtual Polylines fill_surface(const Surface *surface, const FillParams &params);