mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-12 03:22:32 +02:00
a648610d59
- **File formats:** - (Add) Wait time before cure: The time to rest/wait in seconds before cure a new layer - (Add) Wait time before after: The time to rest/wait in seconds after cure a new layer - (Add) Wait time after lift: The time to rest/wait in seconds after a lift/peel move - (Change) All gcode file formats dropped light-off delay field in favor of new 'Wait time before cure' field, setting light-off delay still valid but it redirects to the new field - (Change) Reorder 'Light-off delay' before 'Exposure time' - (Improvement) Recalculate the print time when a related property changes - (Fix) Generic time estimation calculation was ignoring exposure times - (Fix) Unable to load files with uppercase extensions - (Fix) ZIP: Use G1 at end of gcode instead of G0 - (Fix) CWS: Use G1 for movements - **(Fix) CXDLP:** (#240) - Layer area calculation - Validation checksum - **(Fix) ZCODE:** - Use G1 at end of gcode instead of G0 to prevent crash to top bug on firmware - Put back the M18 motors off at end of gcode - **GCode Builder/Parser:** - (Add) Allow to choose between G0 and G1 for layer movements and end gcode - (Fix) Safe guard: If the total print height is larger than set machine Z, do not raise/lower print on completeness - (Fix) Light-off delay is the real delay time and not the calculated movement of the lifts plus the extra time - (Improvement) Parse gcode line by line instead searching on a group of layers to allow a better control and identification - **Tools:** - **Change print parameters:** - (Add) Tooltips to labels - (Add) Sun UTF-8 to the Light PWM value unit to describe intensity - (Improvement) Dynamic lifts: Round lift height and speed to 1 decimal - (Fix) Exposure time finder: Time estimation when using 'Use different settings for layers with same Z positioning' - **Prusa Slicer:** - (Add) Note keyword: BottomWaitBeforeCure_xxx - (Add) Note keyword: WaitBeforeCure_xxx - (Add) Note keyword: BottomWaitAfterCure_xxx - (Add) Note keyword: WaitAfterCure_xxx - (Add) Note keyword: BottomWaitAfterLift_xxx - (Add) Note keyword: WaitAfterLift_xxx - (Change) Uniz IBEE: Remove light-off delay and implement wait time keywords - **macOS:** (#236) - (Remove) osx legacy packages from build and downloads - (Fix) macOS: Simplify the libcvextern.dylib and remove libtesseract dependency - (Fix) macOS: Include libusb-1.0.0.dylib - Note: `brew install libusb` still required - **UI:** - (Fix) Refresh gcode does not update text on UI for ZIP, CWS, ZCODEX files - (Fix) Operations: Import a .uvtop file by drag and drop into the UI would not load the layer range - (Change) When convert a file, the result dialog will have Yes, No and Cancel actions, where No will open the converted file on current window, while Cancel will not perform any action (The old No behaviour)
213 lines
8.7 KiB
Plaintext
213 lines
8.7 KiB
Plaintext
//------------------------------------------------
|
|
//--- 010 Editor v8.0.1 Binary Template
|
|
//
|
|
// File: ctb, cbddlp, photon
|
|
// Authors: Tiago Conceição
|
|
//------------------------------------------------
|
|
|
|
LittleEndian();
|
|
|
|
struct HEADER {
|
|
uint Magic <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Version <fgcolor=cBlack, bgcolor=cRed>;
|
|
|
|
float BedSizeX <fgcolor=cBlack, bgcolor=cRed>;
|
|
float BedSizeY <fgcolor=cBlack, bgcolor=cRed>;
|
|
float BedSizeZ <fgcolor=cBlack, bgcolor=cRed>;
|
|
|
|
uint Unknown1 <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Unknown2 <fgcolor=cBlack, bgcolor=cRed>;
|
|
|
|
float TotalHeightMilimeter <fgcolor=cBlack, bgcolor=cRed>;
|
|
float LayerHeightMilimeter <fgcolor=cBlack, bgcolor=cRed>;
|
|
float LayerExposureSeconds <fgcolor=cBlack, bgcolor=cRed>;
|
|
float BottomExposureSeconds <fgcolor=cBlack, bgcolor=cRed>;
|
|
float LightOffDelay <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint BottomLayersCount <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint ResolutionX <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint ResolutionY <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint PreviewLargeOffsetAddress <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint LayersDefinitionOffsetAddress <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint LayerCount <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint PreviewSmallOffsetAddress <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint PrintTime <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint ProjectorType <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint PrintParametersOffsetAddress <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint PrintParametersSize <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint AntiAliasLevel <fgcolor=cBlack, bgcolor=cRed>;
|
|
ushort LightPWM <fgcolor=cBlack, bgcolor=cRed>;
|
|
ushort BottomLightPWM <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint EncryptionKey <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint SlicerOffset <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint SlicerSize <fgcolor=cBlack, bgcolor=cRed>;
|
|
} header;
|
|
|
|
struct PREVIEW {
|
|
uint ResolutionX <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint ResolutionY <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint ImageOffset <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint ImageLength <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Unknown1 <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Unknown2 <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Unknown3 <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Unknown4 <fgcolor=cBlack, bgcolor=cRed>;
|
|
|
|
byte Data[ImageLength] <fgcolor=cBlack, bgcolor=cRed>;
|
|
};
|
|
|
|
struct PRINT_PARAMETERS {
|
|
float BottomLiftHeight <fgcolor=cBlack, bgcolor=cRed>;
|
|
float BottomLiftSpeed <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>;
|
|
float WeightG <fgcolor=cBlack, bgcolor=cRed>;
|
|
float CostDollars <fgcolor=cBlack, bgcolor=cRed>;
|
|
float BottomLightOffDelay <fgcolor=cBlack, bgcolor=cRed>;
|
|
float LightOffDelay <fgcolor=cBlack, bgcolor=cRed>;
|
|
|
|
uint BottomLayerCount <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Padding1 <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Padding2 <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Padding3 <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Padding4 <fgcolor=cBlack, bgcolor=cRed>;
|
|
};
|
|
|
|
struct SLICER_INFO {
|
|
float BottomLiftDistance2 <fgcolor=cBlack, bgcolor=cRed>;
|
|
float BottomLiftSpeed2 <fgcolor=cBlack, bgcolor=cRed>;
|
|
float LiftHeight2 <fgcolor=cBlack, bgcolor=cRed>;
|
|
float LiftSpeed2 <fgcolor=cBlack, bgcolor=cRed>;
|
|
float RetractHeight2 <fgcolor=cBlack, bgcolor=cRed>;
|
|
float RetractSpeed2 <fgcolor=cBlack, bgcolor=cRed>;
|
|
float RestTimeAfterLift <fgcolor=cBlack, bgcolor=cRed>;
|
|
|
|
uint MachineNameAddress <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint MachineNameSize <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint EncryptionMode <fgcolor=cBlack, bgcolor=cRed>; // 0/8 for cbddlp files, 0xF (15) for ctb files, 0x2000000F (536870927) for v3 ctb and 1073741839 for v4 ctb files to allow per layer parameters
|
|
uint MysteriousId <fgcolor=cBlack, bgcolor=cRed>; // v3 = 305419896 | v4 lightoff? = 27093086 | v4 rest? = 27093090
|
|
uint AntiAliasLevel <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint SoftwareVersion <fgcolor=cBlack, bgcolor=cRed>; // ctb v3 = 17171200 | ctb v4 pro = 16777216
|
|
float RestTimeAfterRetract <fgcolor=cBlack, bgcolor=cRed>;
|
|
float RestTimeAfterLift2 <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint TransitionLayerCount <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Padding1 <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Padding2 <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Padding3 <fgcolor=cBlack, bgcolor=cRed>;
|
|
|
|
if(MachineNameAddress > 0 && MachineNameSize > 0)
|
|
{
|
|
char MachineName[MachineNameSize] <fgcolor=cBlack, bgcolor=cRed>;
|
|
}
|
|
};
|
|
|
|
|
|
if(header.PreviewLargeOffsetAddress > 0)
|
|
{
|
|
FSeek(header.PreviewLargeOffsetAddress);
|
|
PREVIEW previewLarge <fgcolor=cBlack, bgcolor=cYellow>;
|
|
}
|
|
if(header.PreviewSmallOffsetAddress > 0)
|
|
{
|
|
FSeek(header.PreviewSmallOffsetAddress);
|
|
PREVIEW previewSmall <fgcolor=cBlack, bgcolor=cYellow>;
|
|
}
|
|
|
|
if(header.PrintParametersOffsetAddress > 0){
|
|
FSeek(header.PrintParametersOffsetAddress);
|
|
PRINT_PARAMETERS parameters <fgcolor=cBlack, bgcolor=cYellow>;
|
|
}
|
|
|
|
if(header.SlicerOffset > 0){
|
|
FSeek(header.SlicerOffset);
|
|
SLICER_INFO SlicerInfo <fgcolor=cBlack, bgcolor=cYellow>;
|
|
}
|
|
|
|
if(header.Version >= 4)
|
|
{
|
|
struct PRINT_PARAMETERS_V4
|
|
{
|
|
char Disclaimer[320] <fgcolor=cBlack, bgcolor=cYellow>;
|
|
float BottomRetractSpeed <fgcolor=cWhite, bgcolor=cBlue>;
|
|
float BottomRetractSpeed2 <fgcolor=cWhite, bgcolor=cBlue>;
|
|
uint Padding1 <fgcolor=cWhite, bgcolor=cBlue>;
|
|
float Four1 <fgcolor=cWhite, bgcolor=cBlue>; // 4?
|
|
uint Padding2 <fgcolor=cWhite, bgcolor=cBlue>;
|
|
float Four2 <fgcolor=cWhite, bgcolor=cBlue>; // 4?
|
|
float RestTimeAfterRetract <fgcolor=cWhite, bgcolor=cBlue>;
|
|
float RestTimeAfterLift <fgcolor=cWhite, bgcolor=cBlue>;
|
|
float RestTimeBeforeLift <fgcolor=cWhite, bgcolor=cBlue>;
|
|
float BottomRetractHeight2 <fgcolor=cWhite, bgcolor=cBlue>;
|
|
float Unknown1 <fgcolor=cWhite, bgcolor=cBlue>; // 2955.996 or uint:1161347054 but changes
|
|
uint Unknown2 <fgcolor=cWhite, bgcolor=cBlue>; // 73470 but changes
|
|
uint Unknown3 <fgcolor=cWhite, bgcolor=cBlue>; // 5?
|
|
uint Unknown4 <fgcolor=cWhite, bgcolor=cBlue>; // 139 but changes
|
|
uint Padding3 <fgcolor=cWhite, bgcolor=cBlue>;
|
|
uint Padding4 <fgcolor=cWhite, bgcolor=cBlue>;
|
|
uint Padding5 <fgcolor=cWhite, bgcolor=cBlue>;
|
|
uint Padding6 <fgcolor=cWhite, bgcolor=cBlue>;
|
|
uint Unknown5 <fgcolor=cWhite, bgcolor=cBlue>; // 23047 but changes
|
|
uint Unknown6 <fgcolor=cWhite, bgcolor=cBlue>; // 320 but changes
|
|
byte Reserved[420] <fgcolor=cWhite, bgcolor=cBlue>;
|
|
} printParametersV4;
|
|
}
|
|
|
|
typedef struct() {
|
|
float LayerPositionZ <fgcolor=cBlack, bgcolor=cRed>;
|
|
float LayerExposure <fgcolor=cBlack, bgcolor=cRed>;
|
|
float LightOffSeconds <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint DataAddress <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint DataSize <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Unknown1 <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Unknown2 <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Unknown3 <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Unknown4 <fgcolor=cBlack, bgcolor=cRed>;
|
|
} LAYER_DATA;
|
|
|
|
typedef struct() {
|
|
LAYER_DATA LayerData <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint TotalSize <fgcolor=cBlack, bgcolor=cRed>;
|
|
float LiftHeight <fgcolor=cBlack, bgcolor=cRed>;
|
|
float LiftSpeed <fgcolor=cBlack, bgcolor=cRed>;
|
|
float LiftHeight2 <fgcolor=cBlack, bgcolor=cRed>;
|
|
float LiftSpeed2 <fgcolor=cBlack, bgcolor=cRed>;
|
|
float RetractSpeed <fgcolor=cBlack, bgcolor=cRed>;
|
|
float RetractHeight2 <fgcolor=cBlack, bgcolor=cRed>;
|
|
float RetractSpeed2 <fgcolor=cBlack, bgcolor=cRed>;
|
|
float RestTimeBeforeLift <fgcolor=cBlack, bgcolor=cRed>;
|
|
float RestTimeAfterLift <fgcolor=cBlack, bgcolor=cRed>;
|
|
float RestTimeAfterRetract <fgcolor=cBlack, bgcolor=cRed>;
|
|
float LightPWM <fgcolor=cBlack, bgcolor=cRed>;
|
|
} LAYER_DATAEX;
|
|
|
|
|
|
typedef struct(int size) {
|
|
byte layerDataBlock[size] <fgcolor=cBlack, bgcolor=cGreen>;
|
|
} LAYER_RLE;
|
|
|
|
FSeek(header.LayersDefinitionOffsetAddress);
|
|
struct LAYERS {
|
|
local int aa;
|
|
local int i;
|
|
local uint currentPos;
|
|
|
|
for( aa = 0; aa < header.AntiAliasLevel; aa++)
|
|
{
|
|
for( i = 0; i < header.LayerCount; i++ ){
|
|
LAYER_DATA layerData <fgcolor=cBlack, bgcolor=cYellow>;
|
|
currentPos = FTell();
|
|
|
|
if(header.Version >= 3)
|
|
{
|
|
FSeek(layerData.DataAddress - 84);
|
|
LAYER_DATAEX layerDataEx;
|
|
}
|
|
|
|
FSeek(layerData.DataAddress);
|
|
LAYER_RLE layerRLE(layerData.DataSize);
|
|
FSeek(currentPos);
|
|
}
|
|
}
|
|
} layers;
|