-
Notifications
You must be signed in to change notification settings - Fork 0
/
Setting.h
117 lines (99 loc) · 2.09 KB
/
Setting.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#pragma once
#include"stdafx.h"
struct point3D {
float x;
float y;
float z;
float xn, yn;//法向量
point3D operator + (const point3D& b)
{
point3D temp = b;
temp.x += x;
temp.y += y;
temp.z += z;
return temp;
}
point3D operator + (const int& b)
{
point3D temp = *this;
temp.x += b;
temp.y += b;
temp.z += b;
return temp;
}
point3D operator - (const point3D& b)
{
point3D temp = *this;
temp.x -= b.x;
temp.y -= b.y;
temp.z -= b.z;
return temp;
}
point3D operator - (const int& b)
{
point3D temp = *this;
temp.x -= b;
temp.y -= b;
temp.z -= b;
return temp;
}
point3D operator / (const double& b)
{
point3D temp = *this;
temp.x /= b;
temp.y /= b;
temp.z /= b;
return temp;
}
point3D operator * (const double& b)
{
point3D temp = *this;
temp.x *= b;
temp.y *= b;
temp.z *= b;
return temp;
}
};
/*
std::map<std::string, int> texture{
{ "Pattern0",0 },
{ "Pattern1",1 },
{ "Pattern2",2 },
{ "Pattern3",3 },
{ "Pattern4",4 },
{ "Pattern5",5 },
{ "Pattern6",6 },
{ "Pattern7",7 },
{ "Pattern8",8 },
{ "Pattern9",9 },
};
*/
typedef std::vector<point3D> Layer;
typedef std::vector<Layer> Model;
class Setting {
public:
//砖块相关
double g_BrickWidth;//墙砖的宽度 单位:mm
double g_BrickHeight;//墙砖的高度 单位:mm
double g_BrickThickness;//墙砖的厚度 单位:mm
double g_CircleRadius;//弧面对应的圆的半径
double g_SupportsNumber;//支撑的数目
double g_LayerThickness;//层厚
int g_LayersNumber;//层数
//打印机相关
std::string g_PrinterID;//打印机种类
double g_LineWidth;//线宽
double g_PrinterSpeed;//打印机速度
double g_ExtruderDiameter;//打印机头的直径
double g_CentralX;//打印机中心X坐标
double g_CentralY;//打印机中心Y坐标
double g_ExtrusionRate;//挤出率
std::string outputFilePath;//输出文件的路径
int g_Texture;//纹理种类
std::string g_TextureName;
double g_TextureAmplitude;//纹理的振幅,单位:mm
int g_HorizontalCyclesNumber;//水平方向纹理的周期数目
int g_VerticalCyclesNumber;//垂直方向纹理的周期数目
int g_PointDensity;//一周期内点的密度
void Readin_configure(std::string CONGFIGPATH);
};