2d-polygon-boolean icon indicating copy to clipboard operation
2d-polygon-boolean copied to clipboard

Error : when I use 'not' operation

Open o0starshine0o opened this issue 7 years ago • 0 comments

   var subject = [
      [0, 0],
      [100, 0],
      [100, 100],
      [0, 100]
    ];
    
    var clip = [
      [40, 0],
      [60, 0],
      [60, 100],
      [40, 100]
    ];

    var cut = this.polygonBoolean(subject, clip, 'not');
    console.log('cut results', cut);

above is my code , what i expect is two rect [[0,0],[0,40],[40,100],[0,100]]and [[0,60],[60,100],[100,100],[60,100]] but,your program return me a square [[40,0],[0,0],[0,100],[40,100],[60,100],[100,100],[100,0],[60,0],[40,0]]

can you fix this bug?

o0starshine0o avatar Feb 23 '18 09:02 o0starshine0o