sungard-labs / mkpolygon-gpc Goto Github PK
View Code? Open in Web Editor NEWObj-C Category that adds polygon boolean operators to MKPolygon
License: Other
Obj-C Category that adds polygon boolean operators to MKPolygon
License: Other
Not sure if I was just unlucky, or if this fix is 100% but seems to solve my probs:
I added the 'if' statement after the assert in (MKPolygon *) polygonWithGPCPolygon:(gpc_polygon *) gpcPolygon interiorPolygons:(NSArray *)interiorPolygons , like so
NSAssert( gpcPolygon != NULL, @"attempt to create path from NULL gpcPolygon");
if (gpcPolygon->contour == NULL) {
return nil;
}
The methods will only return the first polygon when there are multiple polygons resulted from the operation. I have done a modify of the codes to make it returns all the resulted polygons. Files in attachment.
Thanks for this lib, unfortunately it didn't fulfil all my requirements. I was performing the union of rectangles in a circle, when I added the last rectangle to close the circle I was expecting a polygon with the interior cut out. This library just enveloped the entire circle. Is there another method in gpc that could solve this case? Thanks
Hi,
Excellent code!! Really appreciate it!
I found one issue: I have two overlapping rings. Applying the operator intersection should result in 2 polygons. The code is however providing one polygon with a connecting branch. Do you see a way to distinguish multiple polygons resulting from the boolean operators?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.