2013-07-15 10:14:22 +00:00
|
|
|
#ifndef slic3r_ExtrusionEntity_hpp_
|
|
|
|
#define slic3r_ExtrusionEntity_hpp_
|
|
|
|
|
2013-07-16 19:04:14 +00:00
|
|
|
#include <myinit.h>
|
2013-07-15 10:14:22 +00:00
|
|
|
#include "Polygon.hpp"
|
|
|
|
#include "Polyline.hpp"
|
|
|
|
|
|
|
|
namespace Slic3r {
|
|
|
|
|
|
|
|
enum ExtrusionRole {
|
|
|
|
erPerimeter,
|
|
|
|
erExternalPerimeter,
|
|
|
|
erOverhangPerimeter,
|
|
|
|
erContourInternalPerimeter,
|
|
|
|
erFill,
|
|
|
|
erSolidFill,
|
|
|
|
erTopSolidFill,
|
|
|
|
erBrige,
|
|
|
|
erInternalBridge,
|
|
|
|
erSkirt,
|
|
|
|
erSupportMaterial,
|
|
|
|
erGapFill,
|
|
|
|
};
|
|
|
|
|
|
|
|
class ExtrusionEntity
|
|
|
|
{
|
|
|
|
public:
|
2013-08-29 09:47:59 +00:00
|
|
|
virtual ExtrusionEntity* clone() const = 0;
|
2013-07-18 17:09:07 +00:00
|
|
|
virtual ~ExtrusionEntity() {};
|
2013-07-15 10:14:22 +00:00
|
|
|
ExtrusionRole role;
|
|
|
|
double height; // vertical thickness of the extrusion expressed in mm
|
|
|
|
double flow_spacing;
|
2013-08-29 09:47:59 +00:00
|
|
|
virtual void reverse() = 0;
|
2013-09-02 20:33:03 +00:00
|
|
|
virtual Point* first_point() const = 0;
|
|
|
|
virtual Point* last_point() const = 0;
|
2013-07-15 10:14:22 +00:00
|
|
|
};
|
|
|
|
|
2013-07-18 17:09:07 +00:00
|
|
|
typedef std::vector<ExtrusionEntity*> ExtrusionEntitiesPtr;
|
|
|
|
|
2013-07-15 10:14:22 +00:00
|
|
|
class ExtrusionPath : public ExtrusionEntity
|
|
|
|
{
|
|
|
|
public:
|
2013-08-29 09:47:59 +00:00
|
|
|
ExtrusionPath* clone() const;
|
2013-07-15 10:14:22 +00:00
|
|
|
Polyline polyline;
|
|
|
|
void reverse();
|
2013-09-02 20:33:03 +00:00
|
|
|
Point* first_point() const;
|
|
|
|
Point* last_point() const;
|
2013-07-15 10:14:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class ExtrusionLoop : public ExtrusionEntity
|
|
|
|
{
|
|
|
|
public:
|
2013-08-29 09:47:59 +00:00
|
|
|
ExtrusionLoop* clone() const;
|
2013-07-15 10:14:22 +00:00
|
|
|
Polygon polygon;
|
2013-09-13 13:19:15 +00:00
|
|
|
ExtrusionPath* split_at_index(int index) const;
|
|
|
|
ExtrusionPath* split_at_first_point() const;
|
2013-08-28 23:40:42 +00:00
|
|
|
bool make_counter_clockwise();
|
2013-08-29 09:47:59 +00:00
|
|
|
void reverse();
|
2013-09-02 20:33:03 +00:00
|
|
|
Point* first_point() const;
|
|
|
|
Point* last_point() const;
|
2013-07-15 10:14:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|