construction: Changed point names according to best practices
This commit is contained in:
parent
5b9600b6fc
commit
adab3bce3d
3 changed files with 22 additions and 30 deletions
|
@ -77,27 +77,27 @@ var base = {
|
|||
points.armholePitch
|
||||
);
|
||||
points.armholeHollow = points._tmp1.shiftFractionTowards(points._tmp3, 0.5);
|
||||
points.armholeCp1 = points.armhole.shift(
|
||||
points.armholeCp2 = points.armhole.shift(
|
||||
180,
|
||||
points._tmp1.dx(points.armhole) / 4
|
||||
);
|
||||
points.armholeCp2 = points.armholeHollow.shift(
|
||||
points.armholeHollowCp1 = points.armholeHollow.shift(
|
||||
-45,
|
||||
points.armholeHollow.dy(points.armhole) / 2
|
||||
);
|
||||
points.armholeHollowCp1 = points.armholeHollow.shift(
|
||||
points.armholeHollowCp2 = points.armholeHollow.shift(
|
||||
135,
|
||||
points.armholePitch.dx(points.armholeHollow)
|
||||
);
|
||||
points.armholeHollowCp2 = points.armholePitch.shift(
|
||||
points.armholePitchCp1 = points.armholePitch.shift(
|
||||
-90,
|
||||
points.armholePitch.dy(points.armholeHollow) / 2
|
||||
);
|
||||
points.armholePitchCp1 = points.armholePitch.shift(
|
||||
points.armholePitchCp2 = points.armholePitch.shift(
|
||||
90,
|
||||
points.shoulder.dy(points.armholePitch) / 2
|
||||
);
|
||||
points.armholePitchCp2 = points.shoulder
|
||||
points.shoulderCp1 = points.shoulder
|
||||
.shiftTowards(points.neck, points.shoulder.dy(points.armholePitch) / 5)
|
||||
.rotate(90, points.shoulder);
|
||||
|
||||
|
@ -105,7 +105,7 @@ var base = {
|
|||
points._tmp4 = points.neck
|
||||
.shiftTowards(points.shoulder, 10)
|
||||
.rotate(-90, points.neck);
|
||||
points.neckCp1 = freesewing.utils.beamCrossesY(
|
||||
points.neckCp2 = freesewing.utils.beamCrossesY(
|
||||
points.neck,
|
||||
points._tmp4,
|
||||
points.cbNeck.y
|
||||
|
|
|
@ -11,9 +11,9 @@ var front = {
|
|||
|
||||
// Cut arm a bit deeper at the front
|
||||
let deeper = measurements.chestCircumference * options.frontArmholeDeeper;
|
||||
points.armholeHollowCp2.x -= deeper;
|
||||
points.armholePitch.x -= deeper;
|
||||
points.armholePitchCp1.x -= deeper;
|
||||
points.armholePitch.x -= deeper;
|
||||
points.armholePitchCp2.x -= deeper;
|
||||
|
||||
// Rename cb (center back) to cf (center front)
|
||||
for (let key of ["Neck", "Shoulder", "Armhole", "Waist", "Hips"]) {
|
||||
|
|
|
@ -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", {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue