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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
|
//------------------------------------------------
//--- 010 Editor v8.0.1 Binary Template
//
// File: pws, pw0, pwm, pwma, pwmo, pwms, pwmx, pwmb, pmsq, dlp
// Authors: Tiago Conceição
//------------------------------------------------
LittleEndian();
struct FILEMARK {
char Mark[12] <fgcolor=cBlack, bgcolor=cRed>;
uint Version <fgcolor=cBlack, bgcolor=cRed>; // 1 or 515 or 516
uint AreaNum <fgcolor=cBlack, bgcolor=cRed>;
uint HeaderAddress <fgcolor=cBlack, bgcolor=cRed>;
uint Unknown <fgcolor=cBlack, bgcolor=cRed>; // 6357060 for 516
uint PreviewAddress <fgcolor=cBlack, bgcolor=cRed>;
uint PreviewEndAddress <fgcolor=cBlack, bgcolor=cRed>; // Version 515 only
uint LayerDefinitionAddress <fgcolor=cBlack, bgcolor=cRed>;
uint ExtraAddress <fgcolor=cBlack, bgcolor=cRed>;
if(Version < 516)
{
uint LayerImageAddress <fgcolor=cBlack, bgcolor=cRed>;
}
else{
uint MachineAddress <fgcolor=cBlack, bgcolor=cRed>;
uint LayerImageAddress <fgcolor=cBlack, bgcolor=cRed>;
}
} fileMark;
struct SECTION {
char Mark[12] <fgcolor=cBlack, bgcolor=cYellow>;
uint Length <fgcolor=cBlack, bgcolor=cYellow>;
};
struct HEADER {
SECTION section;
float PixelSizeUm <fgcolor=cBlack, bgcolor=cRed>;
float LayerHeight <fgcolor=cBlack, bgcolor=cRed>;
float LayerExposureTime <fgcolor=cBlack, bgcolor=cRed>;
float WaitTimeBeforeCure <fgcolor=cBlack, bgcolor=cRed>;
float BottomExposureSeconds <fgcolor=cBlack, bgcolor=cRed>;
float BottomLayersCount <fgcolor=cBlack, bgcolor=cRed>;
float LiftHeight <fgcolor=cBlack, bgcolor=cRed>;
float LiftSpeed <fgcolor=cBlack, bgcolor=cRed>;
float RetractSpeed <fgcolor=cBlack, bgcolor=cRed>;
float VolumeMl <fgcolor=cBlack, bgcolor=cRed>;
uint AntiAliasing <fgcolor=cBlack, bgcolor=cRed>;
uint ResolutionX <fgcolor=cBlack, bgcolor=cRed>;
uint ResolutionY <fgcolor=cBlack, bgcolor=cRed>;
float WeightG <fgcolor=cBlack, bgcolor=cRed>;
float Price <fgcolor=cBlack, bgcolor=cRed>;
uint PriceCurrencyDec <fgcolor=cBlack, bgcolor=cRed>;
uint PerLayerOverride <fgcolor=cBlack, bgcolor=cRed>;
uint PrintTime <fgcolor=cBlack, bgcolor=cRed>;
uint TransitionLayerCount <fgcolor=cBlack, bgcolor=cRed>;
uint Padding <fgcolor=cBlack, bgcolor=cRed>;
if(fileMark.Version > 515){
uint Padding <fgcolor=cBlack, bgcolor=cRed>;
}
};
if(fileMark.HeaderAddress > 0){
FSeek(fileMark.HeaderAddress);
HEADER header;
}
struct PREVIEW {
SECTION section;
uint ResolutionX <fgcolor=cBlack, bgcolor=cRed>;
uint DpiResolution <fgcolor=cBlack, bgcolor=cRed>;
uint ResolutionY <fgcolor=cBlack, bgcolor=cRed>;
ubyte Data[ResolutionX*ResolutionY*2] <fgcolor=cBlack, bgcolor=cGreen>;
/*uint Unknown1 <fgcolor=cBlack, bgcolor=cRed>;
uint Unknown2 <fgcolor=cBlack, bgcolor=cRed>;
uint Unknown3 <fgcolor=cBlack, bgcolor=cRed>;
uint Unknown4 <fgcolor=cBlack, bgcolor=cRed>;*/
};
if(fileMark.PreviewAddress > 0){
FSeek(fileMark.PreviewAddress);
PREVIEW preview;
if(fileMark.Version >= 515)
{
uint Reserved[7] <fgcolor=cWhite, bgcolor=cBlack>;
}
}
typedef struct(int size) {
ubyte layerDataBlock[size] <fgcolor=cBlack, bgcolor=cGreen>;
} LAYER_RLE;
struct LayerDefinition {
SECTION section;
uint LayerCount <fgcolor=cBlack, bgcolor=cRed>;
};
struct LAYER_DEF {
uint DataAddress <fgcolor=cWhite, bgcolor=cBlue>;
uint DataLength <fgcolor=cWhite, bgcolor=cBlue>;
float LiftHeight <fgcolor=cWhite, bgcolor=cBlue>;
float LiftSpeed <fgcolor=cWhite, bgcolor=cBlue>;
float ExposureTime <fgcolor=cWhite, bgcolor=cBlue>;
float LayerHeight <fgcolor=cWhite, bgcolor=cBlue>;
uint NonZeroPixelCount <fgcolor=cWhite, bgcolor=cBlue>;
uint Padding1 <fgcolor=cWhite, bgcolor=cBlue>;
local uint currentPos = FTell();
FSeek(DataAddress);
ubyte RLE[DataLength] <fgcolor=cWhite, bgcolor=cBlack>;
FSeek(currentPos);
};
if(fileMark.Version >= 516 && fileMark.ExtraAddress > 0){
FSeek(fileMark.ExtraAddress);
struct EXTRA {
SECTION section;
uint Unknown <fgcolor=cBlack, bgcolor=cRed>; // 2
float BottomLiftHeight0 <fgcolor=cBlack, bgcolor=cGreen>;
float BottomLiftSpeed0 <fgcolor=cBlack, bgcolor=cGreen>;
float BottomRetractSpeed0 <fgcolor=cBlack, bgcolor=cGreen>;
float BottomLiftHeight1 <fgcolor=cBlack, bgcolor=cGreen>;
float BottomLiftSpeed1 <fgcolor=cBlack, bgcolor=cGreen>;
float BottomRetractSpeed1 <fgcolor=cBlack, bgcolor=cGreen>;
uint Unknown <fgcolor=cBlack, bgcolor=cGreen>; // 2
float LiftHeight0 <fgcolor=cBlack, bgcolor=cGreen>;
float LiftSpeed0 <fgcolor=cBlack, bgcolor=cGreen>;
float RetractSpeed0 <fgcolor=cBlack, bgcolor=cGreen>;
float LiftHeight1 <fgcolor=cBlack, bgcolor=cGreen>;
float LiftSpeed1 <fgcolor=cBlack, bgcolor=cGreen>;
float RetractSpeed1 <fgcolor=cBlack, bgcolor=cGreen>;
} extra;
}
if(fileMark.Version >= 516 && fileMark.MachineAddress > 0){
struct MACHINE {
SECTION section;
char MachineName[96] <fgcolor=cBlack, bgcolor=cRed>;
char ImageFormat[24] <fgcolor=cWhite, bgcolor=cRed>;
float DisplayWidth <fgcolor=cBlack, bgcolor=cRed>;
float DisplayHeight <fgcolor=cBlack, bgcolor=cRed>;
float MachineZ <fgcolor=cBlack, bgcolor=cRed>;
uint Version <fgcolor=cBlack, bgcolor=cRed>; // Version again? 516
uint Unknown <fgcolor=cBlack, bgcolor=cRed>; // 6506241
} machine;
}
if(fileMark.LayerDefinitionAddress > 0){
FSeek(fileMark.LayerDefinitionAddress);
LayerDefinition layerDefinition;
struct LAYERS{
local uint i;
for(i = 0; i < layerDefinition.LayerCount; i++ ){
LAYER_DEF layerDef;
}
} layers;
}
|