forked from Ultimaker/CuraEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sliceDataStorage.h
84 lines (73 loc) · 1.55 KB
/
sliceDataStorage.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */
#ifndef SLICE_DATA_STORAGE_H
#define SLICE_DATA_STORAGE_H
#include "utils/intpoint.h"
#include "utils/polygon.h"
/*
SliceData
+ Layers[]
+ LayerParts[]
+ OutlinePolygons[]
+ Insets[]
+ Polygons[]
+ SkinPolygons[]
*/
class SliceLayerPart
{
public:
AABB boundaryBox;
Polygons outline;
Polygons combBoundery;
vector<Polygons> insets;
Polygons skinOutline;
Polygons sparseOutline;
int bridgeAngle;
};
class SliceLayer
{
public:
int z;
vector<SliceLayerPart> parts;
};
/******************/
class SupportPoint
{
public:
int32_t z;
double cosAngle;
SupportPoint(int32_t z, double cosAngle) : z(z), cosAngle(cosAngle) {}
};
class SupportStorage
{
public:
bool generated;
int angle;
bool everywhere;
int XYDistance;
int ZDistance;
Point gridOffset;
int32_t gridScale;
int32_t gridWidth, gridHeight;
vector<SupportPoint>* grid;
SupportStorage(){grid = NULL;}
~SupportStorage(){if(grid) delete [] grid;}
};
/******************/
class SliceVolumeStorage
{
public:
vector<SliceLayer> layers;
};
class SliceDataStorage
{
public:
Point3 modelSize, modelMin, modelMax;
Polygons skirt;
Polygons raftOutline;
vector<Polygons> oozeShield;
vector<SliceVolumeStorage> volumes;
SupportStorage support;
Polygons wipeTower;
Point wipePoint;
};
#endif//SLICE_DATA_STORAGE_H