1
0
Fork 0

fix(cornelius): Removed debug output

This commit is contained in:
joostdecock 2021-10-27 18:36:26 +02:00
parent ee10be7c2e
commit 47dd560f9b

View file

@ -1,14 +1,13 @@
export default function (part) { export default function (part) {
let { Point, Path, points, paths, Snippet, snippets, complete, sa, store, paperless, macro } = let { Point, Path, points, paths, Snippet, snippets, complete, sa, store, paperless, macro } =
part.shorthand() part.shorthand()
const cc = 0.551915024494 // circle constant const cc = 0.551915024494 // circle constant
let halfInch = store.get('halfInch') let halfInch = store.get('halfInch')
let flyWidth = store.get('flyWidth') *halfInch let flyWidth = store.get('flyWidth') *halfInch
let flyLength = store.get('flyLength') let flyLength = store.get('flyLength')
console.log( {flyWidth: flyWidth, flyLength: flyLength})
points.pA = new Point(0, 0) points.pA = new Point(0, 0)
points.pB = points.pA.shift(180, flyWidth) points.pB = points.pA.shift(180, flyWidth)
points.pC = points.pB.shift(270, flyLength -flyWidth) points.pC = points.pB.shift(270, flyLength -flyWidth)
@ -16,26 +15,21 @@ export default function (part) {
points.pDcpC = points.pD.shift(180, flyWidth * cc) points.pDcpC = points.pD.shift(180, flyWidth * cc)
points.pCcpD = points.pC.shift(270, flyWidth * cc) points.pCcpD = points.pC.shift(270, flyWidth * cc)
console.log( points.pA )
console.log( points.pB )
console.log( points.pC )
console.log( points.pD )
paths.seam = new Path() paths.seam = new Path()
.move(points.pA) .move(points.pA)
.line(points.pB) .line(points.pB)
.line(points.pC) .line(points.pC)
.curve(points.pCcpD, points.pDcpC, points.pD) .curve(points.pCcpD, points.pDcpC, points.pD)
.attr('class', 'fabric') .attr('class', 'fabric')
paths.seam2 = new Path().move(points.pD).line(points.pA).attr('class', 'fabric') paths.seam2 = new Path().move(points.pD).line(points.pA).attr('class', 'fabric')
if (complete) { if (complete) {
macro('cutonfold', { macro('cutonfold', {
from: points.pD, from: points.pD,
to: points.pA, to: points.pA,
}) })
points.logo = points.pA.shiftFractionTowards(points.pC, 0.5) points.logo = points.pA.shiftFractionTowards(points.pC, 0.5)
snippets.logo = new Snippet('logo', points.logo) snippets.logo = new Snippet('logo', points.logo)
points.title = points.logo.shift(90, 70) points.title = points.logo.shift(90, 70)
@ -47,7 +41,7 @@ export default function (part) {
points.__titleNr.attr('data-text-class', 'center') points.__titleNr.attr('data-text-class', 'center')
points.__titleName.attr('data-text-class', 'center') points.__titleName.attr('data-text-class', 'center')
points.__titlePattern.attr('data-text-class', 'center') points.__titlePattern.attr('data-text-class', 'center')
if (sa) { if (sa) {
paths.sa = new Path() paths.sa = new Path()
.move(points.pA) .move(points.pA)
@ -57,7 +51,7 @@ export default function (part) {
.attr('class', 'fabric sa') .attr('class', 'fabric sa')
} }
} }
// Paperless? // Paperless?
if (paperless) { if (paperless) {
macro('hd', { macro('hd', {
@ -71,7 +65,7 @@ export default function (part) {
x: points.pA.x + 15, x: points.pA.x + 15,
}) })
} }
return part return part
} }