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

InflatePaths result seems incorrect #405

Closed
ccoustet opened this issue Feb 9, 2023 · 2 comments
Closed

InflatePaths result seems incorrect #405

ccoustet opened this issue Feb 9, 2023 · 2 comments

Comments

@ccoustet
Copy link

ccoustet commented Feb 9, 2023

Testing today on the main branch, I get this:

PathsD polyline, solution;
PointD coords[4] = {{-1, -1}, {-1, 11}, {11, 11}, {11, -1}};
polyline.push_back(PathD(std::begin(coords), std::end(coords)));
// offset polyline
solution = InflatePaths(polyline, -50, JoinType::Miter, EndType::Polygon);
//print polyline and inflated solution
std::cout << polyline << "=== -50 ==> " << solution;

-1,-1 , -1,11 , 11,11 , 11,-1 
=== -50 ==> 5,-33 , -33,5 , 5,43 , 43,5 

Paths64 polyline, solution;
Point64 coords[4] = {{-1, -1}, {-1, 11}, {11, 11}, {11, -1}};
polyline.push_back(Path64(std::begin(coords), std::end(coords)));
// offset polyline
solution = InflatePaths(polyline, -50, JoinType::Miter, EndType::Polygon);
//print polyline and inflated solution
std::cout << polyline << "=== -50 ==> " << solution;

-1,-1 , -1,11 , 11,11 , 11,-1 
=== -50 ==> 5,-33 , -33,5 , 5,43 , 43,5 

The same code previously returned an empty polygon, as I was expecting.

@AngusJohnson
Copy link
Owner

Thanks. I will fix it ASAP (today).

AngusJohnson added a commit that referenced this issue Feb 10, 2023
Fixed Delphi 7 and FPC compatibility (#402)
@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