Giter Site home page Giter Site logo

Comments (8)

memononen avatar memononen commented on September 22, 2024

The both algorithms are pretty much tied together, bulk of the code is used for both. If you need only poly booleans, you can take a look at Clipper: http://www.angusj.com/delphi/clipper.php

IIRC it is bigger library, though.

from tess2.js.

gagan-bansal avatar gagan-bansal commented on September 22, 2024

Thanks for quick reply.I am only looking for javascript module and jsclipper is also a big library. One more thing I could not get documentation for polygon boolean functions, the document (http://www.glprogramming.com/red/chapter11.html) you mentioned tells more about tesselation.

from tess2.js.

memononen avatar memononen commented on September 22, 2024

If you set element type to Tess2.BOUNDARY_CONTOURS you will get polygons back. They're called contours since the code can also tesselate the input polygons (contours) into convex polygons.

from tess2.js.

memononen avatar memononen commented on September 22, 2024

The Red Book chapter will tell you how to implement common boolean operations (union, sub, intersect) based on the windings used by the library.

from tess2.js.

gagan-bansal avatar gagan-bansal commented on September 22, 2024

I am familiar with boolean operation in concept. But I was looking which function should I use to get the output. Like
var intersection = tess2.intersection(poly1, poly2)

from tess2.js.

memononen avatar memononen commented on September 22, 2024

Search for "CSG Uses for Winding Rules" in the red book linked above.

The library was originally written to tesselate polygons, but it can do boolean ops too, but the API is not the cleanest for that purpose.

from tess2.js.

gagan-bansal avatar gagan-bansal commented on September 22, 2024

Thanks, I'll go through it.

from tess2.js.

gagan-bansal avatar gagan-bansal commented on September 22, 2024

Satisfy my requirement https://github.com/w8r/GreinerHormann

from tess2.js.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.