mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-08 17:42:31 +02:00
816898836b
- **File formats:** - (Add) File extension: .gktwo.ctb to `ChituboxFile` to be able to convert files for UniFormation GKtwo under special CTB format - (Add) UniFormation GKtwo compatibility under CTB format, if exporting JXS rename to CTB before open - (Fix) CTB, CBDDLP, PHOTON, FDG, PHZ: Read and write files larger then 4GB (#608) - **PCB Exposure:** - (Add) Offset X/Y to offset the PCB from it origin - (Add) Allow to toggle between "Show preview image cropped by it bounds" and "Show full preview image (The final result)" - (Improvement) Use rectangle instead of line for center line primitive (#607) - (Fix) Implement rotation to polygon and center line primitives (#607) - (Fix) Macros in a single line was not being parsed (#607) - (Fix) Invert color per file was not affecting primitives - **Network printers:** - (Add) Socket requests with TCP and UDP - (Add) AnyCubic printer preset (However it can't upload a file) - (Add) Scripts in request path to allow a first request to fetch data to the final request: - A script starts with **<\?** and ends with **?>** - First parameter is the first request to get response content from - Second parameter is the regex pattern to match content with - Third parameter is the final request that supports a parameter from regex matching group, eg: **{#1}** is match Group[1] value - **Example:** <\? getfiles > {0}\/(\d+\.[\da-zA-Z]+), > printfile,{#1} ?> - (Change) Allow to print a filename without send it when upload request path is empty - (Fix) Do not show printers with empty requests - (Change) Default layer compression to Lz4 instead of Png - (Improvement) Application is now culture aware but set part of `NumberFormat` to the `InvariantCulture.NumberFormat` - (Improvement) Material cost now show with the current culture currency symbol due previous change - (Improvement) Better submit of bug reports using sections and forms - (Improvement) Linux: AppImage now have a help manual with possible arguments and parameters - (Improvement) macOS: Codesign app on auto-installer and auto-upgrade to bypass arm64 run restriction (#431) - (Improvement) macOS: Rebuilt arm64 libcvextern.dylib to run with less dependencies (#431) - (Improvement) macOS: Try to show missing dependencies from openCV (if any) on the error message - (Fix) UI: layers sorted lexicographically instead of numerically in the issues list view (#611) - (Fix) PrusaSlicer printer parameters: UniFormation GKtwo
218 lines
8.9 KiB
Plaintext
218 lines
8.9 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/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 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)
|
|
{
|
|
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;
|