
This is a flat (without history) import of (some of) the content from our markdown module. We've imported this without history because the repo contains our blog posts and showcases posts content prior to porting them to strapi. Since this contains many images, it would balloon the size of this repo to import the full history. Instead, please refer to the history of the (archived) markdown repo at: https://github.com/freesewing/markdown
2.1 KiB
title | order |
---|---|
De omtrek van het slabbetje schetsen | 190 |
Nu we een halsopening gemaakt hebben, is het tijd om de omtrek van het slabbetje te schetsen:
let width = measurements.head * options.widthRatio;
let length = measurements.head * options.lengthRatio;
points.topLeft = new Point(
width / -2,
points.top.y - (width / 2 - points.right.x)
);
points.topRight = points.topLeft.shift(0, width);
points.bottomLeft = points.topLeft.shift(-90, length);
points.bottomRight = points.topRight.shift(-90, length);
paths.rect = new Path()
.move(points.topLeft)
.line(points.bottomLeft)
.line(points.bottomRight)
.line(points.topRight)
.line(points.topLeft)
.close();
Eerst hebben we de variabelen voor breedte (width
) en lengte (length
) aangemaakt om onszelf wat typwerk te besparen:
let width = measurements.head * options.widthRatio;
let length = measurements.head * options.lengthRatio;
Zowel de lengte als de breedte van het slabbetje zijn een factor van de hoofdomtrek. Op die manier past het formaat van het slabbetje zich automatisch aan. Grotere baby? Groter slabbetje. De gebruiker kan de lengte en breedte aanpassen door te spelen met de opties die je aan het patroon hebt toegevoegd.
Zodra we onze variabelen hebben ingesteld, voegen we een paar nieuwe punten toe en een tweede pad met de naam rect
.
points.topLeft = new Point(
width / -2,
points.top.y - (width / 2 - points.right.x)
);
points.topRight = points.topLeft.shift(0, width);
points.bottomLeft = points.topLeft.shift(-90, length);
points.bottomRight = points.topRight.shift(-90, length);
paths.rect = new Path()
.move(points.topLeft)
.line(points.bottomLeft)
.line(points.bottomRight)
.line(points.topRight)
.line(points.topLeft)
.close();
We berekenen het punt topLeft
zodat de bovenkant van het slabbetje en de zijkanten op dezelfde afstand liggen van de halsopening.
Dat was niet echt nodig. Maar het ziet er wel mooi evenwichtig uit: