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

3D support in distance_to to fix broken Douglas-Peucker algorithm #33

Merged

Conversation

platsch
Copy link
Collaborator

@platsch platsch commented Nov 17, 2020

3D support in distance_to to fix broken Douglas-Peucker algorithm in nonplanar gcode export.

The length of exported gcode segments is usually normalized to avoid a high number of very short movements in regions where the facet density in the original stl file is high. This is achieved by the recursive Douglas-Peucker algorithm. The introduction of a z-component to the Point.cpp class for the nonplanar feature has broken the distance_to method, even in the 2D case, preventing the DP algo from termination, resulting in a stack overflow (segfault).

@Zip-o-mat Zip-o-mat merged commit bcbcf88 into Zip-o-mat:nonplanar-master-merge Nov 17, 2020
@Zip-o-mat
Copy link
Owner

Thank you for fixing this issue

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

Successfully merging this pull request may close these issues.

2 participants