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

Fix small area infill flow compensation (graph version) causing some lines to not extrude (#4374) #4399

Open
wants to merge 4 commits into
base: nightly_dev
Choose a base branch
from

Conversation

TheSlashEffect
Copy link

Hello 3D printing crew

I found the issue that the user was presenting in #4374. The problem was that the actual graph points data structure and begin_idx, end_idx usage were inconsistent in this function. As a result, all extrusion lengths above the max value we account for in the graph (~3.0mm in our case) were not interpolated and got a multiplication factor of 0 instead (the default in this function). I am not sure why the graph implementation works as it does but these changes make this function comply with how the graph and its data structures are currently implemented.

Below is the user's scenario as an example, working as expected.
Screenshot from 2024-08-12 18-39-02

Additional fixes:

  • I changed the function's default y_value to 1.0f, so the default behaviour leaves the extrusion value as it was.
  • The equality comparison of extrusion length and the graph's data points should be done by checking how close to the value it is instead of equality, because of floating point arithmetics. (I)
  • Some return instead of break statements to help with readability a bit.

(I): This can cause some discrepancies if we have 2 lines with very close but not equal lengths, as they will both get assigned the same extrusion factor. We could remove this check or make it compare from the left side only, but then again it is a small performance optimization. I leave this decision to the owner :)
(II): A question on the feature; should the feature's function not be monotonically non-decreasing? I personally cannot think of a case where a shorter line should extrude more than a longer one.

supermerill and others added 4 commits August 4, 2024 19:08
 * overhangs_bridge_threshold
 * overhangs_bridge_upper_layers
 * perimeters_hole
 * support_material_bottom_interface_layers
- Make the input range checks consistent with start_idx, end_idx of existing implementation
- Make default extrusion factor 1.0f to prevent similar issues
- Small readability improvements
@supermerill
Copy link
Owner

Thanks, merged.

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