Skip to content

Infill Line Multiplier #9432

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Infill Line Multiplier #9432

wants to merge 8 commits into from

Conversation

RF47
Copy link
Contributor

@RF47 RF47 commented Apr 21, 2025

Added Infill Line Multiplier for Gyroid & linear infill patterns.
This enhancement allows adjusting the line count in the Gyroid infill and several linear infills, enabling finer control over material usage and print strength.
Gyroid multiline infill Inspired by and adapted from the work of [@profOnno]

(https://github.com/profOnno/PrusaSlicer/commit/90862360de111571272ebbb7b8e0f89f8f841805#diff-3ec83cd4f72e61c92f69178305a0298e90e2d8b43a3d88ca2f8edccde4e02c7a).https://github.com/profOnno/PrusaSlicer/commit/90862360de111571272ebbb7b8e0f89f8f841805#diff-3ec83cd4f72e61c92f69178305a0298e90e2d8b43a3d88ca2f8edccde4e02c7a

prusa3d/PrusaSlicer#7044

image
image
Update: I managed to achieve the precise offset of the gyroid curves.
image

Update: Added linear infill patterns (grid, linear, trihexagon, aligned rectilinear)
image
image
image
image
image
image
Update: Added Tpms-D and 3D honeycomb multiline infills
image
image
image

Known Issues:
Line overlapping for linear infills.

@RF47 RF47 changed the title Infill Line Multiplier for Gyroid Infill Line Multiplier for Gyroid Infill Apr 21, 2025
@RF47 RF47 force-pushed the Multiline-Infill branch from f851488 to 8cbe481 Compare April 22, 2025 21:59
@profOnno
Copy link

Thanks you, for mentioning me. I'm happy you found it useful. It's been a while when i was working on this. Maybe one day I'll revisit the infill world. I have vague plan to infill the infill ( maybe recursive 😋 ).

@RF47 RF47 force-pushed the Multiline-Infill branch from 8555cf4 to 0a902da Compare April 26, 2025 18:25
@RF47 RF47 force-pushed the Multiline-Infill branch 3 times, most recently from 38a8857 to 6d8f5bf Compare April 29, 2025 20:35
@RF47 RF47 changed the title Line Multiplier for Gyroid Infill Line Multiplier for Gyroid Infill May 1, 2025
@RF47 RF47 marked this pull request as ready for review May 1, 2025 23:05
@RF47 RF47 marked this pull request as draft May 1, 2025 23:13
@RF47 RF47 marked this pull request as ready for review May 2, 2025 02:46
@RF47 RF47 force-pushed the Multiline-Infill branch 3 times, most recently from e53e1a2 to aa90fe3 Compare May 4, 2025 16:38
@RF47 RF47 force-pushed the Multiline-Infill branch 2 times, most recently from 8071e7b to 7a5d114 Compare May 11, 2025 00:53
@RF47 RF47 changed the title Line Multiplier for Gyroid Infill Line Multiplier for Gyroid & Multiline Infill May 11, 2025
@RF47 RF47 changed the title Line Multiplier for Gyroid & Multiline Infill Infill Line Multiplier May 11, 2025
@RF47 RF47 force-pushed the Multiline-Infill branch 2 times, most recently from a6b7d4e to 2b55c96 Compare May 12, 2025 20:16
@RF47 RF47 force-pushed the Multiline-Infill branch 6 times, most recently from 12d27a7 to 5682e95 Compare May 18, 2025 21:45
@RF47
Copy link
Contributor Author

RF47 commented May 19, 2025

Nice progress. 👍

I have to solve the problem of overlapping lines, up to 2 multilines it is not a problem, but with more I imagine it can generate layer shifts.

@RF47 RF47 force-pushed the Multiline-Infill branch from 5682e95 to 53d1249 Compare May 20, 2025 00:48
@RF47 RF47 force-pushed the Multiline-Infill branch from 53d1249 to 3e32cac Compare June 1, 2025 18:58
@RF47
Copy link
Contributor Author

RF47 commented Jun 2, 2025

I added support for CrossHatch and Lightning infill
image
image

@ianalexis
Copy link
Contributor

This improves printing time using same amount of filament.

1 line - 14:47hs - 211.70gr
imagen

2 lines - 11:35hs - 212.88gr
imagen

3 lines - 10:03hs - 212.34gr
imagen

Copy link
Contributor

@ianalexis ianalexis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes todo

else
tangent = Vec2f(pl.points[i + 1].x() - pl.points[i - 1].x(), pl.points[i + 1].y() - pl.points[i - 1].y());

float len = std::sqrt(tangent.x() * tangent.x() + tangent.y() * tangent.y());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change it to

float len = std::hypot(tangent.x() , tangent.y());

@@ -83,6 +84,7 @@ struct SurfaceFillParams
RETURN_COMPARE_NON_EQUAL(angle);
RETURN_COMPARE_NON_EQUAL(rotate_angle);
RETURN_COMPARE_NON_EQUAL(density);
RETURN_COMPARE_NON_EQUAL(multiline);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tab it

@@ -59,6 +61,7 @@ Fill* Fill::new_from_type(const InfillPattern type)
case ipSupportCubic: return new FillAdaptive::Filler();
case ipSupportBase: return new FillSupportBase(); // simply line fill
case ipLightning: return new FillLightning::Filler();

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this

@@ -1061,6 +1061,7 @@ bool PrintObject::invalidate_state_by_config_options(
#endif
} else if (
opt_key == "interface_shells"
|| opt_key == "infill_multiline" // TODO: needed?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uncomment

@RF47 RF47 force-pushed the Multiline-Infill branch from 0dff426 to 43fdeb9 Compare June 5, 2025 20:23
@rtm7777
Copy link

rtm7777 commented Jun 5, 2025

Wow relatively simple change but opens a lot of possibilities to play with. It would be interesting to see it for "2D lattice" infill if can be easily implemented, I have some specific tasks when it might be helpful

@RF47
Copy link
Contributor Author

RF47 commented Jun 5, 2025

Wow relatively simple change but opens a lot of possibilities to play with. It would be interesting to see it for "2D lattice" infill if can be easily implemented, I have some specific tasks when it might be helpful

The current issue with the 2D Lattice infill is that the intersecting planes generate overlapping paths, which makes it non-trivial to implement correctly. I’ll try to find a way to resolve this.

@RF47 RF47 force-pushed the Multiline-Infill branch from ca5d408 to 4204661 Compare June 7, 2025 17:45
@RF47 RF47 force-pushed the Multiline-Infill branch 2 times, most recently from fe4473a to 64d8dd9 Compare June 11, 2025 21:07
@dewi-ny-je
Copy link
Contributor

I welcome this feature to extremely easily add ribbing to models without having to resort to CAD, since it's just a matter of setting like 5% infill grid, then infill multiplier 4-6x.

For models which I didn't make, and for those where ribbing is straightforward, it's a big time saving.

@RF47 RF47 force-pushed the Multiline-Infill branch 7 times, most recently from 94d33b7 to d32e104 Compare June 19, 2025 00:27
@RF47 RF47 force-pushed the Multiline-Infill branch from d32e104 to 3c5dc2e Compare June 20, 2025 14:34
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.

5 participants