1
0
Fork 0

sparkles: Added hem points

This commit is contained in:
Joost De Cock 2018-12-21 12:55:50 +01:00
parent 9ad16169bd
commit 3c26deb5c3
6 changed files with 23 additions and 16 deletions

View file

@ -34,6 +34,10 @@ export default part => {
points.cbNeck.y + measurements.centerBackNeckToWaist
);
points.cbHips = new Point(
0,
points.cbWaist.y + measurements.naturalWaistToHip
);
points.cbHem = new Point(
0,
points.cbWaist.y +
measurements.naturalWaistToHip +
@ -48,6 +52,7 @@ export default part => {
);
points.waist = new Point(points.armhole.x, points.cbWaist.y);
points.hips = new Point(points.armhole.x, points.cbHips.y);
points.hem = new Point(points.armhole.x, points.cbHem.y);
// Shoulder line
points.neck = new Point(
@ -149,13 +154,13 @@ export default part => {
debug({ style: "warning", label: "🚫 Not fitting collar" }, "(in Brian)");
// Anchor point for sampling
points.gridAnchor = points.cbHips;
points.gridAnchor = points.cbHem;
// Seamline
paths.saBase = shared.saBase("back", points, Path);
paths.seam = new Path()
.move(points.cbNeck)
.line(points.cbHips)
.line(points.cbHem)
.join(paths.saBase)
.attr("class", "fabric");

View file

@ -13,7 +13,7 @@ export default part => {
points.armholePitchCp2.x -= deeper;
// Rename cb (center back) to cf (center front)
for (let key of ["Shoulder", "Armhole", "Waist", "Hips"]) {
for (let key of ["Shoulder", "Armhole", "Waist", "Hips", "Hem"]) {
points[`cf${key}`] = new Point(points[`cb${key}`].x, points[`cb${key}`].y);
delete points[`cb${key}`];
}
@ -24,7 +24,7 @@ export default part => {
paths.saBase = shared.saBase("front", points, Path);
paths.seam = new Path()
.move(points.cfNeck)
.line(points.cfHips)
.line(points.cfHem)
.join(paths.saBase)
.attr("class", "fabric");

View file

@ -1,9 +1,9 @@
export function saBase(side, points, Path) {
let path = new Path();
if (side === "back") path.move(points.cbHips);
else path.move(points.cfHips);
if (side === "back") path.move(points.cbHem);
else path.move(points.cfHem);
path
.line(points.hips)
.line(points.hem)
.line(points.armhole)
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
.curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch)