GSD

From Inkscape Wiki
Revision as of 19:42, 7 November 2009 by Mythgarr (talk | contribs) (→‎Chunks)
Jump to navigation Jump to search


The GSD binary file format

The file must begin with . This is a header to verify that it is the correct file type.

Header

0x00-0x0f "GRAPHTEC PRT&CUT"
0x10-0x17 0x06 00 00 00 01 00 00 00 00
0x18-0x7f This entire block is padded with zeros. There may be some other information stored, but in every sample file examined the data is simply 0.

Body

The body consists of a number of blocks of data. Every block starts with a length chunk indicating how many chunks are contained within that block. For more complex data such as the actual lines, polylines, and pen information chunks may contain entire blocks in a hierarchy.

Chunks

The first two bytes of the chunk provide information on the purpos. The following 2 bytes indicate the type of data and the number of data elements of that type.

While the data typically follows this pattern, in some cases (most notably distance measurements) the "datatype" may indicate a different length than is actually used.

Header Description
00 1 byte of data stored in length byte
01 1-byte little endian 8-bit integer. Typically used for boolean values.
02 2-byte little endian 16-bit integer
03 4-byte little endian 32-bit integer
04 8-byte little endian double precision float. Usually for storing a distance in mm units
05 ASCII data chunks

Based on several files generated using version 5.10 of the QuicKutz ROBO Master software, the following information has been deduced. In some cases the data observed in a given chunk is provided where the purpose is unknown.

Drawing Object Types:
Value Type
0 line
1 polyline
4 elliptical arc
5 nurb spline
6 text
7 rectangle
9 rounded rectangle
Chunk Types
Prefix Suffix Description DataType Data Length
- 01 - - 00 - 01 - 0A - 0B - 0C - 14 - 15 - 16 - 40 - 41 - 42 - 43 - 44 - - 21 - - 02 Number of Line Styles? 03 - 05 Dashed Line Pattern Cut Segment Length 04 - 06 Dashed Line Pattern Spacing Length 04 - - 01 Name of cutter? 05 - 02 Name of cutter? 05 - 04 Text description of paper type 05 - 05 Paper size in 0.01mm units (Width, Height) 03 - 08 Cutting Rotation Angle 02 - 09 Offset Enabled 01 - 0A Offset X 03 - 0B Offset Y 03 - 0C Weed Border Enabled 01 - 0D Weed Border Distance 03 - 0E Feed Media Enabled 01 - 0F Feed Media Source (00-Start, 01-End) 02 - 10 Feed Length 03 - 11 Tiling Enabled 01 - 14 Tiling Overlap 03 - 1A Scaling 02 - 1C Tiling Media Width 03 - 1D Tiling Media Height 03 - 21 Print Rotation Angle 02 - 22 Print Cut Lines Enabled 01 - 23 ID for print paper size? 02 - 24 Paper Width in 0.1mm units 03 - 25 Paper Height in 0.1mm units 03 - 26 Paper Orientation (01=Portrait, 02=Landscape) 02 - - 00 - - 00 - - 00 - 01 Show Registration Marks Enabled 01 - 02 Registration Mode(00=2, 01=3, 02=4) 02 - 03 Registration Pattern(01=Normal, 00=Inward) 02 - 0A - 0B - 0C - 0D - 0E - 0F - 10 - - 00 - 01 Show Grid 01 - 02 Grid Type (00=Line, 01=Dot) 02 - 03 Grid Spacing 04 - 04 Grid Snap Enabled 01 - - 00 -