1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-30 11:05:50 +00:00

Ported ExtrusionPath::Collection

This commit is contained in:
Alessandro Ranellucci
2013-07-18 19:09:07 +02:00
parent 0efea9e442
commit c030e38908
18 changed files with 181 additions and 60 deletions
+1
View File
@@ -23,6 +23,7 @@ class ExPolygon
};
typedef std::vector<ExPolygon> ExPolygons;
typedef std::vector<ExPolygon*> ExPolygonsPtr;
}
+6 -6
View File
@@ -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);
}
}
+1 -2
View File
@@ -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);
+3
View File
@@ -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
View 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
+3
View File
@@ -19,6 +19,9 @@ class Surface
bool in_collection;
};
typedef std::vector<Surface> Surfaces;
typedef std::vector<Surface*> SurfacesPtr;
}
#endif
+1 -4
View File
@@ -5,13 +5,10 @@
namespace Slic3r {
typedef std::vector<Surface> Surfaces;
class SurfaceCollection
{
public:
Surfaces surfaces;
SV* arrayref();
SurfacesPtr surfaces;
};
}