Skip to main content

hem

The hem macro drafts a hem allowance with fold lines.

Signature

Path macro('hem', {
Path|string path1,
Path|string path2,
number offset1 = null,
number offset2 = null,
number hemAllowance,
number lastHemAllowance = null,
number folds = 2,
number prefix = 'hemMacro',
number cssClass = 'fabric'
})

Example

fixme: Errors logged. Please implement log view

An example of the hem macro

Configuration

PropertyDefaultTypeDescription
path1Path or stringThe path before the hem (when the part is seen anticlockwise), for example the inseam on a pants pattern when construction a leg hole. You can reference a Path object directly or give a name of an existing path in the paths array.
path2Path or stringThe path after the hem, for example the outseam on a pants pattern when constructing a leg hole.
offset1(seam allowance)numberThe seam allowance of path1, defaults to used seam allowance (sa), if not given.
offset2(seam allowance)numberThe seam allowance of path2, defaults to used seam allowance (sa), if not given.
hemWidthnumberThe width of the hem in millimeters.
lastFoldWidth(seam allowance)numberThe width of the last fold, defaults to used seam allowance (sa), if not given.
folds2numberThe number of folds for the hem. 2 creates a normal double folded hem. 1 would create a single fold for hems that are overlocked or made from knit fabric. Values below 1 are invalid.
prefix'hemMacro'numberThe name prefix used for paths created by this macro.
cssClass'fabric'numberThe CSS class added to the fold lines and the hem outline. Should usually match the CSS class for the part outline

Detailed Description

This macro will create the following paths (assuming the default 'hemMacro' prefix is used):

  • hemMacroMirror1: The part of the offset path1 that is used to construct the starting edge of the hem line (by repeatedly mirroring it)
  • hemMacroMirror2: The part of the offset path2 that is used to construct the closing edge of the hem line (by repeatedly mirroring it)
  • hemMacroFold1, hemMacroFold2, ...: The dot-dashed lines that mark the fold lines (one less than the fold parameter)

The Paths hemMacroMirror1 and hemMacroMirror2 are hidden by default, but you could use them to e.g. mark where the folded part would end up.

The macro call will return the outline path of the hem, so you need to do something like

paths.hem = macro('hem', {
...
});

to get and use the actual hem path. You probably want to embed the hem path into the seam allowance path, the following example code shows how to do this using the sa macro.

note

The hem path already includes the seam allowance, so it doesn't need any additional offset.

fixme: Errors logged. Please implement log view

Embedding the hem macro in the seam allowance path

note

When copying the example code for your design, you can probably omit the sa, offset1 and offset2 parameters. They're only needed here as there is no default seam allowance in this preview window.