Difference between revisions of "GSD"

From Inkscape Wiki
Jump to navigation Jump to search
Line 36: Line 36:


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.
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.
{| border="1" cellspacing="0" cellpadding="5" align="center"
{|
|+Sample Block Data
|+Drawing Object Types:
!Prefix !!Type !!Length !!Data
!Value !!Type
|-
|-
|0x0006 ||00 || ||06 - NOT the number of 0x??06 elements (only 1 present)
|0 ||line
|-
|-
|0x0106 ||00 || ||00
|1 ||polyline
|-
|-
|0x0007 ||00 || ||06 - Number of 0x??07 elements?
|4 ||elliptical arc
|-
|-
|0x0107 ||01 ||01 ||02
|5 ||nurb spline
|-
|-
|0x0207 ||03 ||01 ||Unknown 32-bit value
|6 ||text
|-
|-
|0x0307 ||03 ||01 ||Unknown 32-bit value
|7 ||rectangle
|-
|-
|0x0407 ||05 ||00 ||Unknown text field
|9 ||rounded rectangle
|}
{|
|+Chunk Types
!Prefix !!Suffix !!Description !!DataType !!Data Length
|-
|-
|0x0507 ||04 ||01 ||Dashed Line Pattern Cut Segment Length
|03 |-
|-
| ||01 ||Number of Drawing Objects |-
|0x0607 ||04 ||01 ||Dashed Line Pattern Spacing Length
|04 |-
|-
| ||00 ||Drawing Object |-
|0x0206 ||00 || ||00
| ||01 ||Drawing Object Type |-
|-
| ||0A ||2D Point |-
|0x000A ||00 || ||1D - Number of 0x??08 elements
| ||0B ||Polyline Length |-
|-
| ||0C ||Polyline Point |-
|0x0108 ||05 ||13 ||"Graphtec Craft ROBO" - Optional
| ||14 ||Sweep (radians) |-
|-
| ||15 ||Ecentricity? |-
|0x0208 ||05 ||13 ||"Graphtec Craft ROBO" - Optional
| ||16 ||(0=Open/1=Closed) |-
|-
| ||40 ||Bbox (Upper Left) |-
|0x0408 ||05 ||06 ||"Letter" - Text Paper Size
| ||41 ||Bbox (Upper Right) |-
|-
| ||42 ||Bbox (Lower Right) |-
|0x0508 ||03 ||02 ||56 54 00 00  24 6D 00 00 - Paper size in 1/2540" (ie:0.01mm) units (Little Endian). This seems to have been chosen to allow precise storing of both fractional imperial and metric units. 4-byte width, 4-byte height
| ||43 ||Bbox (Lower Left) |-
|-
| ||44 ||Rotation |-
|0x1B08 ||01 ||01 ||00
|05 |-
|-
| ||21 ||Group |-
|0x2708 ||01 ||01 ||00
|07 |-
|-
| ||02 ||Number of Line Styles? ||03 ||01 |-
|0x1A08 ||02 ||01 ||64 00 - Scaling
| ||05 ||Dashed Line Pattern Cut Segment Length ||04 ||01  |-
|-
| ||06 ||Dashed Line Pattern Spacing Length ||04 ||01 |-
|0x0908 ||01 ||01 ||00 - Offset Toggle
|08 |-
|-
| ||01 ||Name of cutter? ||05 ||var |-
|0x0A08 ||03 ||01 ||00 00 00 00 - Offset X
| ||02 ||Name of cutter? ||05 ||var |-
|-
| ||04 ||Text description of paper type ||05 ||var |-
|0x0B08 ||03 ||01 ||00 00 00 00 - Offset Y
| ||05 ||Paper size in 0.01mm units (Width, Height) ||03 ||02 |-
|-
| ||08 ||Cutting Rotation Angle ||02 ||01 |-
|0x0C08 ||01 ||01 ||00 - Weed Border Toggle
| ||09 ||Offset Enabled ||01 ||01 |-
|-
| ||0A ||Offset X ||03 ||01 |-
|0x0D08 ||03 ||01 ||00 00 00 00 - Weed Border Distance
| ||0B ||Offset Y ||03 ||01 |-
|-
| ||0C ||Weed Border Enabled ||01 ||01 |-
|0x2208 ||01 ||01 ||00 - Print Cut Lines
| ||0D ||Weed Border Distance ||03 ||01 |-
|-
| ||0E ||Feed Media Enabled ||01 ||01 |-
|0x2008 ||01 ||01 ||00
| ||0F ||Feed Media Source (00-Start, 01-End) ||02 ||01 |-
|-
| ||10 ||Feed Length ||03 ||01 |-
|0x2108 ||02 ||01 ||00 00 - Print Rotation Angle (typically 0 or 180)
| ||11 ||Tiling Enabled ||01 ||01 |-
|-
| ||14 ||Tiling Overlap ||03 ||01 |-
|0x2308 ||02 ||01 ||01 00 - ID for print paper size?
| ||1A ||Scaling ||02 ||01 |-
|-
| ||1C ||Tiling Media Width ||03 ||01 |-
|0x2408 ||03 ||01 ||6F 08 00 00 - Paper Width (1/254" or 0.1mm units)
| ||1D ||Tiling Media Height ||03 ||01 |-
|-
| ||21 ||Print Rotation Angle ||02 ||01 |-
|0x2508 ||03 ||01 ||EA 0A 00 00 - Paper Height (1/254" or 0.1mm units)
| ||22 ||Print Cut Lines Enabled ||01 ||01 |-
|-
| ||23 ||ID for print paper size? ||02 ||01 |-
|0x2608 ||02 ||01 ||01 00 - Portrait(01) or Landscape(02)
| ||24 ||Paper Width in 0.1mm units ||03 ||01 |-
|-
| ||25 ||Paper Height in 0.1mm units ||03 ||01 |-
|0x0808 ||02 ||01 ||00 00 - Cutting Rotation Angle (typically a multiple of 90)
| ||26 ||Paper Orientation (01=Portrait, 02=Landscape) ||02 ||01 |-
|-
| ||
|0x0E08 ||01 ||01 ||00 - Feed Media
|0A |-
|-
| ||00 ||Page Style? |-
|0x0F08 ||01 ||01 ||01 - From the (00 - Start, 01 - End) Point
|0B |-
|-
| ||00 ||Line Style? |-
|0x1008 ||03 ||01 ||00 00 00 00 - Feed Length
|0E |-
|-
| ||00 ||Registration Mark Settings |-
|0x1E08 ||01 ||01 ||01
| ||01 ||Show Registration Marks Enabled ||01 ||01 |-
|-
| ||02 ||Registration Mode(00=2, 01=3, 02=4) ||02 ||01 |-
|0x1F08 ||01 ||01 ||01
| ||03 ||Registration Pattern(01=Normal, 00=Inward) ||02 ||01 |-
|-
| ||0A ||Registration Size |-
|0x1108 ||01 ||01 ||00 - Toggle Tiling
| ||0B ||Registration Thickness |-
|-
| ||0C ||Origin X |-
|0x1C08 ||03 ||01 ||00 00 00 00 - Tiling Media Width
| ||0D ||Origin Y |-
|-
| ||0E ||Distance (1-2) |-
|0x1D08 ||03 ||01 ||00 00 00 00 - Tiling Media Height
| ||0F ||Distance (2-3) |-
|-
| ||10 ||Exceeds Maximum Recommended Length of 31.5" |-
|0x1408 ||03 ||01 ||00 00 00 00 - Tiling Overlap
|0F |-
|-
| ||00 ||Grid Settings |-
|0x0306 ||00 || ||00
| ||01 ||Show Grid ||01 ||01 |-
|-
| ||02 ||Grid Type (00=Line, 01=Dot) ||02 ||01 |-
|0x0009 ||00 || ||09
| ||03 ||Grid Spacing ||04 ||01 |-
|-
| ||04 ||Grid Snap Enabled ||01 ||01 |-
|0x0109 ||01 ||01 ||00
|10 |-
|-
| ||00 ||End of File |-
|0x0209 ||01 ||01 ||05
|-
|0x0309 ||01 ||01 ||05
|-
|0x0409 ||01 ||01 ||00
|-
|0x0406 ||00 || ||00
|-
|0x000A ||00 || ||0A
|-
|0x010A ||03 ||01 ||00 00 00 00
|-
|0x020A ||00 || ||00
|-
|0x000C ||00 || ||01
|-
|0x010C ||03 ||01 ||00 00 00 00
|-
|0x0506 ||00 || ||00
|-
|0x000E ||00 || ||0A
|-
|0x010E ||01 ||01 ||01 - Show Registration Marks
|-
|0x020E ||02 ||01 ||01 00 - Registration Mark Mode (00 - 2, 01 - 3, 02 - 4)
|-
|0x030E ||02 ||01 ||01 00 - Registration Mark Pattern (01 - Normal, 00 - Pointing In)
|-
|0x0A0E ||04 ||01 ||CD CC CC CC CC 0C 33 40 - Registration Mark Size
|-
|0x0B0E ||02 ||01 ||A8 C6 4B 37 89 41 E0 3F - Registration Mark Thickness
|-
|0x0C0E ||03 ||01 ||66 66 66 66 66 66 29 40 - Origin X
|-
|0x0D0E ||03 ||01 ||52 B8 1E 85 EB 51 24 40 - Origin Y
|-
|0x0E0E ||03 ||01 ||01 00 00 00 00 D0 67 40 - Distance 1-2
|-
|0x0F0E ||03 ||01 ||48 E1 7A 14 AE 87 6E 40 - Distance 1-3
|-
|0x110E ||01 ||01 ||00 - Exceeds Maximum Recommended Length of 31.5 inch (document)
|-
|0x0606 ||00 || ||00
|-
|0x000F ||00 || ||04
|-
|0x010F ||01 ||01 ||00 - Show Grid
|-
|0x020F ||02 ||01 ||00 00 - Grid Type (00 - Line, 01 - Dot)
|-
|0x030F ||04 ||01 ||66 66 66 66 66 66 29 40 - Grid Spacing
|-
|0x040F ||01 ||01 ||01 - Snap To Grid
|-
|0x0010 ||03 ||01 ||00 00 00 00 - End of file?
|}
|}

Revision as of 19:42, 7 November 2009


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 -