import { CpNode } from "../cp-node.js"; import { getCpNodeOrdering } from './get-cp-node-ordering.js'; import { getProngCount } from './get-prong-count.js'; import { getRealProngCount } from "./get-real-prong-count.js"; import { isFullyTerminating } from "./is-fully-terminating.js"; import { isSharp } from "./is-sharp.js"; import { isTerminating } from "./is-terminating.js"; /** * For debugging * @param cpNode */ function enhanceCpNode(cpNode: CpNode) { // const cp = cpNode.cp; const pos = cpNode.pointOnShape; const curve = pos.curve; return { ...cpNode, pos,//: cpNode.cp.pointOnShape, p: pos.p, t: pos.t, isTerminating: isTerminating(cpNode), isFullyTerminating: isFullyTerminating(cpNode), isSharp: isSharp(cpNode), prongCount: getProngCount(cpNode), getRealProngCount: getRealProngCount(cpNode), ordering: getCpNodeOrdering(cpNode), curve, loop: curve.loop } } export { enhanceCpNode }