UNPKG

dielines

Version:

Create dielines with pantograph APIs

24 lines (23 loc) 958 B
import { Transformable, Diagram, Strand, TransformationMatrix, Stroke } from 'pantograph2d/models'; export declare class Dieline extends Transformable<Dieline> { body: Diagram; cutLines: Stroke[]; foldLinesBackwards: Stroke[]; foldLinesForwards: Stroke[]; constructor(body: Diagram, { cutLines, foldLines, foldLinesForwards, foldLinesBackwards, }?: { cutLines?: Stroke[]; foldLines?: Stroke[]; foldLinesBackwards?: Stroke[]; foldLinesForwards?: Stroke[]; }); get foldLines(): Stroke[]; clone(): Dieline; addCutLine(cut: Strand): this; addFoldLine(fold: Strand, direction?: "forwards" | "backwards"): void; fuseFold(fold: Diagram | Dieline, direction?: "forwards" | "backwards"): this; fuseBody(other: Dieline | Diagram): this; cutShape(shape: Diagram): this; eraseFolds(shape: Diagram): void; transform(matrix: TransformationMatrix): Dieline; asSVG(): string; }