clipper

Node binding to C++ clipping library

npm install clipper
5 downloads in the last week
8 downloads in the last month

clipper

Node binding to C++ clipping library found at http://www.angusj.com/delphi/clipper.php

Installation

To install this clipper module, perform the following:

  1. Add clipper: <version> to your package.json dependencies
  2. Use the command npm install

Use

var clipper = require('clipper');

// clipper will use the default distance 1.415 when cleaning the polygon
clipper.simplify([10,10,100,10,100,100,10,100,10,50], 1);

API

simplify(coords[, scale_factor])

  • coords: an array of vertices
  • scale_factor: the factor by which to scale each coordinate in coords

union(coords)

  • coords: an array of vertices
npm loves you