diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2015-07-07 02:17:31 +0300 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2015-07-07 02:17:31 +0300 |
commit | 0e18b094d1edf32730a7555cf253cd9a90a7c404 (patch) | |
tree | 008a747efa79e9dee05f03b084bb22a41b786d63 /xs/src/libslic3r/ExtrusionEntity.hpp | |
parent | b8aecbd56c74aa658891cf78bed24f07605d30bb (diff) |
More work for porting PerimeterGenerator to XS
Diffstat (limited to 'xs/src/libslic3r/ExtrusionEntity.hpp')
-rw-r--r-- | xs/src/libslic3r/ExtrusionEntity.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xs/src/libslic3r/ExtrusionEntity.hpp b/xs/src/libslic3r/ExtrusionEntity.hpp index bcb50155a..0cbabd1b8 100644 --- a/xs/src/libslic3r/ExtrusionEntity.hpp +++ b/xs/src/libslic3r/ExtrusionEntity.hpp @@ -52,6 +52,7 @@ class ExtrusionEntity virtual Point last_point() const = 0; virtual Polygons grow() const = 0; virtual double min_mm3_per_mm() const = 0; + virtual Polyline as_polyline() const = 0; }; typedef std::vector<ExtrusionEntity*> ExtrusionEntitiesPtr; @@ -83,6 +84,9 @@ class ExtrusionPath : public ExtrusionEntity double min_mm3_per_mm() const { return this->mm3_per_mm; }; + Polyline as_polyline() const { + return this->polyline; + }; private: void _inflate_collection(const Polylines &polylines, ExtrusionEntityCollection* collection) const; @@ -97,6 +101,8 @@ class ExtrusionLoop : public ExtrusionEntity ExtrusionLoopRole role; ExtrusionLoop(ExtrusionLoopRole role = elrDefault) : role(role) {}; + ExtrusionLoop(const ExtrusionPaths &paths, ExtrusionLoopRole role = elrDefault) + : paths(paths), role(role) {}; bool is_loop() const { return true; }; @@ -120,6 +126,9 @@ class ExtrusionLoop : public ExtrusionEntity bool is_solid_infill() const; Polygons grow() const; double min_mm3_per_mm() const; + Polyline as_polyline() const { + return this->polygon()->split_at_first_point(); + }; }; } |