Choose language

Functions overview

Sewist Pattern Designer is based on various functions, that allow a pattern drafter to place points, connect them with lines, curves and arcs, rotate and move various objects, and basically repeat the flat pattern drafting process in an algorithm.

You may look up the syntax and a short description of Sewist functions by clicking the "code help" button just above the code window.

Most functions imply that a new object(s) or a new variable is created as a result. E.g.

p1=point(10,10) // draws point at 10 cm along X axis and 10 cm down the Y axis

Some of the functions also return true/false, if no new object was nominated.
For example this syntax will create new point P1 and four new objects, parts of the original curves:


And this syntax will let us know if these curves cross at all and allow us to take actions:

if (no(p1)) // i.e. the two curves don’t cross, do this:
else // if the two curves do cross, place a point there:

In the example above we checked if the two curves cross. In case they do, we place point P1 there. In case they don’t cross, we place P1 in the middle of the first curve.

Previous article

Size measurements

Next article