1
0
Fork 0

feat(markdown): Ported code howtos to v3

This commit is contained in:
Joost De Cock 2022-10-12 14:42:45 +02:00
parent d1edf93750
commit af99d3e8c0
25 changed files with 451 additions and 636 deletions

View file

@ -1,29 +1,21 @@
---
title: Storing the seam length to use in another part
for: developers
about: Shows how to store a seam length so you can true the seam of another part
---
<Note>
##### See this example in our source code
- [designs/aaron/src/front.js](https://github.com/freesewing/freesewing/blob/3ca5d0edfe54c7ac20aaf3af2f3544aee72f9b99/designs/aaron/src/front.js#L103)
</Note>
Often when designing patterns, we need to _true a seam_ which means to make sure
that two parts that need to be joined together are the same distance.
The example below is from Aaron and stores the length of the armhole seam:
```js
// Store length of armhole and neck opening
store.set(
'frontArmholeLength',
new Path()
.move(points.armhole)
.curve(points.armholeCp2, points.strapRightCp1, points.strapRight)
.length()
)
```mjs
// Store length of armhole and neck opening
store.set(
'frontArmholeLength',
new Path()
.move(points.armhole)
.curve(points.armholeCp2, points.strapRightCp1, points.strapRight)
.length()
)
// Seam length is now available in other parts via:
store.get('frontArmholeLength')
```