mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-08 17:42:31 +02:00
ea4f7e0400
- **UI:** - (Improvement) Layer navigation load time by parallel `Mat` to `Bitmap` conversion - (Improvement) Allow to show exceptions without the stack trace and detailed trigger action by using the `MessageExceiption` (#644) - (Improvement) Allow progress to have and display a detailed log (#644) - (Improvement) Convert format to another with multiple versions will now only show the possible versions for the extension - **Suggestion - Wait time before cure:** - (Improvement) Set the first wait time based on first valid layer mass rather than use the fixed limit - (Improvement) Set zero time to empty and dummy layers - (Improvement) When creating the dummy layer also increment the bottom layer count as the created layer count as one - **PCB Exposure:** - (Add) Excellon Drill Format (drl) to cut off holes (Implementation may lack some advanced features, please confirm the result) (#646) - (Fix) Arc (G03) with negative offsets (I-/J-) was not drawing the shape correctly - (Fix) Implement the rotation for the outline primitive (#645) - **File formats:** - (Improvement) Formats now sanitize the selected version before encode given the file extension, if version is out of range it will force the last known version - (Fix) CBDDLP: Remove a table from the file that might cause layer corruption - (Add) Operations - `AfterCompleteReport` property: Gets or sets an report to show to the user after complete the operation with success - (Improvement) Suggestion - Wait time after cure: Set zero time to empty and dummy layers - (Improvement) Slight improvement on the contour intersection check, yields better performance on resin and suction cup detection - (Improvement) Allow to trigger message boxes from operations and scripts (#644) - (Upgrade) .NET from 6.0.12 to 6.0.13
221 lines
9.2 KiB
Plaintext
221 lines
9.2 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>;
|
|
|
|
ubyte Data[ImageLength] <fgcolor=cBlack, bgcolor=cYellow>;
|
|
};
|
|
|
|
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 PerLayerSettings <fgcolor=cBlack, bgcolor=cRed, format=hex>; // 0 to not support, 0x20 (32) for v3 ctb and 1073741839 for v4 ctb files to allow per layer parameters
|
|
ubyte AntiAliasFlag <fgcolor=cBlack, bgcolor=cRed>; // 0 [No AA] / 8 [AA] for cbddlp files, 7(0x7) [No AA] / 15(0x0F) [AA] for ctb files
|
|
ushort Padding <fgcolor=cBlack, bgcolor=cRed>;
|
|
ubyte PerLayerSettings <fgcolor=cBlack, bgcolor=cRed, format=hex>; // 0 to not support, 0x20 for v3 ctb and 0x40 to 0x50 for v4 ctb files to allow per layer parameters, 16 * version?
|
|
uint TimestampMinutes <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint AntiAliasLevel <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint SoftwareVersion <fgcolor=cBlack, bgcolor=cRed, format=hex>; // 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 PrintParametersV4Address <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Padding2 <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Padding3 <fgcolor=cBlack, bgcolor=cRed>;
|
|
|
|
if(MachineNameAddress > 0 && MachineNameSize > 0)
|
|
{
|
|
FSeek(MachineNameAddress);
|
|
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)
|
|
{
|
|
FSeek(SlicerInfo.PrintParametersV4Address);
|
|
struct PRINT_PARAMETERS_V4
|
|
{
|
|
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 LastLayerIndex <fgcolor=cWhite, bgcolor=cBlue>; // LayerCount-1
|
|
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 DisclaimerAddress <fgcolor=cWhite, bgcolor=cBlue>;
|
|
uint DisclaimerLength <fgcolor=cWhite, bgcolor=cBlue>; // 320
|
|
ubyte Reserved[384] <fgcolor=cYellow, bgcolor=cBlue>;
|
|
} printParametersV4;
|
|
|
|
FSeek(printParametersV4.DisclaimerAddress);
|
|
char DisclaimerText[printParametersV4.DisclaimerLength] <fgcolor=cBlack, bgcolor=cYellow>;;
|
|
|
|
}
|
|
|
|
struct LAYER_DATA {
|
|
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 PageNumber <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint TableSize <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Unknown3 <fgcolor=cBlack, bgcolor=cRed>;
|
|
uint Unknown4 <fgcolor=cBlack, bgcolor=cRed>;
|
|
};
|
|
|
|
struct LAYER_DATAEX {
|
|
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>;
|
|
};
|
|
|
|
|
|
typedef struct(int size) {
|
|
ubyte layerDataBlock[size] <fgcolor=cBlack, bgcolor=cGreen>;
|
|
} LAYER_RLE;
|
|
|
|
FSeek(header.LayersDefinitionOffsetAddress);
|
|
struct LAYERS {
|
|
local int aa;
|
|
local int i;
|
|
local uint currentPos;
|
|
local uint aaLevel = Max(1, header.AntiAliasLevel);
|
|
|
|
for( aa = 0; aa < aaLevel; aa++)
|
|
{
|
|
for( i = 0; i < header.LayerCount; i++ ){
|
|
LAYER_DATA layerData <fgcolor=cBlack, bgcolor=cYellow>;
|
|
currentPos = FTell();
|
|
|
|
if(header.Version >= 3)
|
|
{
|
|
FSeek(layerData.PageNumber * 4294967296 + layerData.DataAddress - 84);
|
|
LAYER_DATAEX layerDataEx;
|
|
}
|
|
|
|
FSeek(layerData.PageNumber * 4294967296 + layerData.DataAddress);
|
|
LAYER_RLE layerRLE(layerData.DataSize);
|
|
FSeek(currentPos);
|
|
}
|
|
}
|
|
} layers;
|