 My cart (0)
 
 My orders
 
 You have 0
 
Sewist Pattern Code Documentation
General
 Designer Account
 General guidelines
 Variables
 Axes of coordinates
 Angles
 Size measurements
 Mathematical Functions
 Frequently Used Formulas
Functions
 POINTS
 OBJECTS
 ACTIONS
 TRANSFORMATIONS
 MATHEMATICS
 STYLING
 PROGRAMMING
Sewist is a stateofart pattern design system, that allows the use of a vast set of anthropometric measurements to get unparalleled fit of garments. To create a pattern, designers describe the sequence of drafting steps using proprietary pattern programming language. The software then drafts (not grades!) patterns for each requested size individually, be it a standard size or a set of individual size measurements defined by height, bust, waist, and hips. Sewist lets you export patterns in multiple formats, estimate fabric, create pattern sketches in different colors and fabrics, create video masterclasses and sell madetomeasure patterns in your online store.
For information on visual tools in the editor window, please click the corresponding button. Each button helps to use a function intuitively with the visualization of the result right on your screen.
In your Designer User Account you will see links to the following sections:
Back to top
Pattern code is written in English letters using size constants, functions, variables and string expressions. You may use other encodings in string expressions, that are in quotation marks, e.g.:
Lines of code are separated by line break or semicolon (both options are allowed, which makes Sewist Pattern Designer easier to use if you are used to a particular programming language). E.g.
will work just as well as
By default, all numeric values are in cm for distances and in degrees for angles, depending on the function you are using. E.g. the code below creates a new point which is at 5 cm from the first point and is at 90 degrees from the first point:
Sewist pattern designer supports both oneline comments and multipleline comments. Commented code will not be executed by the software. Comments are useful if you decide to make notes about certain operations, or if you would like to test a new approach, but you should backup the current code while you are testing.
To code one line, or part of a line, please use // at the beginning of the code block you wish to comment. E.g.
You may also comment on several lines by using /* in the beginning and */ at the end of commented code. You may nest // comments inside, but don’t nest several multiple line comments into one another. E.g.:
Back to top
You can create your own variables and refer to them in the code. These can be numeric variables, names of objects, names of compounds of objects (path), names of pattern blocks.
Variables should start with a letter and have no spaces. You may use _ but not  as the dash is considered to be a math sign. Variables are not case sensitive, so p1 is the same as P1.
To create a new variable, simply write its name at the beginning of a line, followed by an equation sign, and then numeric value, mathematical equation or a function, e.g.:
In the example above, you can see that we have referred to the same variables using lower case, upper case and a combination of those.
Important! Names starting with "sz" are reserved for size measurement constants, which means that you cannot create your own variables with the names sz1, … sz122. Names starting with “ea” are reserved for ease allowances. Please see Size Guide and Anatomical and Anthropometric Landmarks for more information. Pi constant cannot be overrun either.
Back to top
Many functions of Sewist pattern language use angles. As most sewing patterns are drafted from top down and from left to right, the direction of axes has been set up correspondingly.
The Xaxis goes from left to the right and Yaxis is turned downwards. Zero point is in the upper left corner of the pattern window.
The image on the right demonstrates the principle.
Point P1 has the following coordinates: 20 by Xaxis and 10 by Yaxis.
Point P2 has the following coordinates: 10 by Xaxis and 20 by Yaxis.
Back to top
If we consider a simple situation, when we need to define a direction from a point, then you count clockwise.
 0 degrees goes to the right along Xaxis (3 o'clock, point D0 in the example below)
 90 degrees will move your point down (6 o'clock, point D90 in the example below)
 180 degrees will move the point to the left (9 o'clock, point D180 in the example below)
 270 (or 90) degrees will move your point upwards (12 o'clock, point D270 in the example below)
Angles are extensively used in functions, such as
Back to top
In your pattern code, you can use the “sz” constants that define the value of a size measurement.
Using abstract reference to sizes enables you to create a single pattern code that will work across sizes with pinpoint accuracy. It allows the software to redraft patterns automatically for individual sizes based on a new set of size measurements, and it saves time on grading and ensures a great fit.
All size measurement variables consist of letters
Size constants can be used in mathematical equations and used for calculating widths, heights, lengths etc.
They always return a numerical value, e.g. 46.599999.
Important: sz variables cannot be overrun in code, which means that you cannot create your own new variable named "sz18", etc.
Examples:
For more information on the size measurement constants please see Size Guide and Anatomical and Anthropometric Landmarks.
Back to top
For basic mathematical operations, you can use the following signs:
Just as usual, you can place parts of equation into brackets if you want certain actions to be done first, e.g.
For other mathematical operations, please use the following functions:
Back to top
Here are some formulas you might require when making sewing patterns:
Length of a circle = 2*pi*radius
Trigonometric functions for a triangle with straight angle
sin(a)=AB/OB
cos(a)=OA/OB
tan(a)=AB/OA
Or, if you need to find lengths using angles and length of one of the sides, then:
OB=AB/sin(a)=OA/cos(a)
AB=OB*sin(a)=OA*tan(a)
OA=OB*cos(a)=AB/tan(a)
Back to top
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.
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:
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.
Back to top
Draws a point.
x coordinate
y coordinate
You can use mathematical equations, variables and size constants when defining coordinates.
After a point is created, you can get its properties by using the following syntax: .x  returns the point's x coordinate
.y  returns the point's y coordinate
Back to top
Draws a point at the given distance from an existing point, at the given angle.
name of existing point
distance in cm
angle in degrees
You can use mathematical equations, variables and size constants when defining coordinates.
After a point is created, you can get its properties by using the following syntax: .x  returns the point's x coordinate
.y  returns the point's y coordinate
Back to top
Intersects two lines drawn from two points at the given directions and draws a point there.
first point
first direction in angles
second point
second direction in angles
Back to top
Draws a point in between two existing point.
first point
second point
Back to top
Intersects two circles drawn from two points with the given radiuses and draws a point in the place where they intersect.
first point
first radius in cm
second point
second radius in cm
number of point of intersection, 1 by default. Imagine standing in the center of the first circle and looking at the second circle. The point of intersection on the left is the first one, the point of intersection on the right is the second one.
Intercepts a circle drawn around a point, by an imaginary line drawn from a given point at a given angle, and places a point there. If used in if operator, will return true/false.
center point of a circle
radius of the circle
point, from where the vector starts
angle, at which the vector is directed
(optional) parameter defining whether the first or the second point is needed, 1 by default
It is mandatory to name the new point.
You can use mathematical equations, variables, object properties and size constants in syntax.
Back to top
Places a new point of a right triangle with hypotenuse between the mentioned points, so that the leg between the first point and the new point is of the given length. The length should always be smaller than the distance between the two mentioned points. The last parameter is optional, and stands for either left side (1) of the hypothenuse of right side (2) of the hypothenuse.
starting point of hypothenuse and adjacent
ending point of hypothenuse
length of adjacent, cannot be larger than the distance between the two points mentioned above
(optional) parameter defining whether the left or the right point is needed, 1 (left) by default
It is mandatory to name the new point.
You can use mathematical equations, variables, object properties and size constants in syntax.
Back to top
Draws a line between two points.
It is important to remember that the line will have a direction from first point to second point. For example, in case you later decide to split the line in two smaller lines, the first being 30% long, the software will start measuring 30% of length from the first point.
When you hover over a line in visual pattern window, the starting point will be highlighted in bright orange, and the ending point will be highlighted in bright blue. You will also see a popup with information about the line, including its length for this very size of pattern.
name of the first point
name of the second point
If the name of a line is not set in code, the default name is formed as L_firstpoint_secondpoint. E.g. an unnamed line between points P1 and P2 will get name L_P1_P2.
Names of points can be substituted with function point(x,y). In this case, it is mandatory to specify the name of the future line, as there are no point names to create it automatically.
After a line is created, you can get its properties by using the following syntax: a1 or .a2  the angle at the first/second point with the horizontal
.l  the length of the line
.p1  the first point
.p2  the second point
.x1  x coordinate for the first point
.y1  y coordinate for the first point
.x2  x coordinate for the second point
.y2  y coordinate for the second point
.dx  difference of x coordinate values between the first and the second points
.dy  difference of y coordinate values between the first and the second point
The above properties can also be got for an imaginary line between two points. The syntax of imaginary line is [point1:point2]. E.g.
See the above code played in the visual pattern window line by line (P1 is at 10,10 and P2 is at 50,70):
Back to top
Draws a smooth curve between two points that will never go outside the imaginary lines drawn at the given angles.
Mathematically, this is a quadratic Bezier curve, and you can find more information on it here.
first point of an arc
second point of an arc
angle at the first point
angle at the second point
You can use mathematical equations, variables and size constants when defining coordinates of the points, or the angles. E.g. the arc in the example in the right can be described in the following ways:
If the name of an arc is not set in code, the default name is formed as A_firstpoint_secondpoint. E.g. an unnamed arc between points P1 and P2 will get name A_P1_P2 (first line of code).
Names of points can be substituted with function point(x,y). In this case it is mandatory to specify the name of the future arc, as there are no point names to create it automatically (second line of code).
After an arc is created, you can get its properties by using the following syntax:
.a1  angle at the first point with the horizontal
.a2  the angle at the second point with the horizontal
.l  the length of the arc
.p1  the first point
.p2  the second point
.x1  x coordinate for the first point
.y1  y coordinate for the first point
.x2  x coordinate for the second point
.y2  y coordinate for the second point
.dx  difference of x coordinate values between the first and the second points
.dy  difference of y coordinate values between the first and the second point
Just like line, arc has direction from the first point to the second point.
You may be wondering why it is important to pay attention to angles and set them mathematically, rather than just moving the control point of the curve around.
In pattern making you most always work with shapes that will have to be connected to one another with a seam. When a seam is done, what you want to see is a smooth edge above the seam, and not a pointing corner. Working with angles lets you design the shapes in such a way that they are connected at the right angles to other lines, or curves, that will later become a seam.
Let us look at the following example of code:
Arc A_P1_P3 starts at direct angle to the line between points P1 and P2, and ends at a direct angle to the line between points P3 and P4. The thin straight lines going above the arc show the angles, at which the arc is drawn. The tiny point shows intersection of the two angles, the so called “control point” for the curve.
Please note how properties of implied lines are used in the last line of code (in bold). Translated into human language, the last line of code means:
Draw a smooth curve from P1 to P3. Start drawing at 90 degrees to the imaginary line between P1 and P2, and finish drawing at 90 degrees to the imaginary line between P3 and P4.
If we then attach this piece to another shape with a straight corner, the edge will be smooth, no kink or bump, or corner at the seam. We may even sew the piece along long edges, and the upper edge will be smooth all along as well.
Important: While arcs are comparatively easy to design, they should be used with caution. The system will always look for intersection of two angles, to use as control point, and if there’s none, this function will return a straight line. This is especially important to check for when automatically grading your test patterns across multiple sizes.
Back to top
Draws a curve between two points.
first point of a curve
second point of a curve
angle at the first point
angle at the second point
(optional) first coefficient, 1 by default
(optional) second coefficient, 1 by default
If the name of a curve is not set in code, the default name is formed as C_firstpoint_secondpoint. E.g. an unnamed curve between points P1 and P2 will get name C_P1_P2.
Names of points can be substituted with function point(x,y). In this case it is mandatory to specify the name of the future arc, as there are no point names to create it automatically (second line of code).
A curve also has direction from first point to second point.
After a curve is created, you can get its properties by using the following syntax: .a1  angle at the first point with the horizontal
.a2  the angle at the second point with the horizontal
.l  the length of the curve
.p1  the first point
.p2  the second point
.c1  coefficient at the first point
.c2  coefficient at the second point
.x1  x coordinate for the first point
.y1  y coordinate for the first point
.x2  x coordinate for the second point
.y2  y coordinate for the second point
.dx  difference of x coordinate values between the first and the second points
.dy  difference of y coordinate values between the first and the second point
You can use mathematical equations, variables, and size constants in syntax, e.g.
While the first four parameters of the curve function (points and angles) are straightforward, the coefficients might be less so.
By default the system will draw a curve that is similar to a French curve, often used in pattern making. However if you would like the curve to be more or less shaped, you can play with the FIRST COEFFICIENT. When used alone without the second coefficient, it will determine how shaped the curve is in general. You may set it from 0 (which degrades a curve to a straight line) to any number, but look out for intercrossing.
If you would like the curve to be unbalanced, more shaped at one edge and less shaped at the other, you may define this by using BOTH COEFFICIENTS.
You can see how the two control points become closer or farther from points in the following examples:
Back to top
Draws a smooth path consisting of curves between a set of points.
set of points in brackets
(optional) angle at the first point
(optional) angle at the second point
(optional) coefficient, 1 by default
If the name of a wave is not set in code, the default name is formed as W_firstpoint_lastpoint. E.g. an unnamed wave through points P1, P2, P3, P4, P5, P6 and P7 will get name W_P1_P7.
Names of points can be substituted with function point(x,y) etc. In this case it is mandatory to specify the name of the future arc, as there are no point names to create it automatically (second line of code).
A wave also has direction from first point to second point.
After a wave is created, you can get its properties by using the following syntax: .a1  angle at the first point with the horizontal
.a2  the angle at the second point with the horizontal
.l  the length of the path
.p1  the first point
.p2  the second point
.x1  x coordinate for the first point
.y1  y coordinate for the first point
.x2  x coordinate for the second point
.y2  y coordinate for the second point
.dx  difference of x coordinate values between the first and the second points
.dy  difference of y coordinate values between the first and the second point
Angles can be omitted. In this case, the first angle will equal the angle from the first point of a wave to its second point, and the last angle will equal the angle between the last but one point and the last point.
You can use mathematical equations, variables, and size constants in syntax, e.g.
By default the system will draw a set of waves that are similar to a French curve, often used in pattern making. However if you would like the curve to be more or less shaped, you can play with the COEFFICIENT. You may set it from 0 (which degrades a curve to a straight line) to any number, but look out for intercrossing.
Back to top
Draws a round tip within the given vectors.
name of the first point
angle at the first point
name of the second point
angle at the second point
radius in cm
If the name of a convex path is not set in code, the default name is formed as X_firstpoint_lastpoint. E.g. an unnamed convex path from points P1 and P2 will get name X_P1_P7.
Names of points can be substituted with function point(x,y) etc. In this case it is mandatory to specify the name of the future arc, as there are no point names to create it automatically (second line of code).
A convex path also has direction from first point to second point.
After a convex path is created, you can get its properties by using the following syntax: .a1  angle at the first point with the horizontal
.a2  the angle at the second point with the horizontal
.l  the length of the path
.p1  the first point
.p2  the second point
.x1  x coordinate for the first point
.y1  y coordinate for the first point
.x2  x coordinate for the second point
.y2  y coordinate for the second point
.dx  difference of x coordinate values between the first and the second points
.dy  difference of y coordinate values between the first and the second point
You can use mathematical equations, variables, and size constants in syntax, e.g.
Back to top
Draws a circle, or a section of a circle, with center at the named point and of the given radius.
center point
radius
(optional) first angle
(optional) second angle
If angles are omitted, a full circle will be drawn. Otherwise, a section of circle between the radius at the first angle and radius at the second angle will be drawn.
If the name of a circle is not set in code, the default name is formed as R_centerpoint. E.g. an unnamed circle around point P1 will get name R_P1.
After a circle is created, you can get its properties by using the following syntax:
.a1  angle at the first point with the horizontal
.a2  the angle at the second point with the horizontal
.l  the length of the section of the circle
.p1  the first point
.p2  the second point
.x1  x coordinate for the first point
.y1  y coordinate for the first point
.x2  x coordinate for the second point
.y2  y coordinate for the second point
.dx  difference of x coordinate values between the first and the second points
.dy  difference of y coordinate values between the first and the second point
You can use mathematical equations, variables and size constants in syntax, e.g.
The most common use for this function is round corners, as in the example on the right, arc and curve functions do not return a perfect circle shape.
Back to top
Unites several objects into a path.
list of objects, separated by comma
You can list the following objects within a path: point, line, arc, circle, curve, another path.
In case a point is listed, the software will connect it to the end and start point of the neighbouring objects with a straight line. In case other objects are listed, they will be included into the path as per their direction from start to end point. If you wish to change the direction of any object within a path, list it with a minus sign.
A path also has direction from first point to the last point.
After a path is created, you can get its properties by using the following syntax: .a1  angle of tangent line in the starting point
.a2  angle of tangent line in the end point
.l  length of this path
.p2  second point
.x1  x coordinate for first point
.y1  y coordinate for first point
.x2  x coordinate for second point
.y2  y coordinate for second point
.dx  difference of x coordinate values between the first and the second points
.dy  difference of y coordinate values between the first and the second point
Path comes handy when you have a complex of several objects that you wish to use later in the pattern code. For example, a side seam of a skirt is often a combination of a curve from waist to hip, and a straight line down to hem. If you are drafting a skirt with a yoke, or horizontal pleats, or any other style elements, you might need to get the length of both elements, or cut them at a certain angle from some point on a center seam, or find the place where the side seam intercrosses with another curve. As the lengths of the elements of the side seam are going to vary from size to size and from height to height, the point of intersection may be on the waist/hip curve or on the hip/hem line. Rather than adding extra conditions to the code, it is easier to operate the side seam as one object.
Let us look at two examples of paths, connecting the same points at different directions.
Both c1 curve and l1 curve have directions. This will affect how they are connected into a path.
Back to top
Draws a smooth curve between two points at the given angles of the given length.
first point of an arc
second point of an arc
angle at the first point
angle at the second point
desired length
A curve also has direction from first point to second point.
It is mandatory to name the new object that you are creating. The created curve will be equally shaped at both ends, which means that both coefficients of the curve will be equal. If the length is longer than the distance between points, the points will be connected with a straight line.
You can use mathematical equations, variables and size constants in syntax, and refer to the lengths of other objects, or implied lines, for example:
This function comes handy when you create darts, pleats, flounces and other style objects and need to keep the same length of both adjoining seams.
While the new curve may be less or more shaped than the original dart, it will still be of the same length, which enables you to connect it to another pattern piece with a seam.
It is also convenient to shape the top of the sleeve cap using the length of an armhole.
If desired, you may include certain percentage for cap ease depending on the fabric you are going to use, and shape the upper curve a bit longer.
Back to top
Pattern function creates pattern pieces, and uses many parameters.
This function has the biggest number of options, though many of them can be omitted. We recommend using the code help button and using code template for pattern function under objects (see on the right). Simply click the button to insert this template into code and replace or delete parameters as required.
All parameters are given in brackets and are separated by commas.
You may assign a name to a pattern piece if you plan to refer to it later, e.g. if you plan to apply pleats, mirror or move the pattern piece, however it is not mandatory. In case you need to name the pattern object, use syntax
name("text")  name of the pattern piece.
This parameter is mandatory.
It should be given as a string (text) in quotes, e.g.
trace(object1,object2)  pattern contour.
This parameter is mandatory and describes the sequence of objects forming the contour of a pattern piece.
 The objects must be given clockwise and their direction should be taken into consideration. For example if a curve or a line has opposite direction, it should be included with a minus sign, e.g.
 If the objects' ends don't meet, they are connected with straight line. Same happens with a sequence of points. For example to describe a square you only need to mention the corner points, e.g.
qty(number1,number2)  quantity of pieces required.
Can be omitted and equals (1,0) by default.
The first number refers to pieces cut as is, the second refers to mirrored pieces. E.g.
 Texts on pattern pieces will be generated accordingly.
 Only one piece will be included into real size print out. Small size printout will have all the pieces, and some of them will be mirrored.
fabric("text")  fabric to be used for pattern piece.
Can be omitted and equals "Self" by default.
 If several fabrics are to be used, they should be separated by comma, e.g.
 The real size printout will only have one piece.
 The small printout will have pieces for both fabrics.
 The lists of pattern pieces for instructions and spec sheet will be generated accordingly.
fold(point1,point2)  the future fold line on the pattern.
Can be omitted, is not included by default.
 Make sure you trace the pattern in such a way that the fold line is between the first and the last point of the contour.
 A fold mark is added automatically on the edge.
 If a fold line is mentioned, the text on pieces is generated accordingly, e,g, "cut 1 on fold".
 The piece will have the other half in the small printout, and its area will be calculated as a whole in the spec sheet.
 The software will not draw the second half of a pattern on real size printout, so that fewer sheets have to be printed out.
flip(point1,point2)  draws the second half of the pattern.
Can be omitted, is not included by default.
If a shape of a pattern piece is very complex and it is tricky to cut it on fold making sure it stays precise, you may choose to print it out as a whole. You only need to mention the flip line and the software will draw the second half of the pattern piece and include all marks, texts, lines etc, that are present in the first half. In this case the pattern will have both halves traced and printed out in real size and small printouts.
grain(angle)  the angle of grain line on the pattern.
Can be omitted, equals 90 by default.
 You may use math expressions and refer to properties of other objects in this parameter, e.g.
 The software will draw a dashed line across the pattern piece and mark it as GRAIN (see above).
inc(objects)  the objects that should be included into the pattern piece, e.g. texts, marks, other objects that need to be printed within the pattern (e.g. darts).
You may also describe a sequence of points, and it will be included as a line, or a path if you mention more than 2 points. E.g.
color("name or hex code")  the color of a pattern piece on the screen and in small size printout
Can be omitted, equals "coral" by default.
E.g.
outline("name or hex code")  the color of the contour of a pattern piece on real size printout, usually referred to as color coding pattern blocks
Can be omitted, equals "black" by default.
E.g.
Tip: Traditionally, color coding is as follows:
seam(float or name of a variable)
Can be omitted, equals 0 by default.
E.g.
extra( (point1,point2,float or name of variable),...,(point3,point4,float or name of variable) )
Can be omitted, equals 0 by default.
Defines specific seam allowance between two points along the contour, to be mentioned clockwise. Points can be referred by names or properties of objects, for example:
Tip: Seam allowances depend on the fabric choice and usually are as follows:
Back to top
Returns path for a spiral flounce around the mentioned point, based on desired width and length of flounce. Seam allowance is the distance between spiral curls, so plan for both upper seam and hemming. E.g.:
As you can see, you can refer to lengths of other objects, lengths of imaginary lines and use mathematical functions in the syntax of flounce function.
This path provided by this function is ready to be included into pattern contour, e.g.
If you desire to create a less curvy flounce we recommend using the spread function.
Back to top
Splits an objects in two by intersecting it by a line from a given point at a given angle and draws a point there. You may name two resulting objects if you want to use them later.
object (e.g. curve,arc,circle,line or path)
point, from where the vector starts
angle in degrees, by default 0 degrees
(optional) name of the first half of the cut object
(optional) name of the second half of the cut object
Back to top
Splits an object into two new objects, following the original object’s direction, and places a point there. The first object begins at the first point of the original object and is of the set length. Can be applied to line, arc, circle, curve and path.
name of an object
length
(optional) name of the first object (from the first point of the object to the new point)
(optional) name of the second object (from the new point to the last point of the object)
It is mandatory to name the new point that will be placed on the object. If the names of the new objects are omitted, the function will only place a point at the given length. You can use mathematical equations, variables, object properties and size constants in syntax, e.g.
Back to top
Draws a point in the place where two objects intercross. If objects intercross twice, only the first point of intersection is returned. Can be applied to lines, arcs, circles, curves and paths. If used in if operator, will return true/false.
first object
second object
(optional) first half of first object (from the first point of the first object to the new point)
(optional) second half of first object (from new point to the last point of the first object)
(optional) first half of second object (from the first point of the second object to the new point)
(optional) second half of second object (from new point to the last point of the second object)
It is mandatory to name the new point that will be placed where the objects intercross. If the names of the four new objects are omitted, the software will only place a point, and not create new objects.
Back to top
Finds a tangent to an object from a given point, places a point on the object in this place, and splits the object into two new objects (optionally). Can be applied to line, arc, curve, path.
This function can be used, if you would like to make smooth transition between a line and a curve, for example in a flared skirt.
Imagine that the point in this function is clock center and there’s a minute hand that moves around until it runs into the object. By default, the minute hand moves clockwise, however you can set it to counterclockwise by assigning 1 to the third parameter.
In the example of the right, the front dart of the skirt has been closed, and the designer decided to add flare to the skirt. As a result, the edge of the skirt was broken at the point P72m (see the dashed line). To automatically smooth the side edge, we can use:
Back to top
Creates copies of one or several objects.
list of objects in brackets, separated by comma
(optional) list of new objects in brackets, separated by comma OR name suffix for new objects in double or single quotation marks
If suffix is omitted it equals "_c" by default.
Back to top
Deletes objects.
list of objects in brackets, separated by comma
Sometimes when you code a pattern you create temporary or accessorial points, lines and other objects. They are vital while you move through the first steps of drafting your pattern, but at some point there are simply too many objects in the screen.
At this step you may choose to delete these abundant objects, in case you don’t need them later in the pattern drafting process and the code.
You may refer to these objects BEFORE you deleted them, i.e. higher in the code body, but not AFTER you have deleted them, i.e. lower in the code.
Back to top
Renames objects.
list of objects in brackets, separated by comma
If you need to change the name of an object, you can rename it using this function. The previous name will be then deleted and only the new name will be available for further actions with the object.
You may refer to these objects BEFORE you renamed them, i.e. higher in the code body, but not AFTER you have renamed them, i.e. lower in the code.
Back to top
Creates a new path along an existing object path at the given distance all along the path.
object  can be circle, line, arc, circle, path
distance from the object in cm
side  1 stands for the left side, 2 stands for the right side, as seen from the beginning of the existing path towards it end.
This function may come handy when creating facings, or an edge of outer stand up collar at 0.3 mm from the inner one, etc.
The start and end points of the along path are created at perpendiculars to the angles of the reference object. In the example on the right the first angle of the curve is 85 degrees, and the starting point of along path, highlighted in purple, is at 85+90 degrees from point P1, at exactly 3 cm. The second angle of the curve is 180, and the second point of the along path is placed at 18090 degrees from P2, at exactly 3 cm. The other points of the along path are placed in a similar way and are always at exactly 3 cm from the curve. In this example we need the along path to pass on the right from the original curve, so the third parameter is set to 2.
Back to top
Adjusts the lengths of two curves so that they are equal.
name of the first curve
name of the second curve
The difference in lengths of the two curves is divided by two and is added to the length of the shorter curve, and distracted from the length of the longer curve. The difference is then spread between the two lengths equally. In the example on the left the original curves are shown in dashed lines, while the resulting curves, both of the same lengths, are shown in solid lines.
Back to top
Adjusts an existing curve to the given length.
name of the curve
desired length
The existing curve will be deleted and then there will be drafted a new curve with the same name, at the same points and angles, but with a different length and thus with new coefficients. In the example on the left the original curve is dashed, and the resulting curve is solid.
Back to top
Converts an object or several objects into curve(s) with the same starting/ending points and angles, and of the same length.
name(s) of object(s)
The existing object(s) will be deleted and then there will be drafted a new curve with the same name, at the same points and angles, with the same length and with equal coefficients.
Back to top
Inverts the mentioned objects and keeps the type of the objects intact.
name(s) of object(s)
The existing object will be deleted and then there will be drafted a new object with the same name, at the same points and angles, and with the same coefficient in the case of a curve  but in the inverted direction.
Back to top
This function moves the named objects at a given distance at the given angle.
list of objects in brackets, separated by comma
distance
(optional) angle, 0 by default
(optional) list of new objects in brackets, separated by comma OR name suffix for new objects in double or single quotation marks
This function is often used when drafting collars, sleeve cuffs, etc. For example, you may want to move the shoulder line and the neckline line to an empty space in the visual pattern design window and have a more clear picture of what you are doing, instead of working over a set of other objects and points you might have had on the front piece.
There are several variants of using the function and naming the moved objects.
Back to top
Moves objects along a reference line.
list of objects in brackets, separated by comma
reference line
(optional) list of new objects in brackets, separated by comma OR name suffix for new objects in double or single quotation marks
This operator moves the named objects following a vector determined by a line.
If you just want to move objects and don't need to keep the original ones, leave the third parameter blank, e.g.:
See example on the right
If you would like to keep both the original and the moved objects, you have two options:
1) Name all new objects one by one, in the same order as the original objects, e.g.:
2) Create a suffix for new objects that will be automatically added to the names of existing objects, e.g.:
Back to top
Rotates objects around a given point at a given angle. This operator comes very handle for darts manipulation, draping, etc.
list of objects in brackets, separated by comma
point
angle in degrees
(optional) list of new objects in brackets, separated by comma OR name suffix for new objects in double or single quotation marks
If you just want to rotate objects and don't need to keep the original ones, leave the third parameter blank, e.g.:
See example on the right
If you would like to keep both the original and the rotated objects, you have two options:
1) Name all new objects one by one, in the same order as the original objects, e.g.:
2) Create a suffix for new objects that will be automatically added to the names of existing objects, e.g.:
Back to top
Mirrors objects against a reference line.
list of objects in brackets, separated by comma
reference line
(optional) list of new objects in brackets, separated by comma OR name suffix for new objects in double or single quotation marks
This operator mirrors the named objects against a reference line. This means that the new objects will have mirrored shape, and will be at the same distance from the reference line as the original objects. Please mind the point sequence and angles after applying the operator.
If you just want mirrored objects and don't need to keep the original ones, leave the third parameter blank, e.g.:
If you would like to keep both the original and the mirrored objects, you have two options:
1) Name all new objects one by one, in the same order as the original objects, e.g.:
2) Create a suffix for new objects that will be automatically added to the names of existing objects, e.g.:
Back to top
Scales objects by x times along the given angle. Very handy for designing patterns from stretchy fabrics.
list of objects in brackets, separated by comma
times (float, e.g. 2, 0.95, 2.35 etc)
angle in degrees, by default 0 degrees
(optional) list of new objects in brackets, separated by comma OR name suffix for new objects in double or single quotation marks
If you would like to keep both the original and the rotated objects, you have two options:
Back to top
This operator enables you to apply tapered spread to the listed objects.
* Can be point, line, arc, curve, circle, path. Multiple objects should be united into one path.
In tapered spread on paper, a pattern piece is usually cut into multiple stripes, and then these stripes are spread apart to obtain more flared shape. The ends of the stripes along the inner side stay together, while the ends of the stripes along the outer edge move apart at the same distance. The sides of the pattern piece remain of the same shape and length.
Function spread emulates this process automatically. To better understand how it works, imagine cutting your piece into stripes, and placing it so that the inner side of the pattern piece faces you (see below).
Now you can pull one side of the pattern piece to the left, and the other side to the right. It is important to spread out the stripes evenly. It is desirable to avoid edgy contours on the resulting inner and outer sides, and the software will smooth these for you. In the picture below you may see the red and green smooth curves that will be the result of applying this function. It is important to keep the inner edge of the spread of the same length, as most likely it will then be sewn to another pattern piece. This is also taken care of and you can always be sure that the resulting inner path (in green) is exactly of the same length as the length of the inner side of the original piece.
However depending on your style you may want the resulting piece to be more flared on one side, and less flared on the other side. A good example would be half piece of back skirt, that you wish to flare, for example, mostly towards the side seam, and just a bit towards the center seam.
In function spread, you determine the degree of flare on the each side by setting the left flare angle and the right flare angle. These angles should always be positive values, e.g. 10, and not 10, as we are adding flare. If you set the angles to 0, the piece will remain the same. The maximum flare allowed is 360 degrees in total, e.g. 180+180 or 10+350 etc. Let us see at how these variations work for a rectangular piece:
You can see that the general shape of the resulting piece is the same (the total angle is still 70), but they are positioned differently.
Syntax of this function is somewhat more difficult than for the other ones.
For example in the following line of code:
Once again, the last parameter works as follows:
Back to top
This function helps to crop an object against two other objects, or imaginary lines.
* Can be point, line, arc, curve, circle, path. Multiple objects should be united into one path.
If the object to be cropped crosses both borders, it will be shortened. If it doesn't cross one or two borders, it's end will be prolongated along the corresponding angle at the end of the object, and a straight line will be drafted until it crosses the border.
For example:
Back to top
Moves and rotates objects against two reference lines in such a way, that the two lines would be aligned, their start points at the same place, and their end points along the direction of the 2nd line.
For example, magnetising back neckline from back shoulder to front shoulder will result in moving and adjusting the back neckline to front shoulder (e.g. for tracing a collar). If you want to use only the transformed objects and don't need to keep the original ones, leave the suffix blank. Otherwise, add a suffix for automatic naming (e.g. "g").
For example:
Back to top
Creates a pleat on a whole pattern starting from a point on its contour, of the mentioned width. The direction of the fold is determined by angle. Sides can be 1 (single pleat to the left) or 2 (single pleat to the right).
In case you wish to apply pleat function, you need to give a name to your pattern piece.
In this case you should write the name of the pattern, equation sign and then the
We can now create some pleats.
Back to top
Rounds a float.
float
(optional) desired number of numbers after comma
Back to top
Returns sine of an angle.
Angle in degrees
Back to top
Returns cosine of an angle.
Angle in degrees
Back to top
Returns tangent of an angle.
Angle in degrees
Back to top
Returns arcsine (in degrees).
Float, sine of an angle.
Back to top
Returns arccosine (in degrees).
Float, arccosine of an angle.
Back to top
Returns arctangent (in degrees).
Float, tangent of an angle.
Back to top
Returns square root of a float.
Float
Back to top
Returns approximation of PI.
Back to top
Returns angle in degrees in a triangle formed by the mentioned three points, the second point being the angular point. The returned angle is always a positive value.
name of the first point
name of the angular point
name of the second point
Back to top
Returns internal bisection angle in degrees in a triangle formed by the mentioned three points, the second point being the angular point. The returned angle is always a positive value.
name of the first point
name of the angular point
name of the second point
Back to top
Returns absolute value of a float (always positive)
float (you can also use variables and mathematical expressions)
Back to top
Places a mark at the given point at the given angle. You can choose type of the mark and its length and width, or use text as mark and mention its size.
name of the point, where the mark should be placed
angle, at which the mark should be placed
(optional) type of the mark from the list, T by default  OR any text
(optional) length of the mark, 1 cm by default
(optional) width of the mark, 1 cm by default, equals length if omitted for typical marks and is ignored for text marks
If the name of a mark is not set in code, the default name is formed as M_point. You can use mathematical equations, variables, object properties and size constants in syntax.
Please observe the types of mark used in Sewist Pattern Designer and their position against the point. The angle is set to 0 in all the examples below. Length and width are set to equal values.
You may also use any text for mark, mentioning it as a string in quotations instead of the mark type. In this case the 4th parameter, length of mark, is understood as text size (see mark3 above). The 5th parameter is then ignored. Sewist Pattern Designer will draw a tiny notch to the point, and the text will be centered against it. In general, special html symbols like the ones below are accepted. Your imagination is the limit!
Back to top
Creates a new object that contains text, written next to the given point at the given angle of the given size.
text in “” quotations or name of a string variable
name of the point
(optional) angle, 0 by default
(optional) text size, 1 cm by default
If the name of a text variable is not set in code, the default name is formed as T_point. You can use mathematical equations, variables, object properties, size constants in syntax, e.g.
It is important to remember that this function will type exactly the symbols that you have placed in the quotations. Sometimes you wish to place numeric information on a pattern piece, for example length of the zipper required.
You have probably calculated it in the code, for example
Depending on the size measurements, this number will be different, e.g. it may be 13.7 for S size, and 15.1 for XXL size. We would like this information to be printed on the pattern. If we code
the software will not understand that we are referring to a numerical variable here. The result will be as on the right.
This is not exactly what we want, so let us take the variable out of the quotation marks, and append it to the string parts of the text with + signs, as below. You will also see that string parts and numerical values now have different colors in code editor window.
The software will append the first part of text to the variable and to the last part of text, and print the result. When your pattern is graded, this text will be updated automatically.
Back to top
Makes objects dashed.
list of objects in brackets, separated by comma
This function is useful when you want to style some of the lines on your pattern, e.g. front center line e.g.
Back to top
Makes objects dotted.
list of objects in brackets, separated by comma
This function is useful when you want to style some of the lines on your pattern, like area where you need to ease in a sleeve cap, etc. E.g.
Back to top
Makes objects solid again.
list of objects in brackets that were dashed or dotted earlier, separated by comma
This function is useful when you want to style some of the lines on your pattern back to solid lines.
Back to top
Prints a comment in electronic book.
string
This function is useful when you want to add a text of your own to the electronic book.
Back to top
This function you insert another pattern code into a new project.
You may use existing templates coded by Sewist staff or templates coded by community and marked public.
If you are not happy with the offered basic construction, you may create your own code and save it as template by using the settings button .
You may choose to make your template public or reserve it for your own use. If you make your pattern code public, others will be able to see the code, but not edit it. They will also be able to create a copy of the code and adapt it to their use.
In case you make a template public and hide the code, other users will only be able to use the reference to this template, but they won't see the code and won't be able to create a copy of it.
To insert a template, place cursor in the code window at the place, after which you wish to insert a template.
Click the template button in top panel and select the template you wish to insert.
Redraft pattern by clicking or .
Pay attention to console right below the code window. In many cases the template will post some information there letting you know what settings you might tweak, e.g.
Back to top
Defines a number variable depending on the mentioned size constant. The number is changed according to arithmetic progression.
name of size variable, e.g. sz1
several options in brackets  first value of the size, then desired value of a float
This function is applied when you want to define numeric values depending on the size, but you can't do it by simply taking a percentage of size or through other mathematic operations. For example, you don't want bust ease to always be 5% of the bust girth, as it will be too little for small sizes and too much for big sizes. Let's say you want the ease to be around 5 for smaller sizes, around 6 for medium sizes and around 7.5 for larger sizes. You can thus define your variable through grade function, referring to value of sz16 (bust girth) and setting several limits so that the value will be changed within these.
If you set ea16 through grade function:
the variable will be calculated in the following way:
It will equal exactly 5 cm for any size where bust girth is between 40 and 80.
For sizes, where bust girth is bigger than 80, but smaller than 90, it will be changed gradually:
It will equal exactly 6 cm for any size where bust girth is between 90 and 100.
For sizes, where bust girth is bigger than 100, but smaller than 150, it will be changed gradually:
Back to top
Output strings, values of variables, or information about objects in console.
list of objects, variables, or strings, separated by comma
Whenever you are unsure about something, try having a look at it in console. You can mention properties of object, and even ask the program about size variables, for example:
See example on the right.
Back to top
Terminates execution of the code.
Sometimes when you code a big pattern, and change the code later on, some parts of it may stop working and it is difficult to guess exactly which ones. In this case you may either comment pieces of codes (but you would have to uncomment them later) or simply write
Back to top
The if construct is one of the most important features of many languages. It allows for conditional execution of code fragments.
If the expression is TRUE, Sewist will execute the mentioned actions, and if it is to FALSE  it'll ignore it.
The following example would display message "a is bigger than b" in console if a is bigger than b:
If you want to tell the program what to do in case the statement is TRUE, and also what to do if the statement is FALSE, you can use
The following example would display message "a is bigger than b" in console if a is bigger than b, and it will display "b is bigger or equals a" in the opposite case:
Often you'd want to have more than one actions to be executed conditionally. Of course, there's no need to wrap each statement with an if clause. Instead, you can group several statements into a statement group.
For example, the following example would display message "a is bigger than b" in console if a is bigger than b, and would then assign the value of a into b:
If statements can be nested infinitely within other if statements, which provides you with complete flexibility for conditional execution of the various parts of your pattern algorithms.
Back to top
Determine whether a variable or an object exist, i.e. were defined before in the code.
In the piece of code above we have checked if the variable
Back to top
Programming a loop. Expressions can be separated by commas or by semicolon.
The first expression is evaluated once unconditionally at the beginning of the loop.
In the beginning of each iteration, the second expression is evaluated. If it evaluates to TRUE, the loop continues and the nested statement(s) are executed. If it evaluates to FALSE, the execution of the loop ends.
At the end of each iteration, the third expression is executed.
This is usually referred to as working with the loop counter. First, set the initial value of the counter. Then decide, how many times you want to run the loop at maximum. Then decide, how the counter will be changed at the end of each loop run. The most usual way is to add plus one, which is written as
Loops are handy when you want to program repeating actions. For example, you want to find the position of points that would let you draft a curve of a given length.
You know that the length of the curve should be 15 cm. You have defined points P1 and P2 at 15 cm apart from each other, but that would let you draft a line between them, not a curve. That's not what you want, so you are going to move the points closer until you are able to draft a curve between them, that is no longer than 15 cm. You are going to make the point closer by 0.2 cm every time. However, you don't want to make this an endless process, you are going to try say 10 times, and then stop executing these actions.
Let us look at this piece of code:
Let us see what the program will do step by step. Once it encounters the
The software will move p2 by 0.2 cm towards p1. It will then draft a curve between p1 and p2. Then it will check if the length of the curve is less than 15 cm. If it is less than 15 cm, the software will jump out of the loop and move on to the next code we have written in the algorithm. This is what the
Otherwise it will continue working within the
Once all the statements are executed, Sewist will look at the third expression in the
Now Sewist looks at the second expression in the
Sewist will continue running the loop, executing the described actions, then adding plus 1 to
We can see the result of this code on the right. The software had to run through the loop 7 times until the position of the points allowed to draft a curve that was less than 15 cm. The resulting curve is highlighted in the screen.
Back to top
Ends execution of the current for, foreach, while, dowhile or switch structure.
Back to top
Used within looping structures to skip the rest of the current loop iteration and continue execution at the condition evaluation and then the beginning of the next iteration.
Back to top
Visual Tools
For information on visual tools in the editor window, please click the corresponding button. Each button helps to use a function intuitively with the visualization of the result right on your screen.
Designer account
In your Designer User Account you will see links to the following sections:
 Create new pattern  takes you directly to the working space of Pattern Designer
 Documentation  the list of functions and other information about pattern design language
 Manual  articles written by Sewist with examples of coding patterns for various styles and size groups
 Your subscription  in this section you can see the details and/or upgrade your current subscription
 My library  the collection of the patterns that you have created.
 Templates  sewing patterns coded by Sewist staff and other users following the generally accepted pattern drafting methods. You may include a template into your code and base your new project on it.
 Sample patterns  sewing patterns coded by Sewist staff to demonstrate various drafting features. You may copy the code of these patterns and use it for your new project.
 MixandMatch  an automatic pattern code compiler based on pattern features.
 Size Guide  information on size measurement constants and anthropometric landmarks.
 Videos  educational Sewist videos and pattern drafting simulations.
Back to top
General guidelines
Pattern code is written in English letters using size constants, functions, variables and string expressions. You may use other encodings in string expressions, that are in quotation marks, e.g.:
type(“Bottom Front”,P1);
(English encoding)type(“Низ переда”,P1);
(Russian encoding)
Lines of code are separated by line break or semicolon (both options are allowed, which makes Sewist Pattern Designer easier to use if you are used to a particular programming language). E.g.
bust=sz16+ea16;
hip=sz19+ea19;
will work just as well as
bust=sz16+ea16
hip=sz19+ea19
By default, all numeric values are in cm for distances and in degrees for angles, depending on the function you are using. E.g. the code below creates a new point which is at 5 cm from the first point and is at 90 degrees from the first point:
P2=apply(P1,5,90);
Sewist pattern designer supports both oneline comments and multipleline comments. Commented code will not be executed by the software. Comments are useful if you decide to make notes about certain operations, or if you would like to test a new approach, but you should backup the current code while you are testing.
To code one line, or part of a line, please use // at the beginning of the code block you wish to comment. E.g.
// neck=curve(P1,P2,0,90);
neck=curve(P1,P2,0,90) // draws a neckline curve in the back
You may also comment on several lines by using /* in the beginning and */ at the end of commented code. You may nest // comments inside, but don’t nest several multiple line comments into one another. E.g.:
/*
//Ease graded depending on the bust girth
bust=sz16+grade(sz16(80,2),(96,1.5),(104,1));
armhole=sz39;
*/
Back to top
Variables
You can create your own variables and refer to them in the code. These can be numeric variables, names of objects, names of compounds of objects (path), names of pattern blocks.
Variables should start with a letter and have no spaces. You may use _ but not  as the dash is considered to be a math sign. Variables are not case sensitive, so p1 is the same as P1.
To create a new variable, simply write its name at the beginning of a line, followed by an equation sign, and then numeric value, mathematical equation or a function, e.g.:
bust_girth=sz16
ea16=2
bust=Bust_Girth+ea16
P2=apply(P1,BUST,0)
In the example above, you can see that we have referred to the same variables using lower case, upper case and a combination of those.
Important! Names starting with "sz" are reserved for size measurement constants, which means that you cannot create your own variables with the names sz1, … sz122. Names starting with “ea” are reserved for ease allowances. Please see Size Guide and Anatomical and Anthropometric Landmarks for more information. Pi constant cannot be overrun either.
Back to top
Axes of coordinates
Many functions of Sewist pattern language use angles. As most sewing patterns are drafted from top down and from left to right, the direction of axes has been set up correspondingly.
The Xaxis goes from left to the right and Yaxis is turned downwards. Zero point is in the upper left corner of the pattern window.
The image on the right demonstrates the principle.
Point P1 has the following coordinates: 20 by Xaxis and 10 by Yaxis.
Point P2 has the following coordinates: 10 by Xaxis and 20 by Yaxis.
Back to top
Angles
If we consider a simple situation, when we need to define a direction from a point, then you count clockwise.
 0 degrees goes to the right along Xaxis (3 o'clock, point D0 in the example below)
 90 degrees will move your point down (6 o'clock, point D90 in the example below)
 180 degrees will move the point to the left (9 o'clock, point D180 in the example below)
 270 (or 90) degrees will move your point upwards (12 o'clock, point D270 in the example below)
Angles are extensively used in functions, such as
apply
, meet
, type
, arc
, curve
, circle
, cut
and others.
Back to top
Size measurements
In your pattern code, you can use the “sz” constants that define the value of a size measurement.
Using abstract reference to sizes enables you to create a single pattern code that will work across sizes with pinpoint accuracy. It allows the software to redraft patterns automatically for individual sizes based on a new set of size measurements, and it saves time on grading and ensures a great fit.
All size measurement variables consist of letters
sz
followed by the number of the size measurement, e.g. sz18
for waist girth. The full list and description of size measurement constants is available in documentation.
Size constants can be used in mathematical equations and used for calculating widths, heights, lengths etc.
They always return a numerical value, e.g. 46.599999.
Important: sz variables cannot be overrun in code, which means that you cannot create your own new variable named "sz18", etc.
Examples:
knee_length=sz7sz9;
upbalance=((sz44sz43)sz40)*1.1+1; // upper balance
For more information on the size measurement constants please see Size Guide and Anatomical and Anthropometric Landmarks.
Back to top
Mathematical functions
For basic mathematical operations, you can use the following signs:
+
(addition), 
(subtraction), *
(multiplication) and /
(division). Just as usual, you can place parts of equation into brackets if you want certain actions to be done first, e.g.
(a+b)*(c/d)
etc.For other mathematical operations, please use the following functions:
pi
 Returns an approximation of pi. 
round(x,precision)
 Returns the rounded value of x to specified precision (number of digits after the decimal point). Precision is 0 by default and can be omitted, e.g. round(24.35)=24 
sqrt(x)
 Returns square root of x. 
abs(x)
 Returns the absolute value of number (always positive). 
ratio(x/y)
 Returns the integer after division, e.g. ratio(11/4) will return 2. 
cmtoin(x)
 Helps to convert a value in centimeters into inches. Returns a float rounded to the first decimal, e.g. cmtoin(20) will return 7.9. 
intocm(x)
 Helps to convert a value in inches into centimeters. Returns a float rounded to the first decimal, e.g. intocm(8) will return 20.3. 
sin(x)
 Returns sine of x (in degrees). 
cos(x)
 Returns cosine of x (in degrees). 
tan(x)
 Returns tangent of x (in degrees). 
asin(x)
 Returns arcsine (in degrees) of x (in degrees). 
acos(x)
 Returns arccosine (in degrees) of x. 
atan(x)
 Returns arctangent (in degrees) of x. 
Back to top
Frequently used formulas
Here are some formulas you might require when making sewing patterns:
Length of a circle = 2*pi*radius
Trigonometric functions for a triangle with straight angle
sin(a)=AB/OB
cos(a)=OA/OB
tan(a)=AB/OA
Or, if you need to find lengths using angles and length of one of the sides, then:
OB=AB/sin(a)=OA/cos(a)
AB=OB*sin(a)=OA*tan(a)
OA=OB*cos(a)=AB/tan(a)
Back to top
Functions
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.
Back to top
POINTS
point(x,y)
Draws a point.
Function parameters
You can use mathematical equations, variables and size constants when defining coordinates.
Object properties
After a point is created, you can get its properties by using the following syntax:
Usage
p1=point(10,10);
(see example on the right)p2=point(p1.x+10,p1.y*2sz5);
Back to top
apply(point,distance,angle)
Draws a point at the given distance from an existing point, at the given angle.
Function parameters
You can use mathematical equations, variables and size constants when defining coordinates.
Object properties
After a point is created, you can get its properties by using the following syntax:
Usage
p2=apply(p1,10,10);
(see example on the right)p2=apply(p1,sz3*0.5+var3,10);
Back to top
meet(point,angle,point,angle)
Intersects two lines drawn from two points at the given directions and draws a point there.
Function parameters
Usage
meet(p1,0,p2,90)
(see example on the right)Back to top
midpoint(point1,point2)
Draws a point in between two existing point.
Function parameters
Usage
p3=midpoint(p1,p2)
(see example on the right)Back to top
compass(point1,angle1,point2,angle2,number)
Intersects two circles drawn from two points with the given radiuses and draws a point in the place where they intersect.
Function parameters
Usage
p3 = compass(p1, 25, p2, 35, 1);
("left point" in the example on the right)p4 = compass(p1, 25, p2, 35, 2);
("right point" in the example on the right)intercept (center,radius,point,angle,number)
Intercepts a circle drawn around a point, by an imaginary line drawn from a given point at a given angle, and places a point there. If used in if operator, will return true/false.
Function parameters
Usage
It is mandatory to name the new point.
You can use mathematical equations, variables, object properties and size constants in syntax.
p3=intercept(p1, 25, p2, 165) // the 5th parameter is implied to be 1 (first point)
p4=intercept(p1, 25, p2, 165, 2)
Back to top
adjacent (point1,point2,length,side)
Places a new point of a right triangle with hypotenuse between the mentioned points, so that the leg between the first point and the new point is of the given length. The length should always be smaller than the distance between the two mentioned points. The last parameter is optional, and stands for either left side (1) of the hypothenuse of right side (2) of the hypothenuse.
Function parameters
Usage
It is mandatory to name the new point.
You can use mathematical equations, variables, object properties and size constants in syntax.
p3=adjacent(p1, p2, 25) // the 4th parameter is implied to be 1 (first point)
p3=adjacent(p1, p2, 25, 2)
Back to top
OBJECTS
line(point,point)
Draws a line between two points.
It is important to remember that the line will have a direction from first point to second point. For example, in case you later decide to split the line in two smaller lines, the first being 30% long, the software will start measuring 30% of length from the first point.
When you hover over a line in visual pattern window, the starting point will be highlighted in bright orange, and the ending point will be highlighted in bright blue. You will also see a popup with information about the line, including its length for this very size of pattern.
Function parameters
If the name of a line is not set in code, the default name is formed as L_firstpoint_secondpoint. E.g. an unnamed line between points P1 and P2 will get name L_P1_P2.
Names of points can be substituted with function point(x,y). In this case, it is mandatory to specify the name of the future line, as there are no point names to create it automatically.
Object properties
After a line is created, you can get its properties by using the following syntax:
Imaginary line
The above properties can also be got for an imaginary line between two points. The syntax of imaginary line is [point1:point2]. E.g.
[p1:p2].a1
, [p1:p2].l
etc.
Usage
See the above code played in the visual pattern window line by line (P1 is at 10,10 and P2 is at 50,70):
line(p1,p2);
line1=line((point(10,10),point(20,20));
line2=line(point(P1.x,P2.y+5),L_P1_P2.p2);
Back to top
arc(point1,point2,angle1,angle2)
Draws a smooth curve between two points that will never go outside the imaginary lines drawn at the given angles.
Mathematically, this is a quadratic Bezier curve, and you can find more information on it here.
Function parameters
Usage
You can use mathematical equations, variables and size constants when defining coordinates of the points, or the angles. E.g. the arc in the example in the right can be described in the following ways:
arc(p1,p2)
arc1=arc(point(10,10),point(50,70)
If the name of an arc is not set in code, the default name is formed as A_firstpoint_secondpoint. E.g. an unnamed arc between points P1 and P2 will get name A_P1_P2 (first line of code).
Names of points can be substituted with function point(x,y). In this case it is mandatory to specify the name of the future arc, as there are no point names to create it automatically (second line of code).
Object properties
After an arc is created, you can get its properties by using the following syntax:
Just like line, arc has direction from the first point to the second point.
You may be wondering why it is important to pay attention to angles and set them mathematically, rather than just moving the control point of the curve around.
In pattern making you most always work with shapes that will have to be connected to one another with a seam. When a seam is done, what you want to see is a smooth edge above the seam, and not a pointing corner. Working with angles lets you design the shapes in such a way that they are connected at the right angles to other lines, or curves, that will later become a seam.
Let us look at the following example of code:
p1=point(15,22)
p2 = point(30,70)
line1=line(p1,p2)
p3=point(55,22)
p4=point(40,70)
line2=line(p3,p4)
arc(p1,p3,[p1:p2].a1+90,[p3:p4].a1+90)
Arc A_P1_P3 starts at direct angle to the line between points P1 and P2, and ends at a direct angle to the line between points P3 and P4. The thin straight lines going above the arc show the angles, at which the arc is drawn. The tiny point shows intersection of the two angles, the so called “control point” for the curve.
Please note how properties of implied lines are used in the last line of code (in bold). Translated into human language, the last line of code means:
Draw a smooth curve from P1 to P3. Start drawing at 90 degrees to the imaginary line between P1 and P2, and finish drawing at 90 degrees to the imaginary line between P3 and P4.
If we then attach this piece to another shape with a straight corner, the edge will be smooth, no kink or bump, or corner at the seam. We may even sew the piece along long edges, and the upper edge will be smooth all along as well.
Important: While arcs are comparatively easy to design, they should be used with caution. The system will always look for intersection of two angles, to use as control point, and if there’s none, this function will return a straight line. This is especially important to check for when automatically grading your test patterns across multiple sizes.
Back to top
curve (point1,point2,angle1,angle2,coefficient1,coefficient2)
Draws a curve between two points.
Function parameters
If the name of a curve is not set in code, the default name is formed as C_firstpoint_secondpoint. E.g. an unnamed curve between points P1 and P2 will get name C_P1_P2.
Names of points can be substituted with function point(x,y). In this case it is mandatory to specify the name of the future arc, as there are no point names to create it automatically (second line of code).
A curve also has direction from first point to second point.
Object properties
After a curve is created, you can get its properties by using the following syntax:
Usage
You can use mathematical equations, variables, and size constants in syntax, e.g.
curve(p1,p2,15,45)
c1=curve(point(10,70+sz3),point(p3.x,p4.y),1+90,angle(p1,p2,p3)+[p1:p2].a1,1,2)
While the first four parameters of the curve function (points and angles) are straightforward, the coefficients might be less so.
By default the system will draw a curve that is similar to a French curve, often used in pattern making. However if you would like the curve to be more or less shaped, you can play with the FIRST COEFFICIENT. When used alone without the second coefficient, it will determine how shaped the curve is in general. You may set it from 0 (which degrades a curve to a straight line) to any number, but look out for intercrossing.
curve(p1,p2,30,180+50)

curve(p1,p2,30,180+50,0)

curve(p1,p2,30,180+50,0.5)

curve(p1,p2,30,180+50,2)

curve(p1,p2,30,180+50,3)

curve(p1,p2,30,180+50,4.5)

If you would like the curve to be unbalanced, more shaped at one edge and less shaped at the other, you may define this by using BOTH COEFFICIENTS.
You can see how the two control points become closer or farther from points in the following examples:
curve(p1,p2,30,180+50,0.5,1)

curve(p1,p2,30,180+50,3,1)

curve(p1,p2,30,180+50,1,0.2)

Back to top
wave ((point1,point2,...,pointn),angle1,angle2,coefficient)
Draws a smooth path consisting of curves between a set of points.
Function parameters
If the name of a wave is not set in code, the default name is formed as W_firstpoint_lastpoint. E.g. an unnamed wave through points P1, P2, P3, P4, P5, P6 and P7 will get name W_P1_P7.
Names of points can be substituted with function point(x,y) etc. In this case it is mandatory to specify the name of the future arc, as there are no point names to create it automatically (second line of code).
A wave also has direction from first point to second point.
Object properties
After a wave is created, you can get its properties by using the following syntax:
Usage
Angles can be omitted. In this case, the first angle will equal the angle from the first point of a wave to its second point, and the last angle will equal the angle between the last but one point and the last point.
You can use mathematical equations, variables, and size constants in syntax, e.g.
wave((p1,p2,p3),15,45)
w1=wave((point(10,70+sz3),point(p3.x,p4.y),p3),1+90,angle(p1,p2,p3)+[p1:p2].a1,1,2)
By default the system will draw a set of waves that are similar to a French curve, often used in pattern making. However if you would like the curve to be more or less shaped, you can play with the COEFFICIENT. You may set it from 0 (which degrades a curve to a straight line) to any number, but look out for intercrossing.
wave((P1,P2,P3,P4,P5,P6,P7),270,180, 0.5)
 
wave((P1,P2,P3,P4,P5,P6,P7),270,180, 1)
 
wave((P1,P2,P3,P4,P5,P6,P7),270,180, 1.5)

Back to top
convex (point1,angle1,point2,angle2,radius)
Draws a round tip within the given vectors.
Function parameters
If the name of a convex path is not set in code, the default name is formed as X_firstpoint_lastpoint. E.g. an unnamed convex path from points P1 and P2 will get name X_P1_P7.
Names of points can be substituted with function point(x,y) etc. In this case it is mandatory to specify the name of the future arc, as there are no point names to create it automatically (second line of code).
A convex path also has direction from first point to second point.
Object properties
After a convex path is created, you can get its properties by using the following syntax:
Usage
You can use mathematical equations, variables, and size constants in syntax, e.g.
convex(p1,p2,90,25,10)
cx1=convex(point(10,70+sz3),point(p3.x,p4.y),p3),1+90,angle(p1,p2,p3)+[p1:p2].a1,25*4)
Back to top
circle(point,radius,angle, angle)
Draws a circle, or a section of a circle, with center at the named point and of the given radius.
Function parameters
If angles are omitted, a full circle will be drawn. Otherwise, a section of circle between the radius at the first angle and radius at the second angle will be drawn.
If the name of a circle is not set in code, the default name is formed as R_centerpoint. E.g. an unnamed circle around point P1 will get name R_P1.
Object properties
After a circle is created, you can get its properties by using the following syntax:
Usage
You can use mathematical equations, variables and size constants in syntax, e.g.
circle(p1,sz3,line1.a2,180)
The most common use for this function is round corners, as in the example on the right, arc and curve functions do not return a perfect circle shape.
Back to top
path(object1,object2,...,objectx)
Unites several objects into a path.
Function parameters
You can list the following objects within a path: point, line, arc, circle, curve, another path.
In case a point is listed, the software will connect it to the end and start point of the neighbouring objects with a straight line. In case other objects are listed, they will be included into the path as per their direction from start to end point. If you wish to change the direction of any object within a path, list it with a minus sign.
A path also has direction from first point to the last point.
Object properties
After a path is created, you can get its properties by using the following syntax:
Usage
Path comes handy when you have a complex of several objects that you wish to use later in the pattern code. For example, a side seam of a skirt is often a combination of a curve from waist to hip, and a straight line down to hem. If you are drafting a skirt with a yoke, or horizontal pleats, or any other style elements, you might need to get the length of both elements, or cut them at a certain angle from some point on a center seam, or find the place where the side seam intercrosses with another curve. As the lengths of the elements of the side seam are going to vary from size to size and from height to height, the point of intersection may be on the waist/hip curve or on the hip/hem line. Rather than adding extra conditions to the code, it is easier to operate the side seam as one object.
Let us look at two examples of paths, connecting the same points at different directions.
p1=point(10, 10);
p2 = point(45, 60);
p3=point(30,15)
p4=point(65,10)
p5=point(50,25)
c1=curve(p1,p2,10,30) // curve C1 goes from P1 to P2
l1=line(p4,p5) // line L1 goes from P4 to P5
Both c1 curve and l1 curve have directions. This will affect how they are connected into a path.
path1=path(c1,p3,l1)

path2=path(c1,p3,l1)

path3=path(c1,p3,l1)

path4=path(c1,p3,l1)

Back to top
shape (point1,point2,angle1,angle2,length)
Draws a smooth curve between two points at the given angles of the given length.
Function parameters
A curve also has direction from first point to second point.
Usage
It is mandatory to name the new object that you are creating. The created curve will be equally shaped at both ends, which means that both coefficients of the curve will be equal. If the length is longer than the distance between points, the points will be connected with a straight line.
You can use mathematical equations, variables and size constants in syntax, and refer to the lengths of other objects, or implied lines, for example:
topedge=shape(p1,p2,35,45,[p3:p4].l) // see example on the top
This function comes handy when you create darts, pleats, flounces and other style objects and need to keep the same length of both adjoining seams.
While the new curve may be less or more shaped than the original dart, it will still be of the same length, which enables you to connect it to another pattern piece with a seam.
It is also convenient to shape the top of the sleeve cap using the length of an armhole.
If desired, you may include certain percentage for cap ease depending on the fabric you are going to use, and shape the upper curve a bit longer.
Back to top
pattern (name(), trace(), qty(), fabric(), fold(), flip(), grain(), inc(), color(), ,outline(), seam(), extra())
Pattern function creates pattern pieces, and uses many parameters.
This function has the biggest number of options, though many of them can be omitted. We recommend using the code help button and using code template for pattern function under objects (see on the right). Simply click the button to insert this template into code and replace or delete parameters as required.
All parameters are given in brackets and are separated by commas.
You may assign a name to a pattern piece if you plan to refer to it later, e.g. if you plan to apply pleats, mirror or move the pattern piece, however it is not mandatory. In case you need to name the pattern object, use syntax
rightfront=(pattern.....
Function parameters
This parameter is mandatory.
It should be given as a string (text) in quotes, e.g.
name("Front"),
This parameter is mandatory and describes the sequence of objects forming the contour of a pattern piece.
 The objects must be given clockwise and their direction should be taken into consideration. For example if a curve or a line has opposite direction, it should be included with a minus sign, e.g.
trace(p1,curve1,line1,path2),
, just as when describing a continuous path.
 If the objects' ends don't meet, they are connected with straight line. Same happens with a sequence of points. For example to describe a square you only need to mention the corner points, e.g.
trace(p1,p2,p3,p4),
Can be omitted and equals (1,0) by default.
The first number refers to pieces cut as is, the second refers to mirrored pieces. E.g.
qty(1,0),
stands for one piece cut as is, qty(1,1),
stands for 1 piece cut as is and 1 mirrored piece, e.g. right and left front.
 Texts on pattern pieces will be generated accordingly.
 Only one piece will be included into real size print out. Small size printout will have all the pieces, and some of them will be mirrored.
Can be omitted and equals "Self" by default.
 If several fabrics are to be used, they should be separated by comma, e.g.
fabric("Self"),
or fabric("Self, Interfacing"),
.
 The real size printout will only have one piece.
 The small printout will have pieces for both fabrics.
 The lists of pattern pieces for instructions and spec sheet will be generated accordingly.
Can be omitted, is not included by default.
 Make sure you trace the pattern in such a way that the fold line is between the first and the last point of the contour.
 A fold mark is added automatically on the edge.
 If a fold line is mentioned, the text on pieces is generated accordingly, e,g, "cut 1 on fold".
 The piece will have the other half in the small printout, and its area will be calculated as a whole in the spec sheet.
 The software will not draw the second half of a pattern on real size printout, so that fewer sheets have to be printed out.
Can be omitted, is not included by default.
If a shape of a pattern piece is very complex and it is tricky to cut it on fold making sure it stays precise, you may choose to print it out as a whole. You only need to mention the flip line and the software will draw the second half of the pattern piece and include all marks, texts, lines etc, that are present in the first half. In this case the pattern will have both halves traced and printed out in real size and small printouts.
Can be omitted, equals 90 by default.
 You may use math expressions and refer to properties of other objects in this parameter, e.g.
grain([y1:s1].a1+curve1.a2),
 The software will draw a dashed line across the pattern piece and mark it as GRAIN (see above).
You may also describe a sequence of points, and it will be included as a line, or a path if you mention more than 2 points. E.g.
inc(text_center_front,front_hip_mark,(p1,p2),line1),
Can be omitted, equals "coral" by default.
E.g.
color("cyan")
or color("#FF0000")
.
You may also use the color cheat sheet button in the top navigation above the code window. Simply click a color and its name will be inserted at the current position of cursor.
Can be omitted, equals "black" by default.
E.g.
outline("cyan")
or outline("#FF0000")
.
You may also use the color cheat sheet button in the top navigation above the code window. Simply click a color and its name will be inserted at the current position of cursor.Tip: Traditionally, color coding is as follows:
Pattern block fabric  color  
Self  black  
Lining  blue  
Contrast  purple  
Trim  green  
Interfacing  red 
Can be omitted, equals 0 by default.
E.g.
seam(1)
or seam(sas)
The default seam allowance that is added to all edges of a pattern block, except for the edge marked for fold line.
Can be omitted, equals 0 by default.
Defines specific seam allowance between two points along the contour, to be mentioned clockwise. Points can be referred by names or properties of objects, for example:
extra((ls2,l2,sah),(armhole.p1,armhole.p2,0.7))
Tip: Seam allowances depend on the fabric choice and usually are as follows:
Seam allowance  cm  in 
General seaming  1 cm  3/8" 
Tight curves  0.7 cm  1/4" 
Hem by hand, light fabric  1.5 cm  5/8" 
Hem by hand, designer dresses  7.5 cm  3" 
Invisible zipper, light fabric  1.3 cm  1/2" 
Zipper, jackets etc  2 cm  3/4" 
Lower edge of facings  0 cm  0" 
Back to top
flounce(point,length,width,seam allowance)
Returns path for a spiral flounce around the mentioned point, based on desired width and length of flounce. Seam allowance is the distance between spiral curls, so plan for both upper seam and hemming. E.g.:
flounce1=flounce(x2,front_neckline.l,[y1:s1].l*0.2,2)
As you can see, you can refer to lengths of other objects, lengths of imaginary lines and use mathematical functions in the syntax of flounce function.
This path provided by this function is ready to be included into pattern contour, e.g.
pattern(name("Flounce"),
trace(flounce1),
color("white"))
If you desire to create a less curvy flounce we recommend using the spread function.
Back to top
ACTIONS
cut(object,point,angle,newobject1,newobject2)
Splits an objects in two by intersecting it by a line from a given point at a given angle and draws a point there. You may name two resulting objects if you want to use them later.
Function parameters
Usage
p4=cut(c1,p3,170,c11,c12)
Back to top
split (object,length,newobject1,newobject2)
Splits an object into two new objects, following the original object’s direction, and places a point there. The first object begins at the first point of the original object and is of the set length. Can be applied to line, arc, circle, curve and path.
Function parameters
Usage
It is mandatory to name the new point that will be placed on the object. If the names of the new objects are omitted, the function will only place a point at the given length. You can use mathematical equations, variables, object properties and size constants in syntax, e.g.
p3=split(c1,c1.l*0.4,c11,c12)
Back to top
cross(object,object,newobject1,newobject2,newobject3,newobject4)
Draws a point in the place where two objects intercross. If objects intercross twice, only the first point of intersection is returned. Can be applied to lines, arcs, circles, curves and paths. If used in if operator, will return true/false.
Function parameters
Usage
It is mandatory to name the new point that will be placed where the objects intercross. If the names of the four new objects are omitted, the software will only place a point, and not create new objects.
p1=cross(curve1,curve2) // new objects are not named
p1=cross(curve1,curve2,curve11,curve12,curve21,curve22) // 4 new objects created
Back to top
tangent (object,point,parameter,newobject1,newobject2)
Finds a tangent to an object from a given point, places a point on the object in this place, and splits the object into two new objects (optionally). Can be applied to line, arc, curve, path.
Function parameters
 name of object, to which a tangent line is needed
 name of the point, from which we draw a tangent line
 (optional) parameter, which defines whether we search a tangent. Equals 0 by default (clockwise) and can be set to 1 (counterclockwise)
 (optional) name of the first part of the object (from the first point of the object to the new point)
 (optional) name of the second part of the object (from the new point to the last point of the object)
Usage
This function can be used, if you would like to make smooth transition between a line and a curve, for example in a flared skirt.
Imagine that the point in this function is clock center and there’s a minute hand that moves around until it runs into the object. By default, the minute hand moves clockwise, however you can set it to counterclockwise by assigning 1 to the third parameter.
In the example of the right, the front dart of the skirt has been closed, and the designer decided to add flare to the skirt. As a result, the edge of the skirt was broken at the point P72m (see the dashed line). To automatically smooth the side edge, we can use:
ptan=tangent(side,p82n,1,upside,downside)
// in this case we want the tangent to fall onto side seam counterclockwise, hence the third parameter equals 1.
Back to top
copy((objects),suffix or (new objects))
Creates copies of one or several objects.
Function parameters
Usage
If suffix is omitted it equals "_c" by default.
copy((point1))
// returns point1_c in the same place where point1 is now, and point1 stays in placecopy((point1,point2),"n")
// returns point1n, point2n and point1 and point2 stay in place
copy((point1,point2),(point11,point12)
// returns point11, point12 and point1 and point2 stay in place
Back to top
delete (object1,object2,...,objectx)
Deletes objects.
Function parameters
Sometimes when you code a pattern you create temporary or accessorial points, lines and other objects. They are vital while you move through the first steps of drafting your pattern, but at some point there are simply too many objects in the screen.
At this step you may choose to delete these abundant objects, in case you don’t need them later in the pattern drafting process and the code.
You may refer to these objects BEFORE you deleted them, i.e. higher in the code body, but not AFTER you have deleted them, i.e. lower in the code.
Back to top
rename (object1,object2,...,objectx)
Renames objects.
Function parameters
If you need to change the name of an object, you can rename it using this function. The previous name will be then deleted and only the new name will be available for further actions with the object.
You may refer to these objects BEFORE you renamed them, i.e. higher in the code body, but not AFTER you have renamed them, i.e. lower in the code.
Back to top
along (object,distance,side)
Creates a new path along an existing object path at the given distance all along the path.
Function parameters
Usage
This function may come handy when creating facings, or an edge of outer stand up collar at 0.3 mm from the inner one, etc.
The start and end points of the along path are created at perpendiculars to the angles of the reference object. In the example on the right the first angle of the curve is 85 degrees, and the starting point of along path, highlighted in purple, is at 85+90 degrees from point P1, at exactly 3 cm. The second angle of the curve is 180, and the second point of the along path is placed at 18090 degrees from P2, at exactly 3 cm. The other points of the along path are placed in a similar way and are always at exactly 3 cm from the curve. In this example we need the along path to pass on the right from the original curve, so the third parameter is set to 2.
front_facing=along(front_neckline,3,2)
Back to top
adjust (curve1,curve2)
Adjusts the lengths of two curves so that they are equal.
Function parameters
Usage
The difference in lengths of the two curves is divided by two and is added to the length of the shorter curve, and distracted from the length of the longer curve. The difference is then spread between the two lengths equally. In the example on the left the original curves are shown in dashed lines, while the resulting curves, both of the same lengths, are shown in solid lines.
adjust(c1,c2)
Back to top
reshape (curve,length)
Adjusts an existing curve to the given length.
Function parameters
Usage
The existing curve will be deleted and then there will be drafted a new curve with the same name, at the same points and angles, but with a different length and thus with new coefficients. In the example on the left the original curve is dashed, and the resulting curve is solid.
reshape(c1,c1.l*1.25)
// adding 25% to the length of the curve
Back to top
convert (objects)
Converts an object or several objects into curve(s) with the same starting/ending points and angles, and of the same length.
Function parameters
Usage
The existing object(s) will be deleted and then there will be drafted a new curve with the same name, at the same points and angles, with the same length and with equal coefficients.
convert(path1,path2)
// converting path1 and path2 into curves
Back to top
TRANSFORMATIONS
invert (objects)
Inverts the mentioned objects and keeps the type of the objects intact.
Function parameters
Usage
The existing object will be deleted and then there will be drafted a new object with the same name, at the same points and angles, and with the same coefficient in the case of a curve  but in the inverted direction.
invert(curve1,arc1,path2,circle3,wave1)
// inverting objects
Back to top
move((object1,object2,...),line,(newobject1,newobject2))
This function moves the named objects at a given distance at the given angle.
Function parameters
Usage
This function is often used when drafting collars, sleeve cuffs, etc. For example, you may want to move the shoulder line and the neckline line to an empty space in the visual pattern design window and have a more clear picture of what you are doing, instead of working over a set of other objects and points you might have had on the front piece.
There are several variants of using the function and naming the moved objects.
If you just want to move objects and don't need to keep the original ones, leave the third parameter blank:move((neckline,shoulder,center), 60)
 
If you would like to keep both the original and the moved objects, you have two options:  
1) Name all new objects one by one, in the same order as the original objects, e.g.:
move((neckline,shoulder,center), 60, 0,
 
2) Create a suffix for new objects that will be automatically added to the names of existing objects, e.g.:move((neckline,shoulder,center), 60, 0, ”n”)

Back to top
shift((object1,object2,...),line,(newobject1,newobject2))
Moves objects along a reference line.
Function parameters
This operator moves the named objects following a vector determined by a line.
Usage
If you just want to move objects and don't need to keep the original ones, leave the third parameter blank, e.g.:
p1=point(10,10);
p2=point(50,50);
curve(p1,p2,0,90)
l1=line(point(60,10),point(50,20))
shift((p1,p2,c_p1_p2),l1)
See example on the right
If you would like to keep both the original and the moved objects, you have two options:
1) Name all new objects one by one, in the same order as the original objects, e.g.:
shift((p1,p2,c_p1_p2),l1,(p3,p4,newcurve))
2) Create a suffix for new objects that will be automatically added to the names of existing objects, e.g.:
shift((p1,p2,c_p1_p2),l1,"n")
Back to top
rotate((object1,object2,...),point,angle,(newobject1,newobject2))
Rotates objects around a given point at a given angle. This operator comes very handle for darts manipulation, draping, etc.
Function parameters
Usage
If you just want to rotate objects and don't need to keep the original ones, leave the third parameter blank, e.g.:
p1=point(10,10);
p2=point(50,50);
curve(p1,p2,0,90)
rotate((c_p1_p2),p2,10)
See example on the right
If you would like to keep both the original and the rotated objects, you have two options:
1) Name all new objects one by one, in the same order as the original objects, e.g.:
rotate((p1,p2,c_p1_p2),p2,10,(p3,p4,newcurve))
2) Create a suffix for new objects that will be automatically added to the names of existing objects, e.g.:
rotate((p1,p2,c_p1_p2),p2,10,"n")
Back to top
mirror((object1,object2,...),line,(newobject1,newobject2))
Mirrors objects against a reference line.
Function parameters
This operator mirrors the named objects against a reference line. This means that the new objects will have mirrored shape, and will be at the same distance from the reference line as the original objects. Please mind the point sequence and angles after applying the operator.
Usage
If you just want mirrored objects and don't need to keep the original ones, leave the third parameter blank, e.g.:
mirror((c_p1_p2),l1)
If you would like to keep both the original and the mirrored objects, you have two options:
1) Name all new objects one by one, in the same order as the original objects, e.g.:
mirror((p1,p2,c_p1_p2),l1,(p3,p4,newcurve))
2) Create a suffix for new objects that will be automatically added to the names of existing objects, e.g.:
mirror((p1,p2,c_p1_p2),l1,"n")
Back to top
scale((object1,object2,...),times,angle,(newobject1,newobject2))
Scales objects by x times along the given angle. Very handy for designing patterns from stretchy fabrics.
Function parameters
Usage
If you want to scale objects horizontally and don't need to keep the original ones, leave the third and forth parameter blank, e.g.:  If you would like to scale objects at a different angle (diagonally, vertically), add the third parameter  degree in angles. 
scale((neck,armhole,side,centerback),0.9)  scale((neck,armhole,side,centerback),0.9,90) 
If you would like to keep both the original and the rotated objects, you have two options:
Name all new objects one by one, in the same order as the original objects, e.g.:  OR create a suffix for new objects that will be automatically added to the names of existing objects, e.g.: 
scale((neck,armhole,side,centerback,p4),0.8,0,  scale((neck,armhole,side,centerback,p4,p3,g),0.8,0,"n") 
Back to top
spread ((object1,....objectx),inner,outer,angle1,angle2,(newobject1,...newobjectx)
This operator enables you to apply tapered spread to the listed objects.
Function parameters
 list of the objects tracing the contour of the piece you want to spread, in brackets and separated by commas
 the name of one of the listed objects that will be used as the inner part of spread *
 the name of one of the listed objects that will be used as outer part of spread *
 the angle, at which you wish to spread the objects to the left, as viewed from the inner side towards lower side
 the angle, at which you wish to spread the objects to the right, as viewed from the outer side towards lower side
 (optional) list of new objects in brackets, separated by comma OR name suffix for new objects in double or single quotation marks
* Can be point, line, arc, curve, circle, path. Multiple objects should be united into one path.
Usage
In tapered spread on paper, a pattern piece is usually cut into multiple stripes, and then these stripes are spread apart to obtain more flared shape. The ends of the stripes along the inner side stay together, while the ends of the stripes along the outer edge move apart at the same distance. The sides of the pattern piece remain of the same shape and length.
Function spread emulates this process automatically. To better understand how it works, imagine cutting your piece into stripes, and placing it so that the inner side of the pattern piece faces you (see below).
Now you can pull one side of the pattern piece to the left, and the other side to the right. It is important to spread out the stripes evenly. It is desirable to avoid edgy contours on the resulting inner and outer sides, and the software will smooth these for you. In the picture below you may see the red and green smooth curves that will be the result of applying this function. It is important to keep the inner edge of the spread of the same length, as most likely it will then be sewn to another pattern piece. This is also taken care of and you can always be sure that the resulting inner path (in green) is exactly of the same length as the length of the inner side of the original piece.
However depending on your style you may want the resulting piece to be more flared on one side, and less flared on the other side. A good example would be half piece of back skirt, that you wish to flare, for example, mostly towards the side seam, and just a bit towards the center seam.
In function spread, you determine the degree of flare on the each side by setting the left flare angle and the right flare angle. These angles should always be positive values, e.g. 10, and not 10, as we are adding flare. If you set the angles to 0, the piece will remain the same. The maximum flare allowed is 360 degrees in total, e.g. 180+180 or 10+350 etc. Let us see at how these variations work for a rectangular piece:
left angle=70, right angle=0  left angle=0, right angle=70  left angle=20, right angle=50 
Syntax
Syntax of this function is somewhat more difficult than for the other ones.
 The order of the objects in the first parameter should be given in clockwise order. It is better to start with the inner object. It should be followed by the objects considered to be “left”, then by the object to be used as outer side, and then by the objects considered to be “right”. You may use multiple objects for left side and right side. However you can use only one object as inner side, and only one object as outer side. Use minus sign to change direction if required (see also path).
 If you wish to mention complex contour for the inner side, you need to unite it into one complex path. The inner side can be referred to with only one name. Same goes for outer side.
 After you have finished listing your objects in the first parameter, you need to rewrite the name of the object that is to be used as inner side again, in the second parameter. So you will actually mention the name of the inner object twice in the same function, and this is okay.
 Same goes for the object to be used as outer side.
 Names of the resulting objects, or suffixes, work in exactly the same way, as for functions move, mirror, rotate, scale. In case you decide to name the new objects manually, the number and the order of the new objects in the last parameter should be exactly the same, as the number and order of the original objects in the first parameter.
For example in the following line of code:
spread((curve1,line1,line2,curve2,line3,line4),curve1,curve2,30,10,”n”)
 The object curve1 will be used as inner side as its name is mentioned again in the second parameter of the function.
 The object curve2 will be used as outer side as its name is mentioned again in the third parameter of the function.
 The objects line1 and line2 are mentioned between inner and outer objects, so they are considered to be on the “left” side of the future spread.
 Objects line3 and line4 are mentioned between outer and inner objects, so they are considered to be on the “right” side of the future spread.
 The suffix “n” in the last parameter means that a set of new objects will be created for the spread piece. In this new set of objects curve1n will correspond to curve1, line1n will correspond to line1, etc. The original objects will stay.
 The only corresponding objects that will have different lengths are curve2 and curve2n (the outer sides). All other corresponding objects will have equal lengths, however their position is likely to be different.
Once again, the last parameter works as follows:
 Not mentioned at all  you’ll get only the spread objects with the same names.
 Suffix in quotations  the original objects stay, and the new objects are automatically named with this suffix at the end of the name of the original object (“n” suffix: curve1 > curve1n)
 Names listed in brackets  the original objects stay, the spread objects get the listed names.
Back to top
crop (object1,object2,object3)
This function helps to crop an object against two other objects, or imaginary lines.
Function parameters
 object to be cropped
 border object *, or imaginary line
 the other border object *, or imaginary line
* Can be point, line, arc, curve, circle, path. Multiple objects should be united into one path.
Usage
If the object to be cropped crosses both borders, it will be shortened. If it doesn't cross one or two borders, it's end will be prolongated along the corresponding angle at the end of the object, and a straight line will be drafted until it crosses the border.
For example:
C_P5_P6=curve(P5, P6, 320, 160)
L_P1_p2=line(P1, p2)
L_P3_P4=line(P3, P4)
crop(C_P5_P6, L_P1_P2, L_P3_P4)
BEFORE CROP  AFTER CROP 
Case 1  the object crosses both borders  
Case 2  the object crosses one of the borders  
Case 3  the object doesn't cross any of the borders  
Back to top
magnet ((object1,object2...),object2,object3,,(newobject1,newobject2...))
Moves and rotates objects against two reference lines in such a way, that the two lines would be aligned, their start points at the same place, and their end points along the direction of the 2nd line.
Function parameters
 list of objects in brackets, separated by comma
 reference line, or imaginary line of two points
 reference line, or imaginary line of two points
 (optional) list of new objects in brackets, separated by comma OR name suffix for new objects in double or single quotation marks
Usage
For example, magnetising back neckline from back shoulder to front shoulder will result in moving and adjusting the back neckline to front shoulder (e.g. for tracing a collar). If you want to use only the transformed objects and don't need to keep the original ones, leave the suffix blank. Otherwise, add a suffix for automatic naming (e.g. "g").
For example:
magnet((back_neckline), [P3:P5], [P4:P6])
magnet((back_neckline), [P3:P5], [P4:P6],"n")
magnet((back_neckline), [P3:P5], [P4:P6],(back_front_neckline)
Back to top
pleat(pattern, point, depth, angle, side)
Creates a pleat on a whole pattern starting from a point on its contour, of the mentioned width. The direction of the fold is determined by angle. Sides can be 1 (single pleat to the left) or 2 (single pleat to the right).
Function parameters
 name of a pattern piece
 name of a point inside the pattern or on its contour
 desired depth of the pleat
 angle at which the fold line of the pleat should cross the pattern piece
 side  1 stands for single pleat to the left, 2  single pleat to the right, 3  box pleat to the left, 4  box pleat to the right.
Usage
In case you wish to apply pleat function, you need to give a name to your pattern piece.
In this case you should write the name of the pattern, equation sign and then the
pattern
function, or you may hover a pattern piece after it's been created and read the automatically assigned name in the popover. For example:
triangle=pattern(name("Triangle"),
trace(p1,p2,p3))
We can now create some pleats.
pleat(triangle,p4,3,90,1)  pleat(triangle,p4,3,90,2) 
Back to top
MATHEMATICS
round(x,precision)
Rounds a float.
Function parameters
Usage
var1=round(6.34)
// returns 6var1=round(6.34,1)
// returns 6.3
Back to top
sin(angle)
Returns sine of an angle.
Function parameters
Back to top
cos(angle)
Returns cosine of an angle.
Function parameters
Back to top
tan(angle)
Returns tangent of an angle.
Function parameters
Back to top
asin(x)
Returns arcsine (in degrees).
Function parameters
Back to top
acos(x)
Returns arccosine (in degrees).
Function parameters
Back to top
atan(x)
Returns arctangent (in degrees).
Function parameters
Back to top
sqrt(float)
Returns square root of a float.
Function parameters
Usage
var1=sqrt(4)
// returns 2var1=sqrt(9)
// returns 3
Back to top
pi
Returns approximation of PI.
Usage
length_of_circle=radius*pi
Back to top
angle(point1,point2,point3)
Returns angle in degrees in a triangle formed by the mentioned three points, the second point being the angular point. The returned angle is always a positive value.
Function parameters
Usage
dart_angle=angle(p11,p1,p21);
// variable dart_angle equals the angle in degreesp2=apply(p1,sz3*0.5+var3,angle(p11,p1,p21));
// function used inside another one
Back to top
bisect(point1,point2,point3)
Returns internal bisection angle in degrees in a triangle formed by the mentioned three points, the second point being the angular point. The returned angle is always a positive value.
Function parameters
Usage
angle1=bisect(p1,p2,p3);
// variable dart_angle equals the angle in degreesp21=apply(p2,[p2:p1].l,bisect(p1,p2,p3));
// function used inside another one
Back to top
abs(float)
Returns absolute value of a float (always positive)
Function parameters
Usage
var1=abs(8)
// returns 8var2=abs(sz1*(24))
// returns 600 if sz1 = 100
Back to top
STYLING
mark (point,angle,type,length,width)
Places a mark at the given point at the given angle. You can choose type of the mark and its length and width, or use text as mark and mention its size.
Function parameters
Usage
If the name of a mark is not set in code, the default name is formed as M_point. You can use mathematical equations, variables, object properties and size constants in syntax.
mark1=mark(p1,90)
// the type of mark is MARK_T, length and width equal 1 cmmark2=mark(p1,0,mark_arrow,2,2)
// an arrow mark at the center of the point
mark3=mark(p1,0,”ABC”,2)
// a notch and text ABC next to the point
Please observe the types of mark used in Sewist Pattern Designer and their position against the point. The angle is set to 0 in all the examples below. Length and width are set to equal values.
MARK_T
 MARK_ARROW
 MARK_CIRCLE
 MARK_SQUARE

MARK_LOOP
 MARK_CROSS
 MARK_DELTA
 MARK_DASH

MARK_DIAMOND
 MARK_ARROW
 MARK_FOLD
 MARK_APEX

MARK_PLEAT_INNER
 MARK_PLEAT_OUTER
 MARK_PLEAT_RIGHT
 MARK_PLEAT_LEFT

You may also use any text for mark, mentioning it as a string in quotations instead of the mark type. In this case the 4th parameter, length of mark, is understood as text size (see mark3 above). The 5th parameter is then ignored. Sewist Pattern Designer will draw a tiny notch to the point, and the text will be centered against it. In general, special html symbols like the ones below are accepted. Your imagination is the limit!
☺ ✽ ✿ ❀ ☼ ☀ ☂ ☃ ❄ ♪ ♫ ♩ ♬ ø ⚇ ⚉ ❅ ϟ ☐ ☒ ✇ ✖ ☟ ✣ ❋ ✦ ✧ ☆ ✪ ✬ ✡ ★ ✴ ✶ ✱ ✲ ♤ ♧ ♡ ♢ ♠ ♣ ♥ ♦ ♔ ♕ ♖ ♗ ♘ ♙ ♚ ♛ ♜ ♝ ♞ ♟ ⚀ ⚁ ⚂ ⚃ ⚄ ⚅ ⚇ ⚑ ⚐
Back to top
type (text,point,angle,textsize)
Creates a new object that contains text, written next to the given point at the given angle of the given size.
Function parameters
Usage
If the name of a text variable is not set in code, the default name is formed as T_point. You can use mathematical equations, variables, object properties, size constants in syntax, e.g.
newtext=type(“Here goes text”,P1,[P1:P2].a1,3)
// see example aboveIt is important to remember that this function will type exactly the symbols that you have placed in the quotations. Sometimes you wish to place numeric information on a pattern piece, for example length of the zipper required.
You have probably calculated it in the code, for example
ziplength=round(side.l*0.9,1)
// length of zipper equals 90% of the length of object named side, and the result is rounded to point, one decimalDepending on the size measurements, this number will be different, e.g. it may be 13.7 for S size, and 15.1 for XXL size. We would like this information to be printed on the pattern. If we code
ziptext = type(“Minimal zipper length is ziplength cm”,P1),
the software will not understand that we are referring to a numerical variable here. The result will be as on the right.
This is not exactly what we want, so let us take the variable out of the quotation marks, and append it to the string parts of the text with + signs, as below. You will also see that string parts and numerical values now have different colors in code editor window.
ziptext = type(“Minimal zipper length is”+ ziplength + “ cm”,P1),
The software will append the first part of text to the variable and to the last part of text, and print the result. When your pattern is graded, this text will be updated automatically.
Back to top
dash (object1,object2,...,objectx)
Makes objects dashed.
Function parameters
Usage
This function is useful when you want to style some of the lines on your pattern, e.g. front center line e.g.
dash(center_front,down_side)
// see example on the right
Back to top
dot (object1,object2,...,objectx)
Makes objects dotted.
Function parameters
Usage
This function is useful when you want to style some of the lines on your pattern, like area where you need to ease in a sleeve cap, etc. E.g.
dot(cap2,cap3)
Back to top
solid (object1,object2,...,objectx)
Makes objects solid again.
Function parameters
Usage
This function is useful when you want to style some of the lines on your pattern back to solid lines.
solid(cap2,cap3)
Back to top
comment (string)
Prints a comment in electronic book.
Function parameters
Usage
This function is useful when you want to add a text of your own to the electronic book.
comment("We now pass to dart manipulation".)
Back to top
PROGRAMMING
template("alias")
This function you insert another pattern code into a new project.
You may use existing templates coded by Sewist staff or templates coded by community and marked public.
If you are not happy with the offered basic construction, you may create your own code and save it as template by using the settings button .
You may choose to make your template public or reserve it for your own use. If you make your pattern code public, others will be able to see the code, but not edit it. They will also be able to create a copy of the code and adapt it to their use.
In case you make a template public and hide the code, other users will only be able to use the reference to this template, but they won't see the code and won't be able to create a copy of it.
To insert a template, place cursor in the code window at the place, after which you wish to insert a template.
Click the template button in top panel and select the template you wish to insert.
Redraft pattern by clicking or .
Pay attention to console right below the code window. In many cases the template will post some information there letting you know what settings you might tweak, e.g.
Back to top
grade(size name,(size value,float),(size value, float))
Defines a number variable depending on the mentioned size constant. The number is changed according to arithmetic progression.
Function parameters
Usage
This function is applied when you want to define numeric values depending on the size, but you can't do it by simply taking a percentage of size or through other mathematic operations. For example, you don't want bust ease to always be 5% of the bust girth, as it will be too little for small sizes and too much for big sizes. Let's say you want the ease to be around 5 for smaller sizes, around 6 for medium sizes and around 7.5 for larger sizes. You can thus define your variable through grade function, referring to value of sz16 (bust girth) and setting several limits so that the value will be changed within these.
If you set ea16 through grade function:
ea16=grade(sz16,(40,5),(80,5),(90,6),(100,6),(150,7.5))
the variable will be calculated in the following way:
value of sz16  value of ea16 
40  5 
...  5 
43  5 
...  5 
57  5 
80  5 
value of sz16  value of ea16 
80  5 
81  5.1 
82  5.2 
83  5.3 
84  5.4 
85  5.5 
86  5.6 
87  5.7 
88  5.8 
89  5.9 
89.5  5.95 
90  6 
value of sz16  value of ea16 
90  6 
...  6 
92  6 
...  6 
96  6 
100  6 
value of sz16  value of ea16 
100  6 
101  6.03 
102  6.06 
103  6.09 
104  6.12 
105  6.15 
.....  
120  6.6 
.....  
130  6.9 
.....  
150  7.5 
Back to top
info (objects, strings, variables)
Output strings, values of variables, or information about objects in console.
Function parameters
Usage
Whenever you are unsure about something, try having a look at it in console. You can mention properties of object, and even ask the program about size variables, for example:
p1=point(10,10)
p2=apply(p1,15,10)
l1=line(p1,p2)
c1=curve(p1,p2,10,10)
info(p1,p2,l1,c1,l1.l,c1.a1,sz13)
See example on the right.
Back to top
end
Terminates execution of the code.
Usage
Sometimes when you code a big pattern, and change the code later on, some parts of it may stop working and it is difficult to guess exactly which ones. In this case you may either comment pieces of codes (but you would have to uncomment them later) or simply write
end
anywhere in the code. The software will execute all functions above end
and will not even consider whatever is written below. Warning  watch the loops and if constructs when putting end
in the middle of them,
so that the structure is well closed by the {}
brackets.
Back to top
if (expression) else
The if construct is one of the most important features of many languages. It allows for conditional execution of code fragments.
If the expression is TRUE, Sewist will execute the mentioned actions, and if it is to FALSE  it'll ignore it.
Usage
The following example would display message "a is bigger than b" in console if a is bigger than b:
if (a > b)
info("a is bigger than b")
If you want to tell the program what to do in case the statement is TRUE, and also what to do if the statement is FALSE, you can use
else
:
The following example would display message "a is bigger than b" in console if a is bigger than b, and it will display "b is bigger or equals a" in the opposite case:
if (a > b)
info("a is bigger than b")
else
info("b is bigger or equals a")
Often you'd want to have more than one actions to be executed conditionally. Of course, there's no need to wrap each statement with an if clause. Instead, you can group several statements into a statement group.
For example, the following example would display message "a is bigger than b" in console if a is bigger than b, and would then assign the value of a into b:
if (a > b)
{
info("a is bigger than b")
b=a
}
If statements can be nested infinitely within other if statements, which provides you with complete flexibility for conditional execution of the various parts of your pattern algorithms.
Back to top
no (variable or object)
Determine whether a variable or an object exist, i.e. were defined before in the code.
Usage
if(no(flare_angle)) flare_angle=4
In the piece of code above we have checked if the variable
flare_angle
has been defined previously in the code. If it has not been defined, we assign its value to 4. Otherwise, it will not be changed and will remain the same as defined previously.
Back to top
for (i=1,i<5,i++)
Programming a loop. Expressions can be separated by commas or by semicolon.
Function parameters
This is usually referred to as working with the loop counter. First, set the initial value of the counter. Then decide, how many times you want to run the loop at maximum. Then decide, how the counter will be changed at the end of each loop run. The most usual way is to add plus one, which is written as
i++
. This is the easiest way to work with loops, but not the only possible one.
Usage
Loops are handy when you want to program repeating actions. For example, you want to find the position of points that would let you draft a curve of a given length.
You know that the length of the curve should be 15 cm. You have defined points P1 and P2 at 15 cm apart from each other, but that would let you draft a line between them, not a curve. That's not what you want, so you are going to move the points closer until you are able to draft a curve between them, that is no longer than 15 cm. You are going to make the point closer by 0.2 cm every time. However, you don't want to make this an endless process, you are going to try say 10 times, and then stop executing these actions.
Let us look at this piece of code:
for (i=1,i<10,i++)
{
p2=apply(p2,0.2,[p2:p1].a1)
c1=curve(p1,p2,110,0)
if(c1.l<15)
break
else
continue
}
Let us see what the program will do step by step. Once it encounters the
for
loop, it looks at the first expression i=1
and executes it. Thus it creates a variable i
and assigns it to 1. It will then enter the block of code within {}
brackets. The software will move p2 by 0.2 cm towards p1. It will then draft a curve between p1 and p2. Then it will check if the length of the curve is less than 15 cm. If it is less than 15 cm, the software will jump out of the loop and move on to the next code we have written in the algorithm. This is what the
break
operator lets us do. Otherwise it will continue working within the
for
loop. In the example above we have described this with operator continue
.
Once all the statements are executed, Sewist will look at the third expression in the
for
description. It says i++
and this means we should plus 1 to the current value of i. So i
now equals 1+1=2.
Now Sewist looks at the second expression in the
for
description, which is i<10
. This condition says that i
should stay less than 10. At the moment it equals 2, so we can run the loop once again.
Sewist will continue running the loop, executing the described actions, then adding plus 1 to
i
, and then checking condition. Once it has run the loop for 10 times, i
will equal 11. The system will look at the second condition in for
description and realise that it is not met. This is when the software will stop running inside the loop and will proceed with the rest of the code in the algorithm.
We can see the result of this code on the right. The software had to run through the loop 7 times until the position of the points allowed to draft a curve that was less than 15 cm. The resulting curve is highlighted in the screen.
Back to top
break
Ends execution of the current for, foreach, while, dowhile or switch structure.
Usage
for(i=0,i<10,i++)
{
p1=apply(p1,10,0)
if(p1.x>100)
break
}
Back to top
continue
Used within looping structures to skip the rest of the current loop iteration and continue execution at the condition evaluation and then the beginning of the next iteration.
Usage
for(i=0,i<10,i++)
{
p1=apply(p1,10,0)
if(p1.x>100)
break
else
continue
}
Back to top