Skip to content

Error : when I use 'not' operation #16

Description

@o0starshine0o
   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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions