forked from Ultimaker/CuraEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sliceDataStorage.h
74 lines (64 loc) · 1.31 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
/** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */
#ifndef SLICE_DATA_STORAGE_H
#define SLICE_DATA_STORAGE_H
#include <vector>
using std::vector;
#include "utils/intpoint.h"
using ClipperLib::Polygons;
/*
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:
vector<SliceLayerPart> parts;
};
/******************/
class SupportPoint
{
public:
int32_t z;
double cosAngle;
SupportPoint(int32_t z, double cosAngle) : z(z), cosAngle(cosAngle) {}
};
class SupportStorage
{
public:
Point gridOffset;
int32_t gridScale;
int32_t gridWidth, gridHeight;
vector<SupportPoint>* grid;
};
/******************/
class SliceVolumeStorage
{
public:
vector<SliceLayer> layers;
};
class SliceDataStorage
{
public:
Point3 modelSize, modelMin, modelMax;
Polygons skirt;
Polygons raftOutline;
vector<SliceVolumeStorage> volumes;
SupportStorage support;
};
#endif//SLICE_DATA_STORAGE_H