Pay once, no subscription. Free updates.|Try PowerScripts free|Install / update
PowerScripts Help

Site Tools


nesting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
nesting [2026/10/25 02:27] – Markup fix for the DokuWiki upgrade (spaces inside bold/italic) 0.0.0.0nesting [2026/10/25 02:53] (current) – Help pages updated for PowerScripts 3.8 (help pages session) remoteuser
Line 1: Line 1:
-==== Quick Overview ====+====== Nesting ======
  
-Nesting and Material Calculator PowerScript is a simple yet powerful rectangle packing tool to help you nest your artwork to use your stock efficiently or to calculate material usage for costing and planning purposes.+Fit more on every sheet or roll. Nesting packs your artwork tightly onto the media: real shapes such as stickers, lettering and CNC parts by their true outline, or rectangles for prints and panels. It also works out how much media a job needs, for quoting.
  
-It works by laying out rectangles in the most efficient packing order, using either the best fit or easy-cutting algorithm+[[https://o2creative.co.nz/shop/Nesting_Calculator_PowerScript_for_Adobe_Illustrator|See it in the shop]] · Version 1.0.2 · Needs PowerScripts 3.8.42 or later
  
-  *   Allow rotations on a print-by-print basis +{{:nesting:result_dino.png?500|Stickers nested by their die lines}}
-  *   Use the selected items as the print size or manually enter in the sizes of the items, such as when costing +
-  *   When using selected artwork increase the quantity to duplicate +
-  *   Calculate multiple solutions and determines the best solution for you; you can also manually view and select the best solution +
-  *   Choose pre-sorting and nesting algorithm options +
-  *   Choose a scoring method to determine the best fit to maximize leftover waste +
-  *   Preview the computed solutions +
-  *   Turn calculated solutions into template documents with sizes, can be printed out as a specification for cutting +
-  *   Layout selected artwork and add borders to your prints+
  
-**Typical Uses**+===== Where to find it =====
  
-  * Layout artwork for printing or vinyl cutting and minimize waste / optimize media usage +Open the PowerScripts panel (**Window > Extensions > PowerScripts**) and choose **Nesting** from the **Tools** scripts. The script has three tabs: **Quick Nesting**, **Advanced Nesting** and **Options**.
-  * Calculate media usage for costing and estimating quotes +
-  * Allow rotations on a print by print basis+
  
 +===== The methods =====
  
-<WRAP center round info 90%> +  * **Shape Nest**: fits shapes together by their real outline, turning them if you allow it, and can even put small shapes inside bigger ones. For stickers, lettering, vinyl, CNC and laser parts. 
-NOTE: Nesting Powerscript is a RECTANGLE packer; all artwork will be treaded as rectangular shapes +    * **Stickers and graphics**: each die line (cut path) is nested with the artwork under it, so the artwork moves with its cut line. 
-</WRAP>+    * **CNC and laser cut**: every shape is nested by its own outline, with no die lines. 
 +  * **Best Fit**: packs rectangles (the boxes round your artwork) as tightly as possible. For prints, signs and panels. 
 +  * **Easy Cut**: rectangles laid out so they can be cut with straight cuts from edge to edge, for example with a guillotine or a ruler and knife.
  
 +===== Quick start =====
  
-==== How Nesting Works ====+{{:nesting:quick_nesting_tab.png?380|The Quick Nesting tab}}
  
-All items are treated as rectangles, and the program calculates the most efficient packing order it can find, using either a best fit or an easy-cutting algorithm. +  - Select the artwork on the artboard. 
 +  - On **Quick Nesting**, choose the **Method**, set the gap **Between shapes**, and tick **Allow Rotations** if pieces can turn. 
 +  - Press **Nest selected items on Artboard**.
  
-To calculate the best packing, the computer needs to try different nesting scenarios; with more items to nest, the problem becomes exponentially more complex, and for a few hundred items, it would take a computer //years// to calculate all the possible solutions. So to make the problem solvable quickly, packing algorithms use a set number of pre-defined rules to follow and pack the items in different orders to generate the final result. It will take a blank sheet, then one by one position the items on the sheet based on the preset rules; for example, try packing the smallest items first, or the largest items first or the items with the shortest sides first etc. While this might not find the perfect solution, it will find a very useful solution quickly. +The pieces are moved into place on the artboard, and the panel says how many were nested and how much of the sheet is used. On a big job a **Stop** button shows.
  
-What Powerscript Nesting does is run through all the different combinations of packing strategies, and scores each one based on the total area used or the largest free area left after the run, And then selects the solution with the lowest score; you can see these in the Solutions Accordion in the advanced tab.+{{:nesting:quick_dino.png?400|Quick Nesting stickers}}
  
-For most jobs, the time spent on wages for a human to find a better solution would cost more than the media saved, However, even in the cases where it might be better to hand-nest items, this nesting tool will give you a good place to start.+===== Options =====
  
-=== Does PowerScript nest complex shapes? ===+==== Quick Nesting ====
  
-No, This tool treats all shapes as rectangles. There are other tools for laser cutting and CNC cutting that will nest cut paths efficiently. However, these algorithms are extremely complex and computationally expensive to compute. Ideally, requiring a dedicated program to be written to run fast enough. Under the hood, PowerScripts relies on Illustrator's built-in scripting language, which is not very fast for this type of task, so while possible, it would not be very fast as nesting artwork. +  * **Method**: **Shape Nest - stickers and graphics**, **Shape Nest - CNC and laser cut**, **Best Fit** or **Easy Cut**. 
 +  * **Between shapes**: the gap between pieces. 
 +  * **Resize Artboard** (Best Fit and Easy Cut): **Do Not Resize**, **Expand Width** or **Expand Height** so everything fits. 
 +  * **Allow Rotations**: let pieces turn for a better fit. 
 +  * **Nest selected items on Artboard**: does it.
  
-**However, unlike other nesting solutions, With PowerScripts nesting, you can nest full artwork, such as grouped artwork, linked files and set the number of copies.** +==== Advanced Nesting ====
  
-\\ +For full control, several sheets or a roll, quantities, and choosing between solutions. It works in three steps: **1 - Use Selected**, **2 - Calculate Nesting**, **3 - Apply**.
-\\ +
-==== Quick Nest ==== +
-For quickly nesting your artwork on the artboard:+
  
-{{:undefined:nesting_quick.png?400|}}+=== Method ===
  
-  * **Method:**  +  * **Shape Nest**, **Best Fit** or **Easy Cut** (see above).
-    * **Best fit** will try to back the rectangles as tightly as possible +
-    * **Easy Cut** will try to allow straight cuts from edge to edge, which is useful when cutting down a larger sheet with a ruler and knife. +
-  * **Gutter** This is the space between rectangles +
-  * **Resize Artboard:** You can choose to expand the width or height to accommodate the items, for example, if you are printing to a roll of paper 900mm wide, you can set your artboard to 880mm and then allow the height to expand to layout your jobs for printing. //(Make sure there is enough space for the artboard to expand or you will get an error)// +
-  * **Allow Rotation:** Artwork will be rotated to get the best fit.+
  
-\\ +=== Sheet size ===
-\\+
  
 +  * **Fit to**: a **Single Sheet**, **Multiple Sheets**, the **Artboards**, a **Vertical Roll** or a **Horizontal Roll**. **Use All Artboards** and **Use Active Artboard** take the size from your document.
 +  * **Sheet Width**, **Sheet Height**: the media size.
 +  * **Grain**: **None**, **Long** or **Short**, for board, card and wood where pieces must follow the grain.
 +  * For Shape Nest:
 +    * **Nest**: **Quantities from the list**, or **Fill**: as many of the first piece as will fit.
 +    * **Into**: the **Artboard**, **Selected shapes** (for example an offcut drawn as a shape: press **Use selection as shapes**), or a **Fixed size**.
 +    * **Fill from**: the corner and edge to start from, for example **Top edge, left first** (like printing down a roll, or a laser cutter's home position).
 +    * **Margins**: space to keep clear round the edge.
  
 +=== Spacing ===
  
-==== Advanced Nesting ==== +  * **Between shapes**, **From the edge**, and **Bleed**.
-  +
-It gives you more options and control: +
- +
  
-**Typical workflow for Nesting artwork** +=== Options ===
-  - Set the sheet size and type to match the media you are printing, typically single sheets of the same size of a roll +
-  - Click on [Use Seelected] to create a list of selected artwork +
-  - Change the number of items in the print list if required and set rotate and grain options. +
-  - Click on [Calaulate Solitions] +
-  - You can expand the Solutions accordion to select an optional solution +
-  - Click [Apply to Selection] to rearrange your artwork (see warning below about changing artwork during nesting)+
  
-**Typical workflow for Quoting** +For Best Fit and Easy Cut:
-  - Set the sheet size and type to match the media you are printing, typically single sheets of the same size of a roll +
-  - Enter in the number of items in the print list if required and set rotate and grain options. +
-  - Click on [Calaulate Solitions] +
-  - In Summary, you will see the total number of sheets used, and the area used, which can be used for quoting purposes. +
-  - To save the result, Click on [Create Template Document] to create a document with the sizes+
  
-{{::nesting_advanced.png?250|}}+  * **Sort shapes by**: the order pieces are tried in (**Auto** tries them all). 
 +  * **Guillotine Split**: how the space left after each piece is divided up (Easy Cut). 
 +  * **Scoring Method**: which solution wins: **Area Used** (least media) or **Largest Free Area** (the biggest usable offcut). 
 +  * **Score weighted to last sheet for multiple sheets**: prefer solutions that leave the most free space on the last sheet. 
 +  * **Annotate Copies**: label copies "1 of 4", "2 of 4" and so on.
  
-=== Stock Settings ===+For Shape Nest:
  
-  *  **Fit to:** Set how your items are nested on the stock/media +  * **Engine**: **Auto** (picks the best for each nest and says which and why), **Standard**, **Tight** (packs closer, for example lettering about a sixth shorter, and usually faster) or **Both** (runs the two at once and lists the best nests of either). 
-    *  **Single sheet:** Fit the prints to a single sheet; if all the items can not all fit on the sheet, you will get an error. +  * **Accuracy**: how closely outlines are followed: **Auto**, **High** (0.05 mm), **Middle** (0.2 mm) or **Low** (0.5 mm). 
-    *  **Multiple sheets:** If the prints fit on a single sheet, this will add extra sheets as required, <wrap em>(See note below)</wrap> +  * **Default angles**: how pieces may turn: **90°**, **Every 45°**, **180°** or **No turning**. 
-    *  **Artboards:** Use the size of the artboards in the document as the sheet sizes, which is helpful if you are trying to use mixed stock sizes. +  * **Search**: how long to look for a better layout. 
-    *   **Horizontal roll:** Expands the sheet width to the left as required <wrap em>(See note below)</wrap> +  * **Place small shapes inside larger ones**: use the middle of an O, the bowl of a G, or big enough holes in a part (slower, so off by default; drill holes and small counters are left alone). 
-    *   **Vertical roll:** Expands the sheet size in height as required. <wrap em>(See note below)</wrap> +  * **Keep artwork under each die line together**: the artwork moves with its die line. 
-  * **Border Padding:** This is the space around the edge of the sheets/rolls, to allow for handling or non-printable areas around the outside edge +  * **Group the artwork with its die line**: makes **Apply** much faster on big jobs. 
-  * **Gutter:** This is the space between rectangles, useful to allow enough space to trim safely +  * **Locked artwork stays (nest around it)**: locked artwork is left where it is, and pieces are nested round it. 
-  *  **Grain:** Set the grain direction on the sheet; you can choose then to Enforce grain direction as long or short grain for fluted boards, cardboard and wood where the prints must have the grain in a specific direction for structural stability.+  * **Move die lines to their own layer after Apply**, **Move nest paths to a non-printing layer after Apply**.
  
 +=== Paths and clipping masks ===
  
-<WRAP center round important 80%> +Tools to prepare stickers and graphics for Shape Nest:
-Note: New artboards will be created next to the active artboard, or the artboard will expand; if there is not enough space to the left of the current artboard or in the artboard will expand beyond the size of the document then you will get an error; either move the current artboard to the top left corner of the document OR as a workaround resize your artwork to 10% of the original size, don't forget also to change your gutters/borders size as well.</WRAP>+
  
 +  * **Nesting path from**: what outline to nest by: **Auto** (a nest path, then a die line, then the shape's outline), **Die line only**, **Die line + visible artwork**, **Shape outline** (each item or group as it is, for CNC and laser), **Visible size** (the box including strokes) or **Bounding box**.
 +  * **Expand shape**, **Smooth**, **Include strokes in the outline**, **Create Nest Path**: draw a nest path round artwork with no die line (for example a sticker with a white border).
 +  * **Die line spots**, **Die line offset**, **Create Die Line**: make die lines in your cut colour.
 +  * **Bleed**, **Create Clipping Mask**, **Clipping masks** (**Off**, **Auto** or **Always**): clip artwork that spills past its die line.
  
 +=== Shapes to nest ===
  
-=== Print Settings ===+{{:nesting:advanced_rectangles.png?320|Advanced Nesting with rectangles (Best Fit), shown in an older version of the panel}}
  
-{{::nesting_print.png?400|}}+  * **1 - Use Selected**: add the selected artwork to the list. Don't change the artwork between this step and **Apply**, or it won't match. 
 +  * The list: each piece with its **Quantity** (more than one duplicates the artwork), **Width**, **Height**, **Rotate** and **Grain**. For quoting you can type sizes without any artwork. 
 +  * **Clear**, **Rotate All**, **Rotate None**. 
 +  * **2 - Calculate Nesting**: work out the layouts. With Shape Nest, **Keep trying** searches more from the best so far, and **Best nest** searches for up to 5 minutes. 
 +  * **3 - Apply To Selection** (or **3 - Apply to artwork**): move your artwork into the layout shown. 
 +  * **Create Template Document**: a new document with labelled boxes for the layout, to keep with the job or quote.
  
-Here you can set the items to be nested; typically, you would either manually enter in the sizes or use the selected artwork.+=== Solutions, Preview and Summary ===
  
-  * **[Use Selected] Button:** This will use the artwork selected in the document and enter it into the list of prints. <wrap hi>When using selected artwork for nesting, you mustn't modify the artwork between adding it to the print list and laying out the nested result. If you do alter the artwork, you will not be able to apply the nesting, as you will get an artwork mismatch error</wrap>  +  * **Solutions**: the layouts found, to choose from. 
-  * **[Clear] button :** Clears the list +  * **Preview**: the chosen layout. **Generate Artwork Preview** shows pictures of your artwork in it. Show or hide the **Nest line**, **Die line** and **Pictures**. 
-  * **[Save] button:** This will save the current list, and it will be reloaded the next time you open nesting; useful if you are quoting and need to save your work. +  * **Summary**: the total printed area, used media area and media area, for quoting.
-  * **Print list** +
-    * **Name** - Enter a useful name here +
-    * **Quantity** - you can change the quantity for, __For selected artwork changing the quantity will duplicate you artwork__ +
-    * **Width/Height** - Set the size here - //See options to set the units used// +
-    * **Rotate** - When checked, the item can rotate 90 degrees to get the best fit. +
-    * **Grain** - Some items must be aligned to the grain of the stock, set the grain of the items based on the long/short edge, and it will be rotated to ensure the grain matches the stock +
-  * Packing Method +
-     * **Best fit** will try to back the rectangles as tightly as possible +
-     * **Easy Cut** will try to allow straight cuts from edge to edge, which is useful when cutting down a larger sheet with a ruler and knife. +
-   * Annotate Copies - Will add a "1 of 4" ... "2 of 4" annotation under copies of the artwork - //See options tab for annotation text size//+
  
 +==== Options ====
  
-   * **[Calculate Solutions] Button** - This will calculate all the possible solutions and show the results in the preview window below <wrap em>You must press this before you can apply a solution to the selected artwork or create a template</wrap> +  * **Units**: the units for sizes in the list. 
-   * **[Apply to Selection...] Button** - This will apply the selected solution to the artwork you previously selected +  * **Annotate Font Size**, **Label Font Size**: text sizes. 
-   * **[Create Template] Button** - This will create a blank document and fill it with labeled squares as per the selected solution, useful to document the calculated solution for future use.+  * **Rectangle**, **Rotated Rectangle**, **Failed to Place**: the colours used in previews and templates. 
 +  * **Add border around prints**, **Border Width**, **Border Offset**, **Border Color**. 
 +  * **Output Scale**: draw templates at a smaller scale.
  
-==== Advanced Settings ====+===== How to... =====
  
-{{::nesting_advanced_settings.png?400|}}+==== Nest a sheet of stickers ====
  
-  * **Sort Prints by:** - This determines the order in how prints are packed on a sheet; if you choose AUTO, all sorting combinations will be tested +  - Make sure each sticker has a die line (or use **Create Die Line** or **Create Nest Path**). 
-  * **Golloutine Split:** - For the Golloutine packer, the determines how, after an item is placed on a sheet, the left over free space is divided up for future prints to be placed. +  - Select them all. On **Quick Nesting**, choose **Shape Nest - stickers and graphics**, set **Between shapes**, tick **Allow Rotations**. 
-  * **Scoring Method:** +  - Press **Nest selected items on Artboard**.
-    * **Area Used** - The solution which uses the last number of sheets will score lower, weighted towards the solution that uses the smallest used area on the last sheet, which typically will result in the least media used +
-    * **Largest Free Area** - Like above but weighted to that, the last sheet with the largest unused single rectangular area is preferred, best if you want to have the largest usable offcut for other work +
-    * **Score weighted to last sheet for multiple sheets** - This gives more weight to the last sheet, typically when printing multiple sheets you want the last sheet to have the most free space after printing.+
  
-==== Solutions ====+==== Quote media for a job ====
  
-{{::nesting_solutions.png?400|}}+  - On **Advanced Nesting**, choose **Best Fit**, **Fit to: Vertical Roll** and the roll width. 
 +  - Type the sizes and quantities into the list (no artwork needed). 
 +  - Press **2 - Calculate Nesting** and read the **Summary**: the roll length and media used.
  
-This is a summary of packing solutions calculated with the lowest score at the top. **You can manually select the best solution for nesting here.**+{{:nesting:example.png?500|A nesting example}}
  
-==== Preview ====+===== Tips =====
  
-This shows you the layout which will be used.+  * Group each sticker's artwork with its die line first (or tick **Group the artwork with its die line**): **Apply** is many times faster on big sheets. 
 +  * Use **Tight** or **Both** for lettering and odd shapes; **Auto** chooses well for most jobs. 
 +  * For simple rows and columns of one design, [[impose|Step and Repeat]] is quicker.
  
-==== Summary  ====+===== Good to know =====
  
-This shows a breakdown of each sheet, and the Efficiency and total print area per sheet, with a total for the job. Useful for quoting.+  * Rolls: the artboard is sized to the length the nest needs. 
 +  * New artboards are made next to the active artboard. If there isn't room on the canvas, move the artboard to the top left of the canvas first.
  
 +===== What's new =====
  
 +  * **1.0.2**
 +    * Fixed: Best Fit and Easy Cut on a roll size the artboard to the roll's length, and keep the full gap between stroked shapes.
 +    * Fixed: Quick Nesting's Expand Width / Height grows the artboard, and Stop no longer leaves it stuck.
 +    * Improved: faster with hundreds of die lines and thousands of pieces, and general bug fixes and reliability.
 +    * Fixed: the Help button opens this script's help page.
 +  * **1.0.1**: Fixed: Shape Nest stopped with "Required value is missing" when it marked artwork that is not under a die line.
 +  * **1.0.0**
 +    * New: Shape Nest has a second engine, Tight, that packs shapes closer together (lettering about a sixth shorter in our tests) and usually finds a layout faster.
 +    * New: Engine in Options: Auto picks the best engine for each nest and says which and why, or choose Standard, Tight, or Both (runs the two at once and lists the best nests of either).
 +    * Improved: with Place small shapes inside larger ones, Tight also uses the holes big enough to take a shape (drill holes and small counters are left alone).
 +  * Older changes: [[releasenotes|PowerScripts Release Notes]]
  
nesting.txt · Last modified: by remoteuser