1
0
Fork 0

construction: Changed point names according to best practices

This commit is contained in:
Joost De Cock 2018-08-10 17:44:29 +02:00
parent 5b9600b6fc
commit adab3bce3d
3 changed files with 22 additions and 30 deletions

View file

@ -10,18 +10,14 @@ export function seamLine(side, points, Path) {
path
.line(points.hips)
.line(points.armhole)
.curve(points.armholeCp1, points.armholeCp2, points.armholeHollow)
.curve(
points.armholeHollowCp1,
points.armholeHollowCp2,
points.armholePitch
)
.curve(points.armholePitchCp1, points.armholePitchCp2, points.shoulder)
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
.curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch)
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
.line(points.neck);
if (side === "back") {
path.curve(points.neckCp1, points.cbNeck, points.cbNeck);
path.curve(points.neckCp2, points.cbNeck, points.cbNeck);
} else {
path.curve(points.neckCp1, points.neckCp2, points.cfNeck);
path.curve(points.neckCp2, points.cfNeck, points.cfNeck);
}
path.close().attr("class", "fabric");
@ -31,20 +27,16 @@ export function seamLine(side, points, Path) {
export function armholeLength(points, Path) {
return new Path()
.move(points.armhole)
.curve(points.armholeCp1, points.armholeCp2, points.armholeHollow)
.curve(
points.armholeHollowCp1,
points.armholeHollowCp2,
points.armholePitch
)
.curve(points.armholePitchCp1, points.armholePitchCp2, points.shoulder)
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
.curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch)
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
.length();
}
export function shoulderToArmholePitch(points, Path) {
return new Path()
.move(points.armholePitch)
.curve(points.armholePitchCp1, points.armholePitchCp2, points.shoulder)
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
.length();
}
@ -52,19 +44,19 @@ export function dimensions(macro, points, Path, sa) {
macro("pd", {
path: new Path()
.move(points.armhole)
.curve(points.armholeCp1, points.armholeCp2, points.armholeHollow)
.curve(points.armholeCp1, points.armholeCp1, points.armholeHollow)
.curve(
points.armholeHollowCp1,
points.armholeHollowCp2,
points.armholeHollowCp1,
points.armholePitch
)
.curve(points.armholePitchCp1, points.armholePitchCp2, points.shoulder),
.curve(points.shoulderCp1, points.shoulderCp1, points.shoulder),
d: sa + 15
});
macro("pd", {
path: new Path()
.move(points.armholePitch)
.curve(points.armholePitchCp1, points.armholePitchCp2, points.shoulder),
.curve(points.shoulderCp1, points.shoulderCp1, points.shoulder),
d: -15
});
macro("vd", {