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

Inflate path with two points #403

Closed
JaMan-cmd opened this issue Feb 8, 2023 · 2 comments
Closed

Inflate path with two points #403

JaMan-cmd opened this issue Feb 8, 2023 · 2 comments

Comments

@JaMan-cmd
Copy link

Hello Angus,
Thanks for the great library.
I have a question regarding inflating a path that only has two points. if I attempt to do it using the following configuration
soln = Clipper2Lib::InflatePaths(clipper_paths, 100, Clipper2Lib::JoinType::Round, Clipper2Lib::EndType::Joined);
it returns a corrupted path, however using
soln = Clipper2Lib::InflatePaths(clipper_paths, 100, Clipper2Lib::JoinType::Round, Clipper2Lib::EndType::Squared);
worked very fine. in my usecase, it doesn't make a big difference, I'm just curious to know if the first configuration is wrong for some reason.
thank you again

@AngusJohnson
Copy link
Owner

Thanks for your encouraging feedback, and for your bug report 👍.
And it is a kind of bug, even though what you're asking this function to do doesn't really make sense (to me at least 😜). EndType::Join is intended to close an open path but still offset as an open path (ie on both sides of the path. But of course it's not really possible to close a single segment and currently Clipper2 returns an empty solution. Anyhow, I now have a fix in progress that will return a much more sensible solution. Cheers.

AngusJohnson added a commit that referenced this issue Feb 9, 2023
Fixed RectClipLines code (Delphi & C++)
Minor changes & code tidy in Clipper.Offset
Fixed Delphi 7 compatability issue (#402)
Fixed a very minor offset bug (#403)
@AngusJohnson
Copy link
Owner

Hopefully fixed now.

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