.recx file format

A .recx file is Cutting Planner\'s proprietary file format, which is a .xml worksheet file that has been zipped and given a .recx extension. One .xml file is equivalent to one worksheet, so you do not need to be aware of the fact that it is a .zip file. You do not need to be aware of the fact that the file is a zip file, nor do you need to install separate compression and decompression software.
Generally, only the creator of a binary file understands the specifications of the binary format. Therefore, it may be difficult to reuse the data due to changes in the times. This software is a minor proprietary standard, and I think that leaving a large amount of data in this format will inevitably leave some concerns.
Therefore, we have changed to xml format. xml is flexible enough to accommodate future specification changes and extensions. By publishing the specifications, third parties can develop software to use the output tree plans in other applications. The advantages are as follows.
If you put extra files in the .recx, it may not work properly.
Multiple .xmls can be combined into a zip to support multiple sheets. The tab order is the order of the file list inside the zip. This allows you to create a multiple-sheet .recx file even on the command line by using the zip file creation tool.

 

As an example, here is an xml of the following data.

Data structure

If you are only entering data,
 and  alone will work.

 

─RectPacker
 ├─Memo [Description]
 │ └─Line [Line-by-line text]
 ├─Option [Option]
 ├─PanelSawList [1D or 2D layout pictures]
 │ └─PanelSaw [layout picture]
 │   └─LineData [1D] or BoardNode [2D]
 ├─ProcessNumberPriorityPanelSawList or RemnantsLengthPriorityPanelSawList [1D only]
 │ └─PanelSaw
 │   └─LineData [1D only]
 ├─PartsBoardList
 ├─PartsColorList
 ├─SourceBoardList [Stocks list]
 ├─StockBoardList [First usage stocks list]
 ├─SourceBoardData [Aggregated data from stocks panel]
 ├─PartsBoardData [Aggregated data from parts panel]
 └─PrintSetUp

 

About parts panel and stocks panel numbers

 

Parts panels and stocks panels are sorted by area, and numbered starting from 0 in the order of size. If the area is the same, the longer side is numbered first, and if the area is the same, the rotatable side is numbered first.

 

About the Data Structure of 2D Diagrams

 

Cutting a board once results in two pieces. Cutting one of them will result in two pieces. In other words, the data structure is a two-branch tree structure.
The data structure can be expressed as it is by simply defining a "board" in xml. If you draw only the parts panels and unused space at the end of the tree structure, it will be as shown in the application.
If you have to read inconsistent values, Cutting Planner may not work properly. Only use the output values.

 

Regarding numerical values such as board size and coordinates for aggregated data

Due to the specification of the internal algorithm, the values must be integers. Therefore, they are converted to a number with the smallest unit being 1 and recorded. The value will be an integer with [Options]-[cutting optimization calculation]-[precision] as the unit of 1. For example, if the length format is a decimal point and the precision (minimum unit) is 0.1, 12.3 is 123. For fractional inches with a minimum unit of 1/8 inch, 12 inches would be 96 multiplied by 8.

Example of 2D code

The difference from 1D is explained in the comments section.

 

<?xml version="1.0" encoding="UTF-8"?>

<RectPacker FileTypeVersion="2.7" ExeFileVersion="13.0">
  <FormatSettings DecimalSeparator="." ThousandSeparator=","/>
  <Option Material="Sheet1_#1" Thickness="" SameSizePartsMerge="false" TabColor="" Problem="2D" LengthFormat="ftDecimal" Precision="1" Decimals="0" Rotate="0" SmallSourcePriorityPoint="5" PartsColorListType="1" KerfSize="3" MaxCutLength="" ConvergenceJudgmentTime="15" TopTrimSize="0" BottomTrimSize="0" LeftTrimSize="0" RightTrimSize="0" RotationalProcessesPriority="0" PriorityContinuousPartsLayout="0" DescriptionCount="1"/
<!--

<FormatSettings DecimalSeparator="." ThousandSeparator=","/>

Decimal and Thousand Separator, which are the settings for the region of the PC where this file was saved. If the file is opened on a PC with different settings, it will be converted.

 

Options
Material="Sheet1"

Sheet name: Material

 

Thickness=""

Sheet name: Thickness

 

SameSizePartsMerge="true"

Integrate parts panels of the same size

 

TabColor="" 

 

Problem="2D" 

 

LengthFormat="ftDecimal"

ftDecimal
ftFeetDecimalInches
ftFactionalInches
ftFeetFractionalInches

 

Precision="1" 

Accuracy / Minimum Unit
LengthFormat = "ftDecimal"
1, 0.1, 0.01
LengthFormat = "ftFeetDecimalInches"
0.1, 0.01, 0.001
"ftFactionalInches" or "ftFeetFractionalInches"
1/8", 1/16", 1/32", 1/64", 1/128"

 

Decimals="0"
Number of decimal places: for compatibility with previous versions, Precision is preferred

 

Rotate="0" 

All parts panels can rotate=0 All parts panels cannot rotate=1 Individual setting=2

 

SmallSourcePriorityPoint="5" 

Small stocks usage rate.

 

SearchLevel="4" 

HighRatio="1" 
Compatible with previous version 0 with SearchLevel=1 , 1 with SearchLevel>1
Integrated functionality into ConvergenceJudgmentTime= in Ver13.

 

PartsColorListType="1" 

Parts panel coloring

 

None=0
Similar shape=1
Large size=2
Smaller size=3

 

KerfSize="3" 

Saw cloth width

 

MaxCutLength="" 

Maximum length the machine can cut :2D only

 

MinimumSearchTime="2" 

Integrated functionality into ConvergenceJudgmentTime= in Ver13.

 

ConvergenceJudgmentTime="15" 

Same as "Search Level" in the link.

 

TopTrimSize="0" 
BottomTrimSize="0" 
LeftTrimSize="0" 
RightTrimSize="0"

 

RotationalProcessesPriority="1"

2D only

 

PlacementPriority1D="lrProcesses"

1D only
"lrProcesses": Priority is given to the number of processes
"lrRemnants": Remnants length priority

-->
  <SourceBoardList>
    <Board Comment="" Width="1000" Height="700" Count="" Cost=""/>
    <Board Comment="" Width="" Height="" Count="" Cost=""/>
  </SourceBoardList>
<!--

Stock panel list

In the case of 1D, the Height portion will be eliminated. Invalid values are ignored when performing cutting optimization calculations.
Comment
Width
Height
Count
Cost

-->
  <StockBoardList>
    <Board Comment="" Width="" Height="" Count="" Cost=""/>
 </StockBoardList>
<!--

First usage stock panel list

In the case of 1D, the Height portion will be eliminated. Invalid values are ignored when performing cutting optimization calculations.
Comment
Width
Height
Count
Cost

-->
  <PartsBoardList>
    <Board Comment="#Parts1" Width="400" Height="300" Count="1"/>
    <Board Comment="#Parts2" Width="500" Height="200" Count="2"/>
    <Board Comment="" Width="" Height="" Count=""/>
  </PartsBoardList>
<!--

 

Parts panel list

In the case of 1D, the Height portion will be eliminated. Invalid values are ignored when performing cutting optimization calculations.
Comment
Width
Height
Count
CanRotate=Rotation available = 
1, Rotation not available = 0
Ignored when not set individually.

-->
  <SourceBoardData>
    <Board Index="0" Count="-1" Cost="0" UsedNumber="1" Priority="0" Comment="" Width="1000" Height="700"/>
  </SourceBoardData>
  <PartsBoardData>
    <Board Index="0" Width="400" Count="1" Cost="0" Comment="#Parts1" Height="300" CanRotate="true" CanNotBeArrangedNumber="0"/>
    <Board Index="1" Width="500" Count="2" Cost="0" Comment="#Parts2" Height="200" CanRotate="true" CanNotBeArrangedNumber="0"/>
<!--

 

Aggregated data from stock panel

Remove duplicates and invalid values and sort by area or number
Index
Comment
Width
Height
Count=-1 is unlimited
Cost
UsedNumber
Priority=First usage stocks is 1

-->
  </PartsBoardData>
<!--

 

Aggregated data from parts panel

Remove duplicates and invalid values and sort by area or number
Index
Comment
Width
Height
Count
CanRotate=1, Rotation not available = 0 Ignored when not set individually.
Cost
CanNotBeArrangedNumber=Number of parts panels that could not be placed

-->
  <Memo>
    <Line>#SumpleLine1</Line>
    <Line>#SumpleLine2</Line>
  </Memo>
<!--

 

Description.

Row-by-row recording

-->
  <PartsColorList>
    <PartsColor Back="clWindow" BrushColor="clAppWorkSpace" FontColor="clGrayText" PenColor="clGrayText" Style="bsDiagCross"/>
    <PartsColor Back="clWindow" BrushColor="clWindow" FontColor="clWindowText" PenColor="clWindowText" Style="bsClear"/>
    <PartsColor Back="clGradientInactiveCaption" BrushColor="clWindow" FontColor="clWindowText" PenColor="clWindowText" Style="bsClear"/>
    <PartsColor Back="$008080FF" BrushColor="clWhite" FontColor="clBlack" PenColor="clBlack" Style="bsClear"/>
    <PartsColor Back="$0080FFFF" BrushColor="clWhite" FontColor="clBlack" PenColor="clBlack" Style="bsClear"/>
    <PartsColor Back="$0080FF80" BrushColor="clWhite" FontColor="clBlack" PenColor="clBlack" Style="bsClear"/>
    <PartsColor Back="$00FFFF80" BrushColor="clWhite" FontColor="clBlack" PenColor="clBlack" Style="bsClear"/>
    <PartsColor Back="$00FF8000" BrushColor="clWhite" FontColor="clWhite" PenColor="clBlack" Style="bsClear"/>
    <PartsColor Back="$00C080FF" BrushColor="clWhite" FontColor="clBlack" PenColor="clBlack" Style="bsClear"/>
    <PartsColor Back="$00404080" BrushColor="clWhite" FontColor="clWhite" PenColor="clBlack" Style="bsClear"/>
    <PartsColor Back="$004080FF" BrushColor="clWhite" FontColor="clBlack" PenColor="clBlack" Style="bsClear"/>
    <PartsColor Back="clTeal" BrushColor="clWhite" FontColor="clWhite" PenColor="clBlack" Style="bsClear"/>
    <PartsColor Back="$00804000" BrushColor="clWhite" FontColor="clWhite" PenColor="clBlack" Style="bsClear"/>
    <PartsColor Back="$00FF8080" BrushColor="clWhite" FontColor="clBlack" PenColor="clBlack" Style="bsClear"/>
  </PartsColorList>
<!--

 

Parts panel color setting list

Back=Background color BrushColor=Pattern color FontColor=Font color PenColor=Border color Style=Pattern
(For values, search "delphi VCL colors" or "Vcl.Graphics.TBrushStyle")

-->
  <PanelSawList ExecutionTime="0" RotationsNumber="2">
<!--

 

<PanelSawList>layout-picture list

ExecutionTime=Execution time in milliseconds
RotationsNumber="2"= Total number of rotational processes: 2D only

1D

The placement data set by the "PlacementPriority1D" option is placed in
.

 

If "Priority for number of processes" (lrProcesses) and "Priority for length of remnants" (lrRemnants) give different calculation results, the other calculation result is described in the following tag.
<ProcessNumberPriorityPanelSawList>
<RemnantsLengthPriorityPanelSawList>

-->
    <PanelSaw Count="1" SourceIndex="0" PartitionID="0" PartitionIndex="0" PartitionCount="0" LayoutNumber="0" RotationsNumber="2">
<!--

 

<PanelSaw>Listing for one layout picture
1D

 Count=Number of copies of the same figure
SourceIndex=

 

2D

Count=Number of copies of the same figure
SourceIndex=
PartitionID=If PanelSaw is a split, the source of the split is numbered from "1". "0" is not split.
PartitionIndex=Number assigned from "0" within the same "PartitionID
PartitionCount=Indicates the number of copies divided within the same "PartitionID".
LayoutNumber="0"=Unique drawing number in 
.
RotationsNumber="2" =Number of rotational processes in this figure.

-->
      <BoardNode Category="cgHCut" SizeX="1000" SizeY="700" OriginY="0" OriginX="0" RotationsNumber="1">
        <BoardNode Category="cgVcut" SizeX="1000" SizeY="403" OriginY="0" OriginX="0" RotationsNumber="2">
          <BoardNode Category="cgHCut" SizeX="500" SizeY="403" OriginY="0" OriginX="0" RotationsNumber="0">
            <BoardNode Category="cgPartsSide" SizeX="500" SizeY="200" OriginY="0" OriginX="0" PartsIndex="1"/>
            <BoardNode Category="cgPartsSide" SizeX="500" SizeY="200" OriginY="203" OriginX="0" PartsIndex="1"/>
          </BoardNode>
          <BoardNode Category="cgVcut" SizeX="497" SizeY="403" OriginY="0" OriginX="503" RotationsNumber="0">
            <BoardNode Category="cgHCut" SizeX="300" SizeY="403" OriginY="0" OriginX="503" RotationsNumber="0">
              <BoardNode Category="cgPartsLength" SizeX="300" SizeY="400" OriginY="0" OriginX="503" PartsIndex="0"/>
            </BoardNode>
            <BoardNode Category="cgSpace" SizeX="194" SizeY="403" OriginY="0" OriginX="806"/>
          </BoardNode>
        </BoardNode>
        <BoardNode Category="cgSpace" SizeX="1000" SizeY="294" OriginY="406" OriginX="0"/>
      </BoardNode>
<!--

1D <LineData>

ex.
<PanelSaw Count="1" SourceIndex="0">
<LineData Count="1">0</LineData>
<LineData Count="1">1</LineData>
<LineData Count="1">2</LineData>
</PanelSaw>
In the example, 0, 1, and 2 are the parts panel numbers. Count="1" is the number of parts in the
 for that part.

 

2D <BoardNode>

Cutting a board once results in two pieces. Cutting one of the boards will result in two more boards.

 

In other words, the data structure is a two-branch tree structure. The bottom of the hierarchy is the parts panel or remnants data.
If you draw the data as it is, it will be as shown in the application.
The
 tag in the PartsIndex provides information such as size, comments, and so on.
Category
cgHCut: This board is cut horizontally and child nodes exist.
cgVCut: This board is cut vertically and child nodes exist.
cgPartsLength: It is a rotated parts panel
cgPartsSide: It is a non-rotating parts panel
cgSpace: It is an unused board :remnants
SizeX: Horizontal size
SizeY: Vertical size
OriginY=, OriginX= Y-coordinate and X-coordinate of the upper left corner when the upper left corner of the figure is (0,0)
PartsIndex=

-->
    </PanelSaw>
  </PanelSawList>
  <PrintSetUp Unit="mm" FixedRatio="true" PrintPartsList="true" PrintMemo="false" ViewCost="true" UnitCost="true" OneDNotation="2">
    <Columns Number="2" Between="13"/>
    <Margin Top="20" Bottom="20" Left="10" Right="10"/>
    <Header Left="" Center="" Right=""/>
    <Footer Left="" Center="&amp;p/&amp;P" Right=""/>
  </PrintSetUp>
<!--

Page setup for printing

-->
</RectPacker>