lhuanyu / swiftclipper Goto Github PK
View Code? Open in Web Editor NEWA Swift version of polygon clipper.
License: MIT License
A Swift version of polygon clipper.
License: MIT License
Hi. I believe clipper.execute populates the Path object after .union is executed?
I am looking at extracting it to an array of CGPoint. But Path does not seem to have a way to. Please advise?
First, thank you so much for this library! It is exactly what I needed for a little project I've been working on.
I believe this library is causing a memory leak in my app. I use the "intersection" functionality pretty heavily, and memory usage goes up over time. Analysis with Instruments and other Xcode tools leaks me to think that there is a strong circular reference between OutPt
types, as shown in this image:
I believe I was able to eliminate the leak by making next
and prev
weak
(but I did a lot of messy workarounds to prove that out - I probably broke other functionality in the process).
I believe TEdge has a similar issue:
Please let me know if you need more information. I can put some time into trying to create a minimal repro if needed.
Currently getting error
"Error: PolyTree struct is needed for open path clipping."
But I have no clue how to use .execute(:polytree)
Cannot instasntiate PolyTree()
I have two Paths - previousPaths
and currentPaths
, and I wish to find the intersections between them, as a single Paths. My thought here is that I could potentially find the intersections between currentPaths
and each individual Path in previousPaths
, which gets me an array of Paths. Now, I wish to unionise them. Perhaps I'm taking the wrong approach, but it's unclear to me how to do this.
Does there needed to be a function added for union(path: Path)
?
var intersections = [Paths]()
for path in previousPaths {
let intersection = currentPaths.intersection(path)
intersections.append(intersection)
}
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.