.recx file format


About .recx format
The recx format is compressed xml format by zip and changed the extension into ".recx".
Make the next picture an example.

 

  • The data structure is a street of the next chart.
    Data entry is effective only in <PartsBoardList> and <SourceBoardList>.
    There is a thing varying in expression.  Because it cannot change it later.
    It is the expression that a word of parentheses uses in a current sentence.

 ─RectPacker
    ├─Memo(Notes)
    │  └─Line
    ├─Option
    ├─PanelSawList (Layout pictures list)
    │  └─PanelSaw (Layout picture)
    │      └─BoardNode (Panel)
    ├─PartsBoardList (Parts list)
    ├─PartsColorList (Color classification of Parts list)
    ├─SourceBoardList (Stocks list)
    ├─StockBoardList (First usage Stocks)
    ├─SourceBoardData (Calculated Stocks list)
    └─PartsBoardData (Calculated Parts list)

  • About Parts and Stocks number
    The number is sorted in descending order at  size and begin with 0.
    Size gives priority to one having a long horizontal direction over the same case.
    The same case too gives priority to the one that can turn over it.
    In the case of equivalence, it is unified all as the same material.
     
     
  • About data structure of Layout pictures
    It becomes two pieces when I cut one time of board. And becomes two pieces too when I cut one piece of board which I cut again. In other words, the data structure becomes the  hierarchy structure of 2 divergence.
    Because it is XML, it define the board and express a layout.
     
     
  • About size and the coordinate of the board
    Numerical value is an integer. 
    When the value of the [Tools]-[Options]-[Number of digits after a decimal point] is 1, the number divided by 10 is the actual value.

 


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

  <!--
 ------------------------------------------------------------------

Options

  MaxCutLength = Cut Table Length
  Rotate = 
    All Can Turn=0; 
    All Cannot Turn=1; 
    Individual Setting=2
  SmallSourcePriorityPoint = Small stocks usage rate
  Decimals = Number of digits after a decimal point
  SearchLevel = Speed and Yield 1 to 5
 MinimumSearchTime = Minimum Search Time(Second)
  PartsColorListType = Color classification of Parts
    Without=0
    Order of similar shape=1
    Order of big area=2
    Order of small area=3

  Problem 
Problem 1D or 2D
  -->
  <Option Rotate="0" PartsAlignment="0" SmallSourcePriorityPoint="2" Decimals="0" SearchLevel="3" HighRatio="1" PartsColorListType="1" KerfSize="3" MaxCutLength="" Problem="2D"//>

  <!--
  ------------------------------------------------------------------

Stocks list

  The invalid value is ignored for run time.
  In the case of 1D, "Height" disappears.
  Comment = Description  
  Width = Horizontal size  
  Height = Vertical size  
  Count = Quantity 
  Cost = Cost -->
  <SourceBoardList>
    <Board Comment="" Width="1800" Height="900" Count="" Cost=""/>
  </SourceBoardList>

  <!--
  ------------------------------------------------------------------

First usage Stocks list

  Comment = Description  
  Width = Horizontal size  
  Height = Vertical size  
  Count = Quantity 
  Cost = A unit cost -->
  <StockBoardList>
    <Board Comment="" Width="1800" Height="900" Count="" Cost=""/>
  </StockBoardList>

  <!--
 ------------------------------------------------------------------

Parts list

   Comment = Description  
  Width = Horizontal size  
  Height = Vertical size  
  Count = Quantity 
 CanRotate = 
Individual Setting Only. Can Turn=1. Cannot Turn=0. -->
  <PartsBoardList>
    <Board Comment="" Width="400" Height="300" Count="1" CanRotate="1"/>
    <Board Comment="" Width="500" Height="200" Count="2" CanRotate=""/>
  </PartsBoardList>

  <!-- 
 ------------------------------------------------------------------

Calculated Stocks list

  Unified overlap data and deleted the invalid value and showed the number of sheets that I used.
  Index= Stock Panel ID
  Comment = 
Description    
  Width = Horizontal size  
  Height = Vertical size  

  Count =
Quantity Unlimited = -1
  Cost =  
A unit cost
  UsedNumber = 
Used Number 
  Priority = First usage is 1
-->
  <SourceBoardData>
    <Board Index="0" Width="1800" Height="900" Count="-1" Cost="0" UsedNumber="1" Comment="" Priority="0" />
  </SourceBoardData>

  <!-- 
 ------------------------------------------------------------------

Calculated Parts list

  Unified overlap data and deleted the invalid value and showed the number of sheets that I used.
  Index= Part Panel ID
  Comment = 
Description    
  Width = Horizontal size  
  Height = Vertical size  

  Count=
 Quantity
  
CanRotate =
 Individual Setting Only. Can Turn=1. Cannot Turn=0. 
  Cost = A unit cost of Parts
  CanNotBeArrangedNumber = Number of Uncut Parts
 -->
  <PartsBoardData>
    <Board Index="0" Width="400" Height="300" Count="1" CanRotate="true" Cost="0" CanNotBeArrangedNumber="0" Comment=""/>
    <Board Index="1" Width="500" Height="200" Count="2" CanRotate="true" Cost="0" CanNotBeArrangedNumber="0" Comment=""/>
  </PartsBoardData>

  <!--
 ------------------------------------------------------------------

Notes

 -->

  <Memo>
    <Line>xmlサンプル行1</Line>
    <Line>xmlサンプル行2</Line>
  </Memo>

  <!--
 ------------------------------------------------------------------

Color classification of Parts list

  (Refer to "delphi VCL Color", "Vcl.Graphics.TBrushStyle" -->
  <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="clWindow" FontColor="clBlack" PenColor="clBlack" Style="bsClear"/>
    <PartsColor Back="$0080FFFF" BrushColor="clWindow" FontColor="clBlack" PenColor="clBlack" Style="bsClear"/>
    <PartsColor Back="$0080FF80" BrushColor="clWindow" FontColor="clBlack" PenColor="clBlack" Style="bsClear"/>
    <PartsColor Back="$00FFFF80" BrushColor="clWindow" FontColor="clBlack" PenColor="clBlack" Style="bsClear"/>
    <PartsColor Back="$00FF8000" BrushColor="clWindow" FontColor="clWhite" PenColor="clBlack" Style="bsClear"/>
    <PartsColor Back="$00C080FF" BrushColor="clWindow" FontColor="clBlack" PenColor="clBlack" Style="bsClear"/>
    <PartsColor Back="$00404080" BrushColor="clWindow" FontColor="clWhite" PenColor="clBlack" Style="bsClear"/>
    <PartsColor Back="$004080FF" BrushColor="clWindow" FontColor="clBlack" PenColor="clBlack" Style="bsClear"/>
    <PartsColor Back="clTeal" BrushColor="clWindow" FontColor="clWhite" PenColor="clBlack" Style="bsClear"/>
    <PartsColor Back="$00804000" BrushColor="clWindow" FontColor="clWhite" PenColor="clBlack" Style="bsClear"/>
    <PartsColor Back="$00FF8080" BrushColor="clWindow" FontColor="clBlack" PenColor="clBlack" Style="bsClear"/>
  </PartsColorList>

  <!--
 ------------------------------------------------------------------

Layout pictures list

 ExecutionTime=Millimeters second unit-->

  <PanelSawList ExecutionTime="15">

  <!--
 ------------------------------------------------------------------
  <PanelSaw>
A Layout picture 
    Count = The number of sheets of the same cutting pattern 
    SourceIndex = 
Stocks Panel ID
    PartitionID = When it is divided, a number is acquired from 1. No divide is 0.
    PartitionIndex = Number to be given from 0 in same PartitionID

    PartitionCount = The
quantity that was divided in same PartitionID
 -->
    <PanelSaw Count="1" SourceIndex="0" PartitionID="0" PartitionIndex="0" PartitionCount="0">

  
  <!--
   <BoardNode>
      A layout is expressed by a tree structure.

      Category=Kind of the Panel
      This panel which is cut horizontally   = cgHCut (A child node exists)
      
This panel which is cut vertical = cgVCut (A child node exists) 
      Turned Part = cgPartsLength
      No turn Part = cgPartsSide
      Remnants = cgSpace
      SizeX = Horizontal size  
      SizeY = Vertical size

      OriginY, OriginX = The coordinate which made the upper left on a figure the starting point.
      PartsIndex = Part ID -->
      <BoardNode Category="cgVcut" SizeX="1800" SizeY="900" OriginY="0" OriginX="0">
        <BoardNode Category="cgHCut" SizeX="403" SizeY="900" OriginY="0" OriginX="0">
          <BoardNode Category="cgVcut" SizeX="403" SizeY="500" OriginY="0" OriginX="0">
            <BoardNode Category="cgPartsLength" SizeX="200" SizeY="500" OriginY="0" OriginX="0" PartsIndex="1"/>
            <BoardNode Category="cgVcut" SizeX="200" SizeY="500" OriginY="0" OriginX="203">
              <BoardNode Category="cgPartsLength" SizeX="200" SizeY="500" OriginY="0" OriginX="203" PartsIndex="1"/>
            </BoardNode>
          </BoardNode>
          <BoardNode Category="cgHCut" SizeX="403" SizeY="397" OriginY="503" OriginX="0">
            <BoardNode Category="cgVcut" SizeX="403" SizeY="300" OriginY="503" OriginX="0">
              <BoardNode Category="cgPartsSide" SizeX="400" SizeY="300" OriginY="503" OriginX="0" PartsIndex="0"/>
            </BoardNode>
            <BoardNode Category="cgSpace" SizeX="403" SizeY="94" OriginY="806" OriginX="0"/>
          </BoardNode>
        </BoardNode>
        <BoardNode Category="cgSpace" SizeX="1394" SizeY="900" OriginY="0" OriginX="406"/>
      </BoardNode>
    </PanelSaw>
  </PanelSawList>
</RectPacker>


In the case of 1D


The unnecessary part is omitted from explanation of 2

D mentioned above.
<PanelSaw Count="1" SourceIndex="0">
<LineData Count="1">0</LineData> <!-- Ex. 0 = Part ID Count = The Part of Quantity -->
<LineData Count="1">1</LineData>
<LineData Count="1">2</LineData>
</PanelSaw>