1
0
Fork 0
freesewing/sites/dev/docs/reference/api/stack
2024-09-29 07:14:59 +02:00
..
addpart fix(dev): One-liner admonitions 2024-09-29 07:14:59 +02:00
asrenderprops chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
attr fix(dev): One-liner admonitions 2024-09-29 07:14:59 +02:00
generatetransform fix(dev): One-liner admonitions 2024-09-29 07:14:59 +02:00
getanchor chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
getpartlist chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
getpartnames chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
home fix(dev): One-liner admonitions 2024-09-29 07:14:59 +02:00
readme.mdx chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00

---
title: Stack
---

A Stack object represents a collection of parts within a pattern.
Stacks are used when laying out the pattern.

:::note RELATED

See [Stacks](/guides/designs/stacks)
for information about how stacks are used in a pattern.

:::

## Signature

```js
Stack new Stack(String name)
```

The stack constructor takes a single argument, a String containing the name
of the stack.

## Properties

Stack objects come with the following properties:

- `attributes` : An [Attributes](/reference/api/attributes) instance holding the stack's attributes
- `parts` : A set of parts in the stack
- `name` : The name of the stack
- `topleft` : A [Point](/reference/api/point) that is the top left of the stack's bounding box
- `bottomRight` : A [Point](/reference/api/point) that is the bottom right of the stack's bounding box
- `width` : The width of the stack in mm
- `height` : The height of the stack in mm
- `anchor` : A [Point](/reference/api/point) that is used as the anchor to align parts in the stack


## Methods

A Stack object exposes the following methods:

<ReadMore />