Draft: Revise plane slice planner implementation #350
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issues
The plane slice raster planner is based on a pretty simple implementation idea: use a
VTKCutterclass to create planar cuts along a mesh and use aVTKStripperto extract points along those planar cuts to form tool path waypoints and segments.Unfortunately, the
VTKCutter+VTKStripperpipeline has several complicating limitations, specifically:The current implementation of the plane slice raster planner relies on code from several places to correct these shortcomings:
RasterOrganizationModifier, which currently sorts waypoints along a tool path segment by projected distance along a reference direction computed#178 and the findings in #271 illustrate that the waypoint sorting behavior in
RasterOrganizationModifieris an issue that prevents the usage of raster planners on less planar meshes. #215 updates this behavior, but that change tends to break the plane slice raster planner on a variety of other parts.#217, #219 and #271 also attempt to simplify the plane slice raster planner and modularize some of the functionality contained within it, but none of them fully address the problem.
Another issue with the plane slice planner is that it does not strictly enforce that raster lines point in the direction specified by the direction generator. The lines will be parallel to this direction vector, but not necessarily in the same direction (i.e., 180 degrees rotated). This restricts the number of applications where the plane slice planner can be effectively used.
Solution
After some investigation, I was able to identify the aforementioned issues in the
VTKCutter+VTKStripperpipeline.I implemented the following changes to solve these issues:
JoinContiguousSegmentsfeature ofVTKStripperto prevent segments from being joined incorrectlyResults
Issues and PRs resolved with this PR
Replaces #215, #217, #219, #271.