Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boolean operation #51

Open
DjangoReinhard opened this issue Mar 15, 2022 · 1 comment
Open

boolean operation #51

DjangoReinhard opened this issue Mar 15, 2022 · 1 comment

Comments

@DjangoReinhard
Copy link

Hi,

I create some offset polylines from model (purple lines).
Poly03

My intention is to cut out the polyline parts that are outside of given circle.
I tried intersection (yellow lines), but the circle becomes part of the cutted polylines.
Is there a way to avoid that?
So that remaining curve from cutted polyline will just some open polylines?

@jbuckmccready
Copy link
Owner

What you want is not implemented in this C++ repository, but you can get the part you want using the Rust library (function here). The boolean operation in the Rust library returns a structure which has all the polyline results as well as the information about the subslices that were stitched together to form them - from the subslices you can get just the open polylines that come from one of the input polylines given to the boolean operation (so you could choose to not include the slices from the given circle).

The Rust library has a C FFI to be called from other languages, unfortunately for your need it doesn't return the associated slices in the C FFI, it needs to be updated to do so (the C FFI function for boolean operation is here and was added before I improved the operation to return subslice information).

I want to build up the C FFI, examples, documentation, and more in the Rust library, I just haven't had the time. If you'd like to contribute to the Rust library C FFI pull requests are welcome, or you could fork the Rust and just update the C FFI to do the part you need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants