Adding seam allowance

When adding seam allowance to a pattern, there are 3 things that come into play:

  • Does the user want seam allowance?
  • How much seam allowance does the user want?
  • How can we add seam allowance?

Let’s whip up a quick example for a moment to clarify how we will handle this:

As you can see from the source, we can destructure an sa variable (short for seam allowance) that will hold either:

  • false if the user does not want seam allowance
  • A value in mm indicating how much seam allowance the user wants

To add seam allowance to our path, we just offset it by sa and add some classes to it to style it. But, crucially, only if the user wants seam allowance:

mjs
if (sa) paths.sa = paths.shape
  .offset(sa)
  .addClass('fabric sa')

To refer back to our three question: Whether the user wants seam allowance, and if so how much seam allowance is answered by the sa value passed to our draft method.

And we add it with the path.offset() method which will offset the path.

Our bib pattern does not require seam allowance as it will be finished with bias tape. But we can use this same technique to indicate that.

Before we do so though, we should talk about complete.