Maker.js, a Microsoft Garage project, is a JavaScript library for creating and sharing modular line drawings for CNC and laser cutters.

View project on GitHub Star

Api - Holes Class

Hierarchy

  • Holes

Implements

Index

Constructors

Properties

Constructors

constructor

  • new Holes(holeRadius: number, points: IPoint[], ids?: string[]): Holes
  • Create an array of circles of the same radius from an array of center points.

    Example:

    //Create some holes from an array of points
    var makerjs = require('makerjs');
    var model = new makerjs.models.Holes(10, [[0, 0],[50, 0],[25, 40]]);
    var svg = makerjs.exporter.toSVG(model);
    document.write(svg);
    

    Parameters

    • holeRadius: number

      Hole radius.

    • points: IPoint[]

      Array of points for origin of each hole.

    • Optional ids: string[]

      Optional array of corresponding path ids for the holes.

    Returns Holes

Properties

paths

paths: IPathMap

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc