GithubHelp home page GithubHelp logo

Comments (1)

AngusJohnson avatar AngusJohnson commented on August 21, 2024
void Test()
{
  Paths64 subject, solution;
  subject.push_back(MakePath({ 176308954,86819031,176308954,87200002,176308954,87580966,176308954,88899500,175911975,88899500,175853784,88880593,175817820,88831093,175817820,88769907,175821921,88759375,175836210,88728083,175854627,88600002,175836212,88471922,175783946,88357473,175400001,88741420,175160452,88980966,175211134,89013539,175236789,89021074,175287296,89055610,175307857,89113237,175304524,89141685,175299500,89160435,175299500,89239564,175319978,89315988,175359538,89384508,175415489,89440460,175484007,89480019,175560435,89500499,176308954,89500500,176308954,90000000,165872636,90000000,165872636,88980966,165872636,88600002,174945373,88599997,174963787,88728077,175016051,88842526,175238687,88619891,175258578,88600000,175238687,88580109,175300000,88580109,175300000,88619891,175315224,88656645,175343355,88684776,175380109,88700000,175419891,88700000,175456645,88684776,175484776,88656645,175500000,88619891,175500000,88580109,175484776,88543355,175456645,88515224,175419891,88500000,175380109,88500000,175343355,88515224,175315224,88543355,175300000,88580109,175238687,88580109,175016051,88357473,174963787,88471920,174945373,88599997,165872636,88599997,165872636,88219031,175160453,88219031,175400000,88458578,175639546,88219032,175588858,88186456,175464701,88150000,175335298,88150000,175211139,88186457,175160453,88219031,165872636,88219031,165872636,87580966,175160452,87580966,175211134,87613539,175335298,87649999,175464699,87650000,175588857,87613543,175639545,87580967,175399999,87341421,175160452,87580966,165872636,87580966,165872636,87200002,174945373,87199997,174963787,87328077,175016051,87442526,175238687,87219891,175258578,87200000,175238687,87180109,175300000,87180109,175300000,87219891,175315224,87256645,175343355,87284776,175380109,87300000,175419891,87300000,175456645,87284776,175484776,87256645,175500000,87219891,175500000,87199999,175541421,87199999,175783946,87442524,175836211,87328080,175854627,87200002,175836212,87071922,175783946,86957473,175541421,87199999,175500000,87199999,175500000,87180109,175484776,87143355,175456645,87115224,175419891,87100000,175380109,87100000,175343355,87115224,175315224,87143355,175300000,87180109,175238687,87180109,175016051,86957473,174963787,87071920,174945373,87199997,165872636,87199997,165872636,86819031,175160453,86819031,175400000,87058578,175639546,86819032,175588858,86786456,175464701,86750000,175335298,86750000,175211139,86786457,175160453,86819031,165872636,86819031,165872636,80033416,176308954,80033416 }));
  solution = Union(subject, FillRule::NonZero);

  solution.resize(2); // ignore the irrelevant paths
  std::cout << solution << std::endl;
  SvgWriter svg;
  SvgAddSolution(svg, solution, FillRule::NonZero, false);
  std::string filename = "test.svg";
  SvgSaveToFile(svg, filename, 8000, 8000);
  System(filename);
}
solution[0] = 
176308954,86819031, 176308954,87200002, 176308954,87580966, 176308954,88899500, 175911975,88899500, 175853784,88880593, 175817820,88831093, 175817820,88769907, 175821921,88759375, 175836210,88728083, 175854627,88600002, 175836212,88471922, 175783946,88357473, 175400001,88741420, 175160452,88980966, 175211134,89013539, 175236789,89021074, 175287296,89055610, 175307857,89113237, 175304524,89141685, 175299500,89160435, 175299500,89239564, 175319978,89315988, 175359538,89384508, 175415489,89440460, 175484007,89480019, 175560435,89500499, 176308954,89500500, 176308954,90000000, 165872636,90000000, 165872636,88980966, 165872636,88600002, 174945373,88599997, 174963787,88728077, 175016051,88842526, 175238687,88619891, 175258578,88600000, 175238687,88580109, 175016051,88357473, 174963787,88471920, 174945373,88599997, 165872636,88599997, 165872636,88219031, 165872636,87580966, 165872636,87200002, 174945373,87199997, 174963787,87328077, 175016051,87442526, 175238687,87219891, 175258578,87200000, 175238687,87180109, 175016051,86957473, 174963787,87071920, 174945373,87199997, 165872636,87199997, 165872636,86819031, 165872636,80033416, 176308954,80033416
solution[1] = 
175300000,88619891, 175315224,88656645, 175343355,88684776, 175380109,88700000, 175419891,88700000, 175456645,88684776, 175484776,88656645, 175500000,88619891, 175500000,88580109, 175484776,88543355, 175456645,88515224, 175419891,88500000, 175380109,88500000, 175343355,88515224, 175315224,88543355, 175300000,88580109

I'm not getting a self-intersection, however the relevant edges in the solution are collinear.

from clipper2.

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.