1
0
Fork 0

Merge pull request #4010 from BenJamesBen/cutonfold-doc

fix(docs): (cutonfold,grainline) Update docs to reflect new behavior
This commit is contained in:
Joost De Cock 2023-05-22 09:43:14 +02:00 committed by GitHub
commit 42299d76f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 6 deletions

View file

@ -48,21 +48,34 @@ macro('cutonfold', {
| `to` | | [Point](/reference/api/point) | The endpoint of the _cut on fold_ indicator |
| `margin` | 5 | [Point](/reference/api/point) | The distance in % to keep from the start/end edge |
| `offset` | 15 | Number | The distance in mm to offset from the line from start to end |
| `prefix` | | String | A prefix to apply to the names of the generated path and points |
| `prefix` | 'cutonfold' | String | A prefix to apply to the names of the generated path and points |
| `grainline` | `false` | Boolean | Whether this cutonfold indicator is also the grainline |
## Result
| Generated Element | Description |
|------|-------------|
| `paths.cutonfold${prefix}` | The Path for the _cut on fold_ indicator |
| `points.cutonfoldFrom${prefix}` | Point used to create the path |
| `points.cutonfoldVia1${prefix}` | Point used to create the path |
| `points.cutonfoldVia2${prefix}` | Point used to create the path |
| `points.cutonfoldTo${prefix}` | Point used to create the path |
| `paths.${prefix}Cutonfold` | The Path for the _cut on fold_ indicator |
| `points.${prefix}From` | Point used to create the path |
| `points.${prefix}Via1` | Point used to create the path |
| `points.${prefix}Via2` | Point used to create the path |
| `points.${prefix}To}` | Point used to create the path |
## Notes
### Place outside `complete`
The `cutonfold` macro should be placed outside of `complete` blocks
in the part's draft method.
This is because it provides information about the part's foldline and
possible grainline,
information that is always needed by the cutting layout regardless of
whether `complete` details and graphics are shown on the pattern.
The `cutonfold` macro will automatically show or hide the cut on fold
indicator based on the `complete` setting.
### It's safe to use a corner of your pattern part for this
Since this is typically used on corners, the generated cut-on-fold indicator

View file

@ -56,6 +56,18 @@ macro('grainline', {
## Notes
### Place outside `complete`
The `grainline` macro should be placed outside of `complete` blocks
in the part's draft method.
This is because it provides information about the part's grainline,
information that is always needed by the cutting layout regardless of
whether `complete` details and graphics are shown on the pattern.
The `grainline` macro will automatically show or hide the grainline
indicator based on the `complete` setting.
### Removing the grainline indicator
If you inherit a part with a grainline indicator and you'd like to remove it,