When we refer to a set we mean a set of settings. In the vast majority of cases, there is only one set of settings. So we just refer to them as the settings. But FreeSewing supports instantiating a pattern with multiple sets of settings. We refer to this as multiset support.
Multiset support underpins features such as sampling and in general can be used to combine multiple drafted variants into a single pattern container.
Here’s a simple example:
When drafting for multiple sets of settings, it’s important to keep the different draft variants from cross-contaminating each other. To ensure this, the core library will:
- Set up each pattern part per set
- Provide a per-set store that is shared between parts in the set
This is illustrated below:
In the vast majority of cases, a pattern will only have one set of settings. As such, multiset support is not something you need to be intimately familiar with. But, it is good to know it exists and explains certain things that might seem odd if you were unaware of multiset support, such as the fact that there’s a pattern-wide store and a different store per set, the so-called setStore(s).
Below is an illustration of a pattern with a single set of settings which, once again, is the vast majority of use cases: