mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-08 17:42:31 +02:00
99e3e33ac6
- **Shortcuts:** - (Add) **Delete:** While on layer preview and with roi or mask(s) selected, will remove the selected area from layer - (Add) **Alt + Delete:** While on layer preview and with roi or mask(s) selected, will remove the selected area from all layers - (Add) **Ctrl + Delete:** While on layer preview, will remove the current layer - (Add) **Insert:** While on layer preview and with roi or mask(s) selected, will keep only the selected area in layer - (Add) **Alt + Insert:** While on layer preview and with roi or mask(s) selected, will keep only the selected area in all layers - (Add) **Ctrl + Insert:** While on layer preview, will clone the current layer - (Add) **Home:** While on layer preview will go to first layer - (Add) **End:** While on layer preview will go to last layer - (Add) **Page up:** While on layer preview will skip +10 layers - (Add) **Page down:** While on layer preview will skip -10 layers - (Add) Tool - Lithophane: Generate lithophane from a picture - (Fix) Pixel arithmetic: When run with masks it produce a incorrect outcome - (Fix) CXDLP: Layer area table miscalculation, causing slow down prints
147 lines
4.5 KiB
Plaintext
147 lines
4.5 KiB
Plaintext
//------------------------------------------------
|
|
//--- 010 Editor v8.0.1 Binary Template
|
|
//
|
|
// File: Creality
|
|
// Authors: Julien Delnatte
|
|
//------------------------------------------------
|
|
// CHANGELOG:
|
|
// Add version 3
|
|
// Add uint16 unknown after header (Set to 2)
|
|
// Add uint32 modelSize and ubyte model[modelSize] after unknown
|
|
// Add ubyte offset[64] after resolutionY (Zeros)
|
|
|
|
|
|
BigEndian();
|
|
|
|
typedef struct {
|
|
BitfieldDisablePadding();
|
|
ushort startY:13;
|
|
ushort endY:13;
|
|
ushort x:14;
|
|
ubyte grey <fgcolor=cBlack, bgcolor=cWhite>;
|
|
} layerPointsData;
|
|
|
|
typedef struct {
|
|
uint32 layerArea <fgcolor=cBlack, bgcolor=cWhite>;
|
|
} layerDef;
|
|
|
|
typedef struct() {
|
|
uint32 layerArea <fgcolor=cBlack, bgcolor=cWhite>;
|
|
uint32 layerLineCount <fgcolor=cBlack, bgcolor=cWhite>;
|
|
|
|
layerPointsData pD()[layerLineCount];
|
|
ubyte CR_LF2[2] <fgcolor=cBlack, bgcolor=cRed>;
|
|
} layerData;
|
|
|
|
typedef struct(int size) {
|
|
ubyte layerDataBlock[size] <fgcolor=cBlack, bgcolor=0x00FF00>;
|
|
} RgbPreviewImageRawData;
|
|
|
|
struct HEADER {
|
|
uint32 HeaderSize <fgcolor=cBlack, bgcolor=cWhite>;
|
|
char Header[HeaderSize] <fgcolor=cBlack, bgcolor=cRed>;
|
|
|
|
uint16 Version <fgcolor=cBlack, bgcolor=cWhite>;
|
|
|
|
uint32 PrinterModelSize <fgcolor=cBlack, bgcolor=cWhite>;
|
|
char PrinterModel[PrinterModelSize] <fgcolor=cBlack, bgcolor=cRed>;
|
|
|
|
uint16 TotalLayers <fgcolor=cBlack, bgcolor=cWhite>;
|
|
uint16 ResolutionX <fgcolor=cBlack, bgcolor=cWhite>;
|
|
uint16 ResolutionY <fgcolor=cBlack, bgcolor=cWhite>;
|
|
|
|
ubyte Offset[64];
|
|
} header;
|
|
|
|
|
|
struct PREVIEWS {
|
|
RgbPreviewImageRawData preview(116*116*2);
|
|
ubyte rn0[2] <fgcolor=cBlack, bgcolor=cRed>;
|
|
|
|
RgbPreviewImageRawData preview2(290*290*2);
|
|
ubyte rn1[2] <fgcolor=cBlack, bgcolor=cRed>;
|
|
|
|
RgbPreviewImageRawData preview2(290*290*2);
|
|
ubyte rn2[2] <fgcolor=cBlack, bgcolor=cRed>;
|
|
} previews;
|
|
|
|
struct SLICER_INFO {
|
|
uint32 PlateformXLength <fgcolor=cBlack, bgcolor=cWhite>;
|
|
wchar_t plateformX[PlateformXLength/2];
|
|
|
|
uint32 PlateformYLength <fgcolor=cBlack, bgcolor=cWhite>;
|
|
wchar_t PlateformY[PlateformYLength/2];
|
|
|
|
uint32 LayerThicknessLength <fgcolor=cBlack, bgcolor=cWhite>;
|
|
wchar_t LayerThickness[LayerThicknessLength/2];
|
|
|
|
uint16 ExposureTime <fgcolor=cBlack, bgcolor=cWhite>;
|
|
uint16 WaitTimeBeforeCure <fgcolor=cBlack, bgcolor=cWhite>; // Cant be 0!
|
|
uint16 BottomExposureTime <fgcolor=cBlack, bgcolor=cWhite>;
|
|
uint16 BottomLayersCount <fgcolor=cBlack, bgcolor=cWhite>;
|
|
uint16 BottomLiftHeight <fgcolor=cBlack, bgcolor=cWhite>;
|
|
uint16 BottomLiftSpeed <fgcolor=cBlack, bgcolor=cWhite>;
|
|
uint16 LiftHeight <fgcolor=cBlack, bgcolor=cWhite>;
|
|
uint16 LiftSpeed <fgcolor=cBlack, bgcolor=cWhite>;
|
|
uint16 RetractSpeed <fgcolor=cBlack, bgcolor=cWhite>;
|
|
uint16 BottomLightPWM <fgcolor=cBlack, bgcolor=cWhite>;
|
|
uint16 LightPWM <fgcolor=cBlack, bgcolor=cWhite>;
|
|
|
|
} slicerInfo;
|
|
|
|
struct LAYER_DEF {
|
|
local int i;
|
|
for( i = 0; i < header.TotalLayers; i++ ){
|
|
layerDef ID;
|
|
}
|
|
ubyte rn3[2] <fgcolor=cBlack, bgcolor=cRed>;
|
|
} layerDefs;
|
|
|
|
if(header.Version >= 3){
|
|
struct SLICER_INFO_V3 {
|
|
uint32 SoftwareNameSize;
|
|
char SoftwareName[SoftwareNameSize];
|
|
uint32 MaterialNameSize;
|
|
char MaterialName[MaterialNameSize];
|
|
ubyte DistortionCompensationEnabled;
|
|
uint DistortionCompensationThickness;
|
|
uint DistortionCompensationFocalLength;
|
|
ubyte XYAxisProfileCompensationEnabled;
|
|
ushort XYAxisProfileCompensation;
|
|
ubyte ZPenetrationCompensationEnabled;
|
|
ushort ZPenetrationCompensationLevel;
|
|
ubyte AntiAliasEnabled;
|
|
ubyte AntiAliasGreyMinValue;
|
|
ubyte AntiAliasGreyMaxValue;
|
|
ubyte ImageBlurEnabled;
|
|
ubyte ImageBlurLevel;
|
|
ubyte rn0[2] <fgcolor=cBlack, bgcolor=cRed>;
|
|
} slicerInfoV3;
|
|
}
|
|
|
|
|
|
struct LAYERS {
|
|
local int i;
|
|
for( i = 0; i < header.TotalLayers; i++ ){
|
|
layerData lD();
|
|
}
|
|
} layers;
|
|
|
|
struct FOOTER {
|
|
uint32 FooterSize <fgcolor=cBlack, bgcolor=cWhite>;
|
|
char Marker[FooterSize] <fgcolor=cBlack, bgcolor=cRed>;
|
|
} footer;
|
|
|
|
|
|
//ubyte CheckSum <fgcolor=cBlack, bgcolor=cWhite>;
|
|
//ubyte CheckSum <fgcolor=cBlack, bgcolor=cWhite>;
|
|
//ubyte CheckSum <fgcolor=cBlack, bgcolor=cWhite>;
|
|
//ubyte CheckSum <fgcolor=cBlack, bgcolor=cWhite>;
|
|
uint CheckSum <fgcolor=cBlack, bgcolor=cWhite>;
|
|
|
|
/*
|
|
local ubyte calculatedChecksum = 0;
|
|
local ulong i = 0;
|
|
for(i = 0; i < FileSize()-4; i++ ){
|
|
calculatedChecksum ^= ReadByte(i);
|
|
}
|
|
|
|
ubyte CalculatedChecksum = calculatedChecksum;
|
|
*/ |