2013-07-18 17:09:07 +00:00
|
|
|
#ifndef slic3r_ExtrusionEntityCollection_hpp_
|
|
|
|
#define slic3r_ExtrusionEntityCollection_hpp_
|
|
|
|
|
|
|
|
#include <myinit.h>
|
|
|
|
#include "ExtrusionEntity.hpp"
|
|
|
|
|
|
|
|
namespace Slic3r {
|
|
|
|
|
2013-07-18 20:29:12 +00:00
|
|
|
class ExtrusionEntityCollection : public ExtrusionEntity
|
2013-07-18 17:09:07 +00:00
|
|
|
{
|
|
|
|
public:
|
2013-08-29 09:47:59 +00:00
|
|
|
ExtrusionEntityCollection* clone() const;
|
2013-07-18 17:09:07 +00:00
|
|
|
ExtrusionEntitiesPtr entities;
|
2014-03-15 01:16:04 +00:00
|
|
|
std::vector<size_t> orig_indices; // handy for XS
|
2013-07-18 17:09:07 +00:00
|
|
|
bool no_sort;
|
2013-08-25 18:29:45 +00:00
|
|
|
ExtrusionEntityCollection(): no_sort(false) {};
|
2014-04-24 14:40:10 +00:00
|
|
|
ExtrusionEntityCollection(const ExtrusionEntityCollection &collection);
|
2015-07-06 23:17:31 +00:00
|
|
|
ExtrusionEntityCollection(const ExtrusionPaths &paths);
|
2014-04-24 14:40:10 +00:00
|
|
|
ExtrusionEntityCollection& operator= (const ExtrusionEntityCollection &other);
|
2015-07-06 23:17:31 +00:00
|
|
|
operator ExtrusionPaths() const;
|
|
|
|
|
2015-04-12 18:16:27 +00:00
|
|
|
bool is_collection() const {
|
|
|
|
return true;
|
|
|
|
};
|
2015-03-09 17:28:07 +00:00
|
|
|
bool can_reverse() const {
|
|
|
|
return !this->no_sort;
|
|
|
|
};
|
2014-04-24 14:40:10 +00:00
|
|
|
void swap (ExtrusionEntityCollection &c);
|
2015-07-06 23:17:31 +00:00
|
|
|
void append(const ExtrusionEntity &entity);
|
|
|
|
void append(const ExtrusionEntityCollection &collection);
|
|
|
|
void append(const ExtrusionPaths &paths);
|
|
|
|
ExtrusionEntityCollection chained_path(bool no_reverse = false, std::vector<size_t>* orig_indices = NULL) const;
|
2014-04-24 14:40:10 +00:00
|
|
|
void chained_path(ExtrusionEntityCollection* retval, bool no_reverse = false, std::vector<size_t>* orig_indices = NULL) const;
|
|
|
|
void chained_path_from(Point start_near, ExtrusionEntityCollection* retval, bool no_reverse = false, std::vector<size_t>* orig_indices = NULL) const;
|
2013-08-29 09:47:59 +00:00
|
|
|
void reverse();
|
2014-04-24 14:40:10 +00:00
|
|
|
Point first_point() const;
|
|
|
|
Point last_point() const;
|
2015-01-15 19:06:30 +00:00
|
|
|
Polygons grow() const;
|
2015-04-12 18:16:27 +00:00
|
|
|
size_t items_count() const;
|
2015-05-31 20:04:32 +00:00
|
|
|
void flatten(ExtrusionEntityCollection* retval) const;
|
2015-07-06 23:17:31 +00:00
|
|
|
ExtrusionEntityCollection flatten() const;
|
2015-05-31 20:04:32 +00:00
|
|
|
double min_mm3_per_mm() const;
|
2013-07-18 17:09:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|