//------------------------------------------------ //--- 010 Editor v8.0.1 Binary Template // // File: osla, omsla, odlp // Authors: Tiago Conceição //------------------------------------------------ LittleEndian(); struct FILE { char Marker[8] ; ushort Version ; char CreatedDateTime[20] ; char CreatedBy[50] ; char ModifiedDateTime[20] ; char ModifiedBy[50] ; } file; struct HEADER { uint TableSize ; uint ResolutionX ; uint ResolutionY ; float MachineZ ; float DisplayWidth ; float DisplayHeight ; enum { None, Horizontally, Vertically, Both } DisplayMirror ; char PreviewDataType[16] ; char LayerDataType[16] ; uint PreviewTableSize ; uint PreviewCount ; float LayerHeight ; ushort BottomLayersCount ; uint LayerCount ; uint LayerTableSize ; uint LayerDefinitionsAddress ; uint GCodeAddress ; uint PrintTime ; float MaterialMilliliters ; float MaterialCost ; char MaterialName[50] ; char MachineName[50] ; } header; local int headerSize = sizeof(header); if(header.TableSize > headerSize) { FSkip(header.TableSize - headerSize); } struct CUSTOM { uint TableSize ; if(TableSize > 0){ ubyte Data[TableSize] ; } } custom; struct PREVIEW { ushort ResolutionX ; ushort ResolutionY ; uint ImageLength ; ubyte ImageData[ImageLength] ; }; struct LAYER_DEF { uint DataAddress ; float PositionZ ; float LiftHeight ; float LiftSpeed ; float LiftHeight2 ; float LiftSpeed2 ; float WaitTimeAfterLift ; float RetractSpeed ; float RetractHeight2 ; float RetractSpeed2 ; float WaitTimeBeforeCure ; float ExposureTime ; float WaitTimeAfterCure ; ubyte LightPWM ; uint BoundingRectangleX ; uint BoundingRectangleY ; uint BoundingRectangleWidth ; uint BoundingRectangleHeight ; }; struct LAYER_DATA{ uint ImageLength ; ubyte ImageData[ImageLength] ; }; struct GCODE{ uint GCodeSize ; char GCodeText[GCodeSize] ; }; local int i; if(header.PreviewCount > 0) { struct PREVIEWS { for( i = 0; i < header.PreviewCount; i++) { PREVIEW preview; } } previews; } if(header.LayerDefinitionsAddress > 0) { FSeek(header.LayerDefinitionsAddress); struct LAYERS_DEF { for( i = 0; i < header.LayerCount; i++) { LAYER_DEF layerDef ; } } layers_def; struct LAYERS_DATA { for( i = 0; i < header.LayerCount; i++) { FSeek(layers_def[0].layerDef[i].DataAddress); LAYER_DATA layerData ; } } layers_data; } if(header.GCodeAddress > 0) { FSeek(header.GCodeAddress); GCODE gcode; }