1
0
Fork 0
freesewing/packages/examples/src/utils_linesintersect.js

27 lines
509 B
JavaScript
Raw Normal View History

2019-01-27 12:54:18 +01:00
export default part => {
let {
Point,
points,
Path,
paths,
Snippet,
snippets,
utils
} = part.shorthand();
points.A = new Point(10, 10);
points.B = new Point(50, 40);
points.C = new Point(15, 30);
points.D = new Point(60, 15);
paths.AB = new Path().move(points.A).line(points.B);
paths.CD = new Path().move(points.C).line(points.D);
snippets.X = new Snippet(
2019-05-25 11:11:46 +02:00
"notch",
2019-01-27 12:54:18 +01:00
utils.linesIntersect(points.A, points.B, points.C, points.D)
);
return part;
};