prusa3d / PrusaSlicer

G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)
https://www.prusa3d.com/prusaslicer/
GNU Affero General Public License v3.0
7.76k stars 1.93k forks source link

[Request] Making gyroid infill watertight #2596

Open androandra opened 5 years ago

androandra commented 5 years ago

Version

Version 2.0.0+win64

Operating system type + version

Windows 10

3D printer brand / version + firmware version (if known)

Prusa i3 MK3s with MMU 2.0, running marlin firmware version 3.7.1-2266

Behavior

The Gyroid infill is awesome, beautiful and stiff as well as strong. I really like it, so props for implementing that!

I recently learned that the gyroid is a doubly interpenetrating network, meaning that there are two seperate cavities like hinted at in the picture below. 9770ed9120aa5b012297cc9523a9eb8d_preview_card

This gave me a lot of inspiration to try and fill out the two cavities in the gyroid pattern with different dyes, glitter or other showy stuff. This would be especially awesome for prints with transparent filament! However I notice that the sliced infill is not actually watertight in the transition layer from x-direction waviness to y-direction waviness, as you can see on the screenshot here (layer height 0.2mm). It probably doesn't influence the structural integrity of the infill pattern too much, but it makes it impossible to have two separate cavities. Capture

It gets much better when using a very small layer height, like 0.05mm, as you can see in the picture here. In this case it looks like the transition layer is completely closed. 0.07mm also seems to do the job. image

However it seems like overkill to print 0.05mm layer height just to get a bit more structural detail in very specific sections of the infill. This could be fixed manually by using variable layer height or modifier structures, but it's difficult to predict where the transition layers are gonna be after slicing.

My feature request is therefore to implement a check mark option "Close gyroid infill watertight", which ensures that the layer height is decreased ONLY for the gyroid infill, and ONLY around the relevant transition layers. The layer height could be dropped to 0.07mm for two or three layers around the transition layer.

bubnikv commented 5 years ago

What benefits do you expect the watertight gyroid will bring?

edit

This gave me a lot of inspiration to try and fill out the two cavities in the gyroid pattern with different dyes, glitter or other showy stuff. This would be especially awesome for prints with transparent filament!

I see.

By the way, just extruding thinner layers will not work as you will still have extreme overhangs. You would have to over-extrude IMHO to fill in the gaps at the overhangs completely.

androandra commented 5 years ago

I'm not sure I understand why it wouldn't work. I would actually expect that printing extreme overhangs in e.g. domed structures is easier to print with a smaller layer height, since the new layer will have to cover less unsupported area.

But yeah, over-extrusion would definitely help to close up any small gaps.

wavexx commented 5 years ago

What benefits do you expect the watertight gyroid will bring?

I'm also curious about this.

Structurally speaking, filling that gap completely won't bring any advantage with FDM as long as the layer height allows to support the underlying bridging, which is generally the case.

I agree that currently at some gyroid densities/layer heights/nozzle sizes the results are suboptimal. In these cases I manually increase the density.

androandra commented 5 years ago

What benefits do you expect the watertight gyroid will bring?

I'm also curious about this.

Well, not more than aesthetic pleasure. If it was watertight, then the two compartments would be sealed off from one another, which provides interesting options for filling them with various stuff.

And I understand if it's not worth the effort to implement, but hey, it'll definitely never be implemented if no one posts the idea.

Structurally speaking, filling that gap completely won't bring any advantage with FDM as long as the layer height allows to support the underlying bridging, which is generally the case.

I'm aware that I won't gain any structural strength or stability.

I agree that currently at some gyroid densities/layer heights/nozzle sizes the results are suboptimal. In these cases I manually increase the density.

That works for me too, but because I can't predict where the gyroid pattern will be before slicing, I can't localize where to increase the density. The obvious solution is to increase density of the whole print, but it takes sooooo much longer!

wavexx commented 5 years ago

Well, not more than aesthetic pleasure.

I do completely agree with this :)

IMG_20190701_203836

This solid was constructed manually and printed "just for looks". I manually adjusted the layer height at the overhangs using the built-in variable-height feature. It did work pretty well. There are still gaps, but that was mostly my fault as I printed this completely hollow. Solid infill would have closed the volume.

That works for me too, but because I can't predict where the gyroid pattern will be before slicing, I can't localize where to increase the density. The obvious solution is to increase density of the whole print, but it takes sooooo much longer!

Thinking out loud, gyroid infill could hint the built-in variable height map in order to reduce the gaps, but infill by itself doesn't have the ability to trigger extra rectilinear areas to close the gaps you see above.

aleksclark commented 3 years ago

I have a structural use case that would benefit from making the gyroid surface continuous regardless of layer height: I'm printing airplane wings. Gyroid infill seems to offer a higher degree of rigidity/weight than other infills, but at low infill % (1-2%) there are a lot of gaps. It seems like some sort of scaling could be applied to the spacing, so that the gyroid looks 'stretched' but there is enough overlap between the layers to allow even further reduction of the infill %.

pmarks-net commented 8 months ago

Here's an idea: Normally gyroid transitions directly from the red pattern ⩆ to the blue pattern ⫗. What if you add this hypothetical green pattern that bridges the gap using Z/N-shaped squiggles? The number of squiggles is odd, 3 in this example.

gyroid

In order to transition from green back to blue, the green layer also needs to support the missing blue segments, using a second pass represented by this pink line (apologies to the colorblind). Extrusion should be disabled when pink is adjacent to green:

gyroid2

The green/pink layer is topologically a grid, so it could also be drawn in the perpendicular direction. Adding +2 axes of connected filament would probably improve strength.

Looking at green and pink together, there are probably better ways to draw the grid, e.g. let green bridge straight across (the degenerate 1-squiggle) leaving more room for pink. Maybe let pink run alongside green without retracting, similar to Honeycomb infill.

Here's a simpler visualization of the grid layer: grid

The last image appears optimal, and there is precedent for doing this in PrusaSlicer:

Grid: This is one of the simplest and fastest variants of infill. Unlike rectilinear, it’s printed in both directions (rotated by 90°) in each layer. This way, material accumulates in spots where the paths cross.