mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-21 07:41:09 -06:00
Ported ExtrusionPath::Collection
This commit is contained in:
parent
0efea9e442
commit
c030e38908
18 changed files with 181 additions and 60 deletions
|
@ -23,6 +23,7 @@ class ExPolygon
|
|||
};
|
||||
|
||||
typedef std::vector<ExPolygon> ExPolygons;
|
||||
typedef std::vector<ExPolygon*> ExPolygonsPtr;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -5,24 +5,24 @@ namespace Slic3r {
|
|||
void
|
||||
ExPolygonCollection::scale(double factor)
|
||||
{
|
||||
for (ExPolygons::iterator it = expolygons.begin(); it != expolygons.end(); ++it) {
|
||||
(*it).scale(factor);
|
||||
for (ExPolygonsPtr::iterator it = expolygons.begin(); it != expolygons.end(); ++it) {
|
||||
(**it).scale(factor);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ExPolygonCollection::translate(double x, double y)
|
||||
{
|
||||
for (ExPolygons::iterator it = expolygons.begin(); it != expolygons.end(); ++it) {
|
||||
(*it).translate(x, y);
|
||||
for (ExPolygonsPtr::iterator it = expolygons.begin(); it != expolygons.end(); ++it) {
|
||||
(**it).translate(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ExPolygonCollection::rotate(double angle, Point* center)
|
||||
{
|
||||
for (ExPolygons::iterator it = expolygons.begin(); it != expolygons.end(); ++it) {
|
||||
(*it).rotate(angle, center);
|
||||
for (ExPolygonsPtr::iterator it = expolygons.begin(); it != expolygons.end(); ++it) {
|
||||
(**it).rotate(angle, center);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,8 +9,7 @@ namespace Slic3r {
|
|||
class ExPolygonCollection
|
||||
{
|
||||
public:
|
||||
ExPolygons expolygons;
|
||||
SV* arrayref();
|
||||
ExPolygonsPtr expolygons;
|
||||
void scale(double factor);
|
||||
void translate(double x, double y);
|
||||
void rotate(double angle, Point* center);
|
||||
|
|
|
@ -25,11 +25,14 @@ enum ExtrusionRole {
|
|||
class ExtrusionEntity
|
||||
{
|
||||
public:
|
||||
virtual ~ExtrusionEntity() {};
|
||||
ExtrusionRole role;
|
||||
double height; // vertical thickness of the extrusion expressed in mm
|
||||
double flow_spacing;
|
||||
};
|
||||
|
||||
typedef std::vector<ExtrusionEntity*> ExtrusionEntitiesPtr;
|
||||
|
||||
class ExtrusionPath : public ExtrusionEntity
|
||||
{
|
||||
public:
|
||||
|
|
18
xs/src/ExtrusionEntityCollection.hpp
Normal file
18
xs/src/ExtrusionEntityCollection.hpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
#ifndef slic3r_ExtrusionEntityCollection_hpp_
|
||||
#define slic3r_ExtrusionEntityCollection_hpp_
|
||||
|
||||
#include <myinit.h>
|
||||
#include "ExtrusionEntity.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
class ExtrusionEntityCollection
|
||||
{
|
||||
public:
|
||||
ExtrusionEntitiesPtr entities;
|
||||
bool no_sort;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -19,6 +19,9 @@ class Surface
|
|||
bool in_collection;
|
||||
};
|
||||
|
||||
typedef std::vector<Surface> Surfaces;
|
||||
typedef std::vector<Surface*> SurfacesPtr;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5,13 +5,10 @@
|
|||
|
||||
namespace Slic3r {
|
||||
|
||||
typedef std::vector<Surface> Surfaces;
|
||||
|
||||
class SurfaceCollection
|
||||
{
|
||||
public:
|
||||
Surfaces surfaces;
|
||||
SV* arrayref();
|
||||
SurfacesPtr surfaces;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue