grainline
The grainline
macro adds a grainline indicator to your pattern.
It is provided by plugin-annotations, which is part of core-plugins (so it is available by default).
Signature
macro('grainline', {
Point from,
Point to,
String text=grainline,
Boolean force = false,
})
Example
- Preview
- Code
- X-Ray
({ Point, macro, Path, paths, part }) => {
macro('grainline', {
from: new Point(0,0),
to: new Point(100,0),
})
// Prevent clipping
paths.diag = new Path()
.move(new Point(-20,-10))
.move(new Point(110, 0))
return part
}
Configuration
Property | Default | Type | Description |
---|---|---|---|
from | Point | The startpoint of the grainline indicator | |
to | Point | The endpoint of the grainline indicator | |
text | 'grainline' | string | The text to put on the grainline indicator |
force | false | boolean | Set this to true to display the macro output even when complete is false |
Notes
This macro takes the complete
setting into account and won't output anything when both complete and force
are false
.