Settings

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:

p1=cross(curve1,curve2,curve11,curve12,curve21,curve22)

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:
   p1=split(curve1,curve1.l*0.5)
else // if the two curves do cross, place a point there:
   p1=cross(curve1,curve2,curve11,curve12,curve21,curve22)


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

point(x,y)