GithubHelp home page GithubHelp logo

Self-intersection about cavaliercontours HOT 3 OPEN

LV6699 avatar LV6699 commented on May 25, 2024
Self-intersection

from cavaliercontours.

Comments (3)

jbuckmccready avatar jbuckmccready commented on May 25, 2024

Self intersection can be handled by enabling it for offsetting single polylines. For multiple/island offsetting and boolean operations it's not supported - I don't know of a good work around for the way the algorithms currently work, probably work needs to be done to improve the core algorithms.

from cavaliercontours.

LV6699 avatar LV6699 commented on May 25, 2024

First of all, thank you for your wonderful answer. For this algorithm, if the input is a single non self intersecting polyline curves, after the algorithm's self intersection calculation, the output may have multiple non self intersecting loops. Among these loops, some are valid loops, while others are invalid loops. How to determine whether a closed non self intersecting loop is valid? Or how do we determine if a closed non self intersecting loop is what we want? How does this algorithm solve this problem?

from cavaliercontours.

jbuckmccready avatar jbuckmccready commented on May 25, 2024

The algorithm works by performing a distance check from the mid point of each segment of the resulting offset polyline to the original polyline (using a spatial index to avoid checking against every original polyline segment). The distance is calculated and if it is less than the offset value plus some small epsilon then the entire polyline the segment midpoint belongs to is discarded.

from cavaliercontours.

Related Issues (20)

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.