Integrate KwickFit with your applications. With the KwickFit API you can pass part size information and KwickFit will return panel layout results. Contact support@micromeg.com for more information.
The KwickFit API offers three categories of operations.
Order of Operations
The typical sequence of operations on the API are:
The KwickFit API uses basic authentication. The user name is the email address of one of the users on your KwickFit account. The password is the password for that user. To execute API operations you'll need the API feature enabled on your account. Contact support@micromeg.com for more information.
Errors are grouped into three categories.
Retrieving Panel Sets
Returns a list of panel sets from your KwickFit account. You'll pass the Id of a panel set up with your layout calculation request. KwickFit will use the panels in the panel set for the layout calculation.
GET https://www.KwickFitOnline.com/api/kwickfit/panelize/panelsets
Response Parameter | Description |
PanelSets | The collection of Panel Sets from your KwickFit account. |
Id | Id of the Panel Set. Send this with your layout request. |
Name | Name of the Panel Set. |
Description | Description of the Panel Set. |
Errors | Not used. |
Panel Set Response JSON
{ "PanelSets":[ { "Id":5300, "Name":"My Panel Set Name", "Description":"My Panel Set description" } ], "Errors":null }
Sending a Basic and Round Layout Request
The response for the Basic layout and Round layout follow the same structure. The response information is shown following the request parameters for the Basic layout and Round layout.
Basic Layout Request
The Basic layout calculates how many individual parts will fit on a panel.
POST https://www.KwickFitOnline.com/api/kwickfit/panelize/basiclayout
Request Parameter | Description |
AllowRotations | Allow part rotations on the panel. |
PanelSetId | Id of the Panel Set to use for the layout calculation. |
PartSize | The Part Size. |
PartSize.X | X Part Size. |
PartSize.Y | Y Part Size. |
Panels | Not used at this time. |
Basic Layout Request JSON
{ "AllowRotations":true, "PanelSetId":5300, "PartSize":{ "X":1.0, "Y":4.0 }, "Panels":[] }
Round Layout Request
The round layout calculates how many round parts will fit on the panel.
POST https://www.KwickFitOnline.com/api/kwickfit/panelize/roundlayout
Request Parameter | Description |
PanelSetId | Id of the Panel Set to use for the layout calculation. |
PartDiameter | The Part Diameter. |
Panels | Not used at this time. |
Round Layout Request JSON
{ "PanelSetId":76, "PartDiameter":2.0, "Panels":null }
Basic Layout and Round Layout Response
The response for Basic layout and Round layout follow the same structure.
Response Parameter | Description |
LayoutType | The type of layout request. |
Errors | A collection of error messages, for example, part is too large for panel size. |
PanelResults | A collection of PanelResults. One for each Panel Size defined in the chosen Panel Set, unless an error occurred on the panel. Panel Results have a collection of PanelLayouts which are the layout options for the Panel. |
PanelName | Name of the panel in the Panel Set. |
PanelSize | Panel Size. |
PanelSize.X | X Panel Size. |
PanelSize.Y | Y Panel Size. |
Border | The Borders for the Panel. |
Border.Left | The Left Border for the Panel. |
Border.Right | The Right Border for the Panel. |
Border.Top | The Top Border for the Panel. |
Border.Bottom | The Bottom Border for the Panel. |
PanelLayouts | A collection of Panel Layouts for the panel size. A Panel Layout describes a result of a layout calculation. |
Border1 | The distance from the edge of the panel to the edge of the part. Since rotated parts may have a different origin, two Border objects are provided, Border1 and Border2. |
Border1.Left | The distance from the left edge of the panel to the edge of the part. |
Border1.Right | The distance from the right edge of the panel to the edge of the part. |
Border1.Top | The distance from the top edge of the panel to the edge of the part. |
Border1.Bottom | The distance from the bottom edge of the panel to the edge of the part. |
Border2 | The distance from the edge of the panel to the edge of the part for a LayoutResult. Since rotated parts may have a different origin, two Border objects are provided, Border1 and Border2. |
Border2.Left | The distance from the left edge of the panel to the edge of the part. |
Border2.Right | The distance from the right edge of the panel to the edge of the part. |
Border2.Top | The distance from the top edge of the panel to the edge of the part. |
Border2.Bottom | The distance from the bottom edge of the panel to the edge of the part. |
PartQuantity | The number of parts on the panel. |
SubPartQuantity | Not used for Basic and Round Layouts. |
PartToPanelUtilization | The utilization of the part to the panel expressed as an area percentage. |
SubPartToPanelUtilization | Not used for Basic and Round Layouts. |
PartLayouts | Each Panel Layout has a collection of PartLayouts. A PartLayout describes a matrix of parts on the panel. |
PartType | Describes the type of Part. For Basic and Round Layouts the value will always be "Part". |
PartSize | The size of the part in the PartLayout. |
PartSize.X | X Part Size. |
PartSize.Y | Y Part Size. |
PartSpace | The spacing between the parts in the PartLayout. |
PartSpace.X | X Part Space. |
PartSpace.Y | Y Part Space. |
Origin | The Origin of the parts in the PartLayout. |
Origin.X | X Origin. |
Origin.Y | Y Origin. |
Matrix | The Matrix of the parts in the PartLayout. |
Matrix.X | X Matrix. |
Matrix.Y | Y Matrix. |
Border | Not used for Basic and Round Layouts. |
SubPart | Not used for Basic and Round Layouts. |
Basic and Round Layout Response JSON
{ "LayoutType":"Round", "Errors":[ ], "PanelResults":[ { "PanelName":"Primary Panel", "PanelSize":{ "X":18.0, "Y":24.0 }, "Border":{ "Left":0.75, "Right":0.75, "Top":0.75, "Bottom":0.75 }, "PanelLayouts":[ { "Border1":{ "Left":1.175, "Right":2.225, "Top":0.997407, "Bottom":0.997407 }, "Border2":{ "Left":2.225, "Right":1.175, "Top":0.997407, "Bottom":0.997407 }, "PartQuantity":84, "SubPartQuantity":0, "PartToPanelUtilization":61.09, "SubPartToPanelUtilization":0.0, "PartLayouts":[ { "PartType":"RoundPart", "PartSize":{ "X":2.0, "Y":2.0 }, "PartSpace":{ "X":0.1, "Y":1.637307 }, "Origin":{ "X":1.175, "Y":0.997407 }, "Matrix":{ "X":7, "Y":6 }, "Border":null, "SubPart":null }, { "PartType":"RoundPart", "PartSize":{ "X":2.0, "Y":2.0 }, "PartSpace":{ "X":0.1, "Y":1.637307 }, "Origin":{ "X":2.225, "Y":2.81606 }, "Matrix":{ "X":7, "Y":6 }, "Border":null, "SubPart":null } ] } ] } ] }
Sending an Array Layout Request
KwickFit provides several methods for calculating array layouts. The response for each array layout follows the same structure and is shown following the request parameters for the array layouts.
Auto Matrix Array Layout Request
The Auto Matrix Array Layout calculates the array matrix that yields the most parts per panel when specifying the minimum and maximum number of parts on the array.
POST https://www.KwickFitOnline.com/api/kwickfit/panelize/automatrixarraylayout
Request Parameter | Description |
PanelSetId | Id of the Panel Set to use for the layout calculation. |
PartSize | Part Size. |
PartSize.X | X Part Size. |
PartSize.Y | Y Part Size. |
Panels | Not used at this time. |
AllowRotations | Allow part rotations on the panel. |
IncludeSuboptimalArrays | KwickFit filters out impractical arrays, but if you want a complete result of all possible options, set this to true. |
PartSpaceOnArray | The spacing between the parts on the array. |
PartSpaceOnArray.X | X Part Space on the array. |
PartSpaceOnArray.Y | Y Part Space on the array. |
MaximumArraySize | The maximum allowable size of the array. |
MaximumArraySize.X | The maximum X Array Size. |
MaximumArraySize.Y | The maximum X Array Size. |
MinimumArrayDimension | The minimum allowable dimension of the array. |
MinimumPartsOnArray | The minimum numbers of parts on the array. The number of parts on the array must be greater than or equal to this value. |
MaximumPartsOnArray | The maximum numbers of parts on the array. The number of parts on the array must be less than or equal to this value. |
ArrayBorder | The Array Borders are the distance from the edge of the array to the edge of the part. |
ArrayBorder.Left | The left border for the array. |
ArrayBorder.Right | The right border for the array. |
ArrayBorder.Top | The top border for the array. |
ArrayBorder.Bottom | The bottom border for the array. |
Auto Matrix Array Layout Request JSON
{ "PanelSetId":5300, "PartSize":{ "X":1.0, "Y":4.0 }, "Panels":null, "AllowRotations":true, "IncludeSuboptimalArrays":false, "PartSpaceOnArray":{ "X":0.062, "Y":0.062 }, "MaximumArraySize":{ "X":5.0, "Y":8.0 }, "MinimumArrayDimension":1.0, "MinimumPartsOnArray":1, "MaximumPartsOnArray":10, "ArrayBorder":{ "Left":0.562, "Right":0.562, "Top":0.562, "Bottom":0.562 } }
Semi-Fixed Size Array Layout Request
The Semi-Fixed Size Array Layout Request calculates the array matrix that yields the most parts per panel when one dimension of the array is a fixed and the other can vary.
POST https://www.KwickFitOnline.com/api/kwickfit/panelize/semifixedsizearraylayout
Request Parameter | Description |
PanelSetId | Id of the Panel Set to use for the layout calculation. |
PartSize | Part Size. |
PartSize.X | X Part Size. |
PartSize.Y | Y Part Size. |
Panels | Not used at this time. |
AllowRotations | Allow part rotations on the panel. |
IncludeSuboptimalArrays | KwickFit filters out impractical arrays, but if you want a complete result of all possible options, set this to true. |
PartSpaceOnArray | The spacing between the parts on the array. |
PartSpaceOnArray.X | X Part Space on the array. |
PartSpaceOnArray.Y | Y Part Space on the array. |
VariableMinimumArrayDimension | The minimum allowable dimension for the variable array dimension. |
VariableMaximumArrayDimension | The maximum allowable dimension for the variable array dimension. |
FixedArrayDimension | The fixed dimension of the array. One dimension of the array will be exactly this value. |
ArrayBorder | The Array Borders are the distance from the edge of the array to the edge of the part. |
ArrayBorder.Left | The left border for the array. |
ArrayBorder.Right | The right border for the array. |
ArrayBorder.Top | The top border for the array. |
ArrayBorder.Bottom | The bottom border for the array. |
Semi-Fixed Size Array Layout Request JSON
{ "PanelSetId":76, "PartSize":{ "X":2.0, "Y":3.0 }, "Panels":[ ], "AllowRotations":false, "IncludeSuboptimalArrays":false, "PartSpaceOnArray":{ "X":0.1, "Y":0.1 }, "VariableMinimumArrayDimension":1.0, "VariableMaximumArrayDimension":10.0, "FixedArrayDimension":5.0, "ArrayBorder":{ "Left":0.562, "Right":0.562, "Top":0.562, "Bottom":0.562 } }
Fixed Size Array Layout Request
The Fixed Size Array Layout calculate how many parts will fit within a specific array size and how many arrays will fit on the panel.
POST https://www.KwickFitOnline.com/api/kwickfit/panelize/fixedsizearraylayout
Request Parameter | Description |
PanelSetId | Id of the Panel Set to use for the layout calculation. |
PartSize | Part Size. |
PartSize.X | X Part Size. |
PartSize.Y | Y Part Size. |
Panels | Not used at this time. |
AllowRotations | Allow part rotations on the panel. |
PartSpaceOnArray | The spacing between the parts on the array. |
PartSpaceOnArray.X | X Part Space on the array. |
PartSpaceOnArray.Y | Y Part Space on the array. |
ArraySize | The Size of the array. |
ArraySize.X | X Array Size. |
ArraySize.Y | Y Array Size. |
ArrayBorder | The Array Borders are the distance from the edge of the array to the edge of the part. |
ArrayBorder.Left | The left border for the array. |
ArrayBorder.Right | The right border for the array. |
ArrayBorder.Top | The top border for the array. |
ArrayBorder.Bottom | The bottom border for the array. |
Fixed Size Array Layout Request JSON
{ "PanelSetId":76, "PartSize":{ "X":2.0, "Y":3.0 }, "Panels":null, "AllowRotations":false, "PartSpaceOnArray":{ "X":0.1, "Y":0.1 }, "ArraySize":{ "X":5.0, "Y":8.0 }, "ArrayBorder":{ "Left":0.562, "Right":0.562, "Top":0.562, "Bottom":0.562 } }
Fixed Matrix Array Layout Request
The Fixed Matrix Array Layout calculates the array size and how many arrays will fit on the panel with a specific array matrix.
POST https://www.KwickFitOnline.com/api/kwickfit/panelize/fixedmatrixarraylayout
Request Parameter | Description |
PanelSetId | Id of the Panel Set to use for the layout calculation. |
PartSize | Part Size. |
PartSize.X | X Part Size. |
PartSize.Y | Y Part Size. |
Panels | Not used at this time. |
AllowRotations | Allow part rotations on the panel. |
PartSpaceOnArray | The spacing between the parts on the array. |
PartSpaceOnArray.X | X Part Space on the array. |
PartSpaceOnArray.Y | Y Part Space on the array. |
PartMatrixOnArrayX | Part matrix on the array in the X axis. |
PartMatrixOnArrayY | Part matrix on the array in the Y axis. |
ArrayBorder | The Array Borders are the distance from the edge of the array to the edge of the part. |
ArrayBorder.Left | The left border for the array. |
ArrayBorder.Right | The right border for the array. |
ArrayBorder.Top | The top border for the array. |
ArrayBorder.Bottom | The bottom border for the array. |
Fixed Size Array Layout Request JSON
{ "PanelSetId":76, "PartSize":{ "X":2.0, "Y":3.0 }, "Panels":null, "AllowRotations":false, "PartSpaceOnArray":{ "X":0.1, "Y":0.1 }, "PartMatrixOnArrayX":2, "PartMatrixOnArrayY":3, "ArrayBorder":{ "Left":0.562, "Right":0.562, "Top":0.562, "Bottom":0.562 } }
Array Layout Response
The response for all array layouts follows the same structure
Response Parameter | Description |
LayoutType | The type of layout request. |
Errors | A collection of error messages. For example, the part is too large for panel size. |
PanelResults | A collection of PanelResults. One for each Panel Size defined in the Panel Set, unless an error occurred on the panel. Panel Results have a collection of PanelLayouts which are the layout options for the Panel. |
PanelName | Name of the panel. |
PanelSize | Panel Size. |
PanelSize.X | X Panel Size. |
PanelSize.Y | Y Panel Size. |
Border | The Borders for the Panel. |
Border.Left | The Left Border for the Panel. |
Border.Right | The Right Border for the Panel. |
Border.Top | The Top Border for the Panel. |
Border.Bottom | The Bottom Border for the Panel. |
PanelLayouts | A collection of Panel Layouts for the panel size. A Panel Layout describes a result of a layout calculation. |
Border1 | The distance from the edge of the panel to the edge of the part for a LayoutResult. Since rotated parts may have a different origin, two Border objects are provided, Border1 and Border2. |
Border1.Left | The distance from the left edge of the panel to the edge of the part. |
Border1.Right | The distance from the right edge of the panel to the edge of the part. |
Border1.Top | The distance from the top edge of the panel to the edge of the part. |
Border1.Bottom | The distance from the bottom edge of the panel to the edge of the part. |
Border2 | The distance from the edge of the panel to the edge of the part for a LayoutResult. Since rotated parts may have a different origin, two Border objects are provided, Border1 and Border2. |
Border2.Left | The distance from the left edge of the panel to the edge of the part. |
Border2.Right | The distance from the right edge of the panel to the edge of the part. |
Border2.Top | The distance from the top edge of the panel to the edge of the part. |
Border2.Bottom | The distance from the bottom edge of the panel to the edge of the part. |
PartQuantity | The number of arrays on the panel. |
SubPartQuantity | The number of parts on the panel. |
PartToPanelUtilization | The utilization of the arrays on the panel expressed as an area percentage. |
SubPartToPanelUtilization | The utilization of the parts on the panel expressed as an area percentage. |
PartLayouts | Each Panel Layout has a collection of PartLayouts. A PartLayout describes a matrix of arrays on the panel. |
PartType | Describes the type of Part. For Array Layouts the value will always be "Array". |
PartSize | The size of the part in the PartLayout. |
PartSize.X | X Part Size. |
PartSize.Y | Y Part Size. |
PartSpace | The spacing between the part (arrays) in the PartLayout. |
PartSpace.X | X Part Space. |
PartSpace.Y | Y Part Space. |
Origin | The Origin of the parts (arrays) in the PartLayout. |
Origin.X | X Origin. |
Origin.Y | Y Origin. |
Matrix | The Matrix of the parts (arrays) in the PartLayout. |
Matrix.X | X Matrix. |
Matrix.Y | Y Matrix. |
Border | The distance from the edge of the Array to the edge of the part on the array. |
Border.Left | The distance from the left edge of the array to the edge of the part. |
Border.Right | The distance from the right edge of the array to the edge of the part. |
Border.Top | The distance from the top edge of the array to the edge of the part. |
Border.Bottom | The distance from the bottom edge of the array to the edge of the part. |
SubPart | The Part on the Array. |
PartType | Describes the type of SubPart. For Array Layouts the value will always be "Part". |
PartSize | Part Size. The Size of the part on the array. |
PartSize.X | X Part Size. |
PartSize.Y | Y Part Size. |
PartSpace | The spacing between the parts on the array. |
PartSpace.X | X Part Space. |
PartSpace.Y | Y Part Space. |
Origin | The origin of the parts on the Array. |
Origin.X | X Origin. |
Origin.Y | Y Origin. |
Matrix | The matrix of the parts on the Array. |
Matrix.X | X Matrix. |
Matrix.Y | Y Matrix. |
Array Layout Response JSON
{ "LayoutType":"The type of array layout requested, AutoMatrix, FixedMatrix, FixedSize, SemiFixedSize", "Errors":[ ], "PanelResults":[ { "PanelName":null, "PanelSize":{ "X":18, "Y":24 }, "Border":{ "Left":0.75, "Right":0.75, "Top":0.75, "Bottom":0.75 }, "PanelLayouts":[ { "Border1":{ "Left":1.214, "Right":1.214, "Top":1.18, "Bottom":1.18 }, "Border2":{ "Left":1.214, "Right":1.214, "Top":1.18, "Bottom":1.18 }, "PartQuantity":15, "SubPartQuantity":45, "PartToPanelUtilization":75.58, "SubPartToPanelUtilization":41.67, "PartLayouts":[ { "PartType":"Array", "PartSize":{ "X":5.124, "Y":4.248 }, "PartSpace":{ "X":0.1, "Y":0.1 }, "Origin":{ "X":1.214, "Y":1.18 }, "Matrix":{ "X":3, "Y":5 }, "Border":{ "Left":0.562, "Right":0.562, "Top":0.562, "Bottom":0.562 }, "SubPart":{ "PartType":"Part", "PartSize":{ "X":4, "Y":1 }, "PartSpace":{ "X":0.062, "Y":0.062 }, "Origin":{ "X":0.562, "Y":0.562 }, "Matrix":{ "X":1, "Y":3 }, "Border":null, "SubPart":null } } ] } ] } ] }
Panel, Array and Dimensioned Array Image Request
Returns an image of a Panel layout, Array layout or Dimensioned Array. The image request is assembled from parts of a Layout Response. The components of the Layout Response that are sent with an Image Request are the "Panel Size" and "Borders" of a PanelLayout and the "PartLayouts" collection from the PanelLayout that you want to draw. Pull these elements from the Layout Response and send them with the Image request.
POST https://www.KwickFitOnline.com/api/kwickfit/panelize/image
Request Parameter | Description |
ImageSize | The size of the image in pixels. Valid range is 100 to 1000. |
ImageType | The type of image to be rendered. Valid values are "Panel", "Array", and "DimensionedArray". For compatibility a null ImageType will render a panel drawing. |
PanelSize | Panel Size. |
PanelSize.X | X Panel Size. |
PanelSize.Y | Y Panel Size. |
Border | The Borders from a PanelResult in a Layout Response. |
Border.Left | The left border. |
Border.Right | The right border. |
Border.Top | The top border. |
Border.Bottom | The bottom border. |
PartLayouts | The collection of PartLayouts from a PanelLayout in the Layout Response. |
PartType | Describes the type of Part. For Basic Layout the value will always be "Part". |
PartSize | The size of the part in the PartLayout. |
PartSize.X | X Part Size. |
PartSize.Y | Y Part Size. |
PartSpace | The spacing between the parts in the PartLayout. |
PartSpace.X | X Part Space. |
PartSpace.Y | Y Part Space. |
Origin | The Origin of the parts in the PartLayout. |
Origin.X | X Origin. |
Origin.Y | Y Origin. |
Matrix | The matrix of the parts in the PartLayout. |
Matrix.X | X Matrix. |
Matrix.Y | Y Matrix. |
Panel Image Request JSON
{ "ImageSize":400, "ImageType":"Panel", "PanelSize":{ "X":18.0, "Y":24.0 }, "Border":{ "Left":0.75, "Right":0.75, "Top":0.75, "Bottom":0.75 }, "PartLayouts":[ { "PartType":"Part", "PartSize":{ "X":1.0, "Y":4.0 }, "PartSpace":{ "X":0.1, "Y":0.1 }, "Origin":{ "X":0.8, "Y":0.8 }, "Matrix":{ "X":15, "Y":2 }, "Border":null, "SubPart":null }, { "PartType":"Part", "PartSize":{ "X":4.0, "Y":1.0 }, "PartSpace":{ "X":0.1, "Y":0.1 }, "Origin":{ "X":0.85, "Y":9.0 }, "Matrix":{ "X":4, "Y":13 }, "Border":null, "SubPart":null } ] }
Array Image Request JSON
{ "ImageSize":400, "ImageType":"Array", "PanelSize":{ "X":18.0, "Y":24.0 }, "Border":{ "Left":0.75, "Right":0.75, "Top":0.75, "Bottom":0.75 }, "PartLayouts":[ { "PartType":"Array", "PartSize":{ "X":5.124, "Y":4.248 }, "PartSpace":{ "X":0.1, "Y":0.1 }, "Origin":{ "X":1.214, "Y":1.18 }, "Matrix":{ "X":3, "Y":5 }, "Border":{ "Left":0.562, "Right":0.562, "Top":0.562, "Bottom":0.562 }, "SubPart":{ "PartType":"Part", "PartSize":{ "X":4.0, "Y":1.0 }, "PartSpace":{ "X":0.062, "Y":0.062 }, "Origin":{ "X":0.562, "Y":0.562 }, "Matrix":{ "X":1, "Y":3 }, "Border":null, "SubPart":null } } ] }