Skip to content

Boolean operations and overlap removal for curves.

License

Notifications You must be signed in to change notification settings

caryll/shapeops

Repository files navigation

caryll / shapeops

Boolean operations and overlap removal for curves.

Usage

var caryllShapeOps = require('caryll-shapeops');
var shape1 = [[
  {x:0, y:0, on:true}, 
  {x:100, y:0, on:false}, 
  {x:200, y:100, on:false}, 
  {x:200, y:200, on:true},
  {x:0, y:0, on:true}
], ...];
var shape2 = [...];
var result = caryllShapeOps.boole(caryllShapeOps.ops.intersection, shape1, shap2);
  • caryllShapeOps.boole(operator, shape1, shap2, fillRule1=caryllShapeOps.fillRules.evenodd, fillrule2=caryllShapeOps.fillRules.evenodd, resolution=100) Perform boolean operation over shape1 and shape2 using given operator.
  • caryllShapeOps.removeOverlap(shape, fillRule=caryllShapeOps.fillrules.evenodd, resolution=100) Remove overlap area under specified filling rule.

About

Boolean operations and overlap removal for curves.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published