Giter Site home page Giter Site logo

tirithen / clipper2 Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 2.0 222 KB

A polygon Clipping and Offsetting library for Rust.

Home Page: https://crates.io/crates/clipper2

License: Apache License 2.0

Rust 100.00%
2d-graphics algorithm algorithms boolean cnc game-development geometry geospatial gis path-tracing

clipper2's People

Contributors

lagradost avatar msvbg avatar tirithen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

lagradost msvbg

clipper2's Issues

Support for geo-types

Hi, cool project!

I discovered this when searching for Rust bindings to Clipper 2. I'm stuck on Clipper 1 via geo-clipper which uses a five year-old version of the library, and while it works I'm curious to see if Clipper 2 is more numerically robust.

One thing I'd like to see is integration with geo-types since my code is already using these types all over the place, and I might (at some point) send a PR for this myself if you'd be open to it.

Memory leak and unessessary copy

For example impl From<Polygons> for PolygonsC

  1. Clones the entire content of Polygon instead of transmuting the pointer to the vec ๐Ÿ‘Ž
  2. Never cleans up the memory ๐Ÿ‘Ž

Both of these are solved if the for example Polygons owns the data and PolygonsC is only a c pointer reference into Polygons so we dont need to do any memory cloning, and this makes rust clean up the memory. This assumes that all the c types are private, as PolygonsC must never outlive Polygons if this is the case.

Examples?

There is no example folder for examples on how to use the API

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.