## Angle d'une ligne virtuelle

.a1
.a2
point
apply
meet
virtual line
We have drafted a basic grid for our future skirt, defined waist, hips and hem level, and even redefined the upper edge of the side seam. We can now proceed to drafting darts.

First, let us find the back and front corners of the side seam at the waist level. I simply apply half of the side dart towards back and towards front.

The front corner of side seam lies in between W and W1, in fact, it is on an virtual line between W and W1, `[w:w1]`

To refer to the angle of an virtual line between two points we can use property `.a1`, so `[w:w1].a1`.

// side darts
`ws1=apply(w,side_dart/2,[w:w1].a1)` //front upper edge of the side seam
[w:w1].a1 is the angle between W and W1
`ws2=apply(w,side_dart/2,[w:w2].a1)` //back upper edge of the side seam
[w:w2].a1 is the angle between W and W2

Let's proceed to the back dart. I am going to use `point` function to define the position of its bottom corner against other points on the grid. The bottom corner of the back dart, R2, will be further to the right, than W2, and lower, than W2. We shall be adding both to X and Y coordinate of W2.

`r2=point(w2.x+[h2:h].l*back_dart_pos,w2.y+back_dart_length)` // bottom corner of back dart

Horizontally, or along X axis, R2 further than W2 by the width of back skirt multiplied by the coefficient of 0.55, that we saved into a variable `back_dart_pos`.
Vertically, or along Y axis, R2 is lower than W2 by `back_dart_length`, also defined in the settings.

The top corner of this dart is upwards, but we can't simply draw a point right above R2, as the dart will be shifted to side seam, and we won't be able to sew it up properly. A back dart is a bit slanted to center back. In fact, it is perpendicular to the future waist of the skirt.

The point we are looking for will be on a line between center back waist point - W2, and side waist point - WS2. And it will be at the right angle to R2. This drafting situation is where we use the command `meet`. And in order to refer to the angle between W2 and WS2 we can use the angle property .a1 of an virtual line - so `[w2:ws2].a1`.

`R1 = meet ( w2, [w2:ws2].a1, r2, [w2:ws2].a1 - 90 )` // upper corner of back dart
[w2:w].a1 is the angle between W2 and W
[w2:w].a1-90 is the angle between these two points MINUS 90 degrees, which moves the direction counterclockwise

We can now place points at both sides of the back dart.

`r120= apply ( r1, back_dart/2 ,[r1:w2].a1 )` // side of back dart that is closer to center back
Half of the back dart - its depth - is applied from R1 towards W2.

`r110=apply(r1,back_dart/2,[r1:ws2].a1)` // side of back dart that is closer to side seam
Half of the back dart - its depth - is applied from R1 towards WS2.

I shall repeat a similar process for the front dart, and will save the length explanations this time.

// front dart
`v2 = point ( w1.x - [h1:h].l * front_dart_pos, w1.y + front_dart_length )` // bottom corner of front dart
To move to the left, we subtract from X coordinate

`v1 = meet ( v2, [w1:ws1].a1 + 90, w1, [w1 : ws1].a1 ) ` // upper corner of front dart
To move an angle clockwise, we ADD degrees.

`v120=apply(v1,front_dart/2,[v1:ws1].a1)`
`v110=apply(v1,front_dart/2,[v1:w1].a1)`

And the result is:

It will look like a skirt pattern pretty soon.

# Article précédent

Redéfinir les objets du patron de couture

# Retour à la catégorie

Commandes pour patrons

# Article suivant

Line (point, point)