Comments (1)
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)
- The offset result is inconsistent with the expected result.
- GCC 14 raises new `-Wtemplate-id-cdtor` warning
- 'round': ambiguous call to overloaded function HOT 2
- Rust
- RectClipLines seems to be broken when lines go over the rect boundary (C#, 1.3.0, Clipper2). HOT 8
- Regression when removing type casting in IsCollinear() HOT 4
- Minkowski in export header HOT 4
- Clipper2 slower than clipper1 HOT 2
- New release? HOT 1
- can this library cut a hole in a polygon?
- How to handle path value of double type HOT 1
- [new API request] API using PolyTree for RectClip HOT 1
- Dose Clipper support to get Inscribed rectangle ?
- How Clipper2 is used in iOS project(Cocoaspod)
- Why is Rect empty when bottom <= top?
- Union of forms that touch but don't intersect
- Union of forms that share an edge
- Empty polytree when taking the union of 3 closed polygons. HOT 6
- Is there a plan for the clipper to support circular arc structures
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clipper2.