Ultimaker / Cura

3D printer / slicing GUI built on top of the Uranium framework
GNU Lesser General Public License v3.0
6.17k stars 2.07k forks source link

Radial Infill #8811

Open GregValiant opened 3 years ago

GregValiant commented 3 years ago

The concentric infill is kind of OK. When the top layers go on they often fall through the cracks unless the infill is dense (especially if the top is also "Concentric"). If there were radial lines involved then things like wheels would be more robust as the loads would be directed at the center. In combination with concentric it would produce a grid. I would much prefer it to the current concentric style infill.

Describe the solution you'd like Concentric Infill. Concentric Infill with Radial infill. Radial infill.

Describe alternatives you've considered Using a grid.

Affected users and/or printers I expect the users would mostly be engineers and mechanical designers. All printers affected.

Additional context There would probably need to be minimum distancing or the radial infill would be extremely dense near the center, and maximum distancing to avoid being extremely sparse at the periphery.

alvgalrus commented 3 years ago

I think this would be really useful for internal supports, where you want more density in the center (opposite to the "gradient infill").

Ghostkeeper commented 3 years ago

Hmm, I could've sworn we've had this feature request a long time ago, with some drawings, but I can't find it now. There was this more recent incomplete issue: https://github.com/Ultimaker/Cura/issues/7405

There are 3 concerns that I'd wish to resolve before we can consider something like this:

alvgalrus commented 3 years ago

For the third question, just create a cilinder in the center, similar to the bottom shape in this image: https://i.pinimg.com/originals/c2/0e/ae/c20eae05d58d438de89914dfba7d975e.jpg

This could be a complement to the concentric infill, adding radii from the innermost layer structure.

GregValiant commented 3 years ago

Ghostkeeper, I'll think on it some more and see if I can address some of the programming concerns. From a mechanical perspective I can see such a feature as being very useful but maybe what I'm trying to accomplish is better left in the design stage than in the slicer. I'll leave this open for now and see if @alvgalrus has anything to add.

Thanks, Greg

pshunter commented 3 years ago

My 2 cents if it helps : as far as I understand concentric infill prints several hulls, offset inwards. Instead of doing inner walls parallel to the outer shell, radiant infill should grow orthogonally from the shell. However, this is quite complicated since in the cylinder case some of these infill lines should stop before reaching the center so the density remains somewhat constant. In the concavous case, lines should start at a some distance from the shell to conserve density. I believe doing concentric + radial might be easier, just interconnect inner infill walls with orthogonal lines, like in : example

GregValiant commented 3 years ago

I would find that acceptable. In the case of cylinders, there could be a cutoff once a minimum distance was reached between the "spokes" of infill. This is not an easy one to accomplish. It's something I wanted for Christmas and I thought I'd ask Santa Cura for it.

Ghostkeeper commented 3 years ago

I get the rough idea of that, but it has a problem.

There are examples where it's a bit ambiguous what should happen. In your drawing above you have corners that look a bit like this: concentric1 Note that the spoke density is not consistent on the inside nor the outside here. There are spokes on the inside very close together, but on the outside they are further apart than in the rest of the model too.

If you stretch that to a bit of a more extreme example, you get something like this: concentric2

But I'm wondering what should happen if it doesn't just stretch that corner straight up, but with a bend, like this: concentric3

We could make the spoke density consistent on the inside and let the spokes land on the outside wherever it intersects first. But that would then create a weak point in this bend since it's got no infill lines at all. It's not an uncommon case either. You can see it starts to happen in Pshunter's drawing already in the innermost contour in the bottom right.

And the question remains what the use case of this infill is. Without a use case I see no reason to develop a new type of infill. Is it better in any way than the existing solutions? I'm seeing a lot of retractions here.

GregValiant commented 3 years ago

The ellipses are closer to what I had in mind. In the case of circles and ellipses any point on the exterior is "in view" of the center point of the radial infill. In your Dr. Seuss model when the inside walls get out of "line-of-sight" of the picked center then yes, the idea falls apart. I can see where it would not be any more advantageous to have radial + concentric as opposed to the grid + concentric.

Here is a view of concentric with Grid. I think it helps to firm up the concentric infill and would provide structure to lay down a concentric top surface.

Grid and Concentric

Ghostkeeper commented 3 years ago

Yeah, it'd be more rigid than normal concentric that way. But not more rigid than just grid or triangular, right?

Luke2642 commented 3 years ago

What if we call this 'perpendicular struts' to augment concentric infill?

Whatever calculation is done the calculate concentric lines, it just needs flipping by 90 degrees every X mm, then extending until it touches the wall or another concentric infill line?

This solves the origin symmetry problem and the eclipses above.

The use case for me is printing stiff, light wheels that have very high dimensional accuracy. At the moment I solve this problem by using a pattern of infill lines that rotate layer by layer, [0,90,15,105...] which eliminates warping in any direction, but adds a lot of infill.

To be clear, triangular, cubic or any other infill pattern does not solve this issue for me. The parts need to be very balanced with a high degree of rotational symmetry.

Concentric + perpendicular struts would be more optimal.

Ghostkeeper commented 3 years ago

If you take the perpendicular line from the inside out rather than from outside in, and interrupt it on the first contour it hits going outwards, it wouldn't intersect any more. You'd have an uneven strength then if the object has any corners that are not radially symmetrical.

How would we make sure that the struts end up on the same place as struts on the previous layer as long as the shape is not discontinuous between layers? Or should they just be left bridging every layer?

Luke2642 commented 3 years ago

Correct Ghostkeeper, tradeoffs are expected. Uneven strength, uneven warping and uneven weight distribtuion are the current trade offs when using e.g. triangular infill with a circular object. In general, it's safe to say very few model geometries match any infill pattern to give even strength at low densities.

To answer your strut placement question: The concentric lines placement algorithm copes with the changing perimeter between layers, and discontinuities. As long as a similarly 'stable' algorithm is used, with a small change in output for a small change in input, a small amount of bridiging will be an acceptable compromise.

gitcnd commented 3 years ago

What's really needed for shapes like wheels is some kind of radial snowflake* infill, so that the wheel loads are uniformly distributed between the inner of the rim and the outer of the tread.

Luke2642 commented 3 years ago

Specifying "maximum and minimum incident angle that infill lines can meet walls" could get us 80% of the way there with this feature and be simpler to implement.

If a tight range was specified (say 85 to 95 degrees) using any normal infill pattern, then a "second pass" with the same infill pattern but rotated at e.g. 90 degrees would fill some the gaps. Then maybe a third pass at e.g. 45 degrees, etc?

Alternatively, pseudocode for the patterns described could go something like this:

  1. Draw normal concentric infill every C mm.
  2. For each {outer wall or concentric infill line}
    • pick any point on where infill met that line in the previous layer. If none exist, pick a random point.
    • draw an 'radial' infill line at 90 degrees to the outer/concentric infill line
    • When it collides with a wall or infill line, continue to draw an infill line alongside/slightly overlapping that line for T mm (creating @gitcnd's Y branches, with a bit of extra joining strength, like infill line multiplier). Stop if if any other line is encountered.
    • pick another point on the outer wall X mm distance away, and repeat with the next in the for-each loop.
    • if {no points on exist on each outer wall or each concentric infill line within X mm without a 'radial' line} : stop.

In some models determining the approximate centre of mass of the layer if it were 100% infill and then drawing towards that instead of 90 degrees could work, but that would be a 'nice to have' extra option.

emab123 commented 2 years ago

Hey guys, I'll be reviving this thread since I recently encountered a use case where such radial infill would be extremely useful.

I wanted to print a sort of pythagoras cup in which the external radius was determined by the size of the mount it was supposed to fit and the internal radius was determined by the volume it was supposed to hold. Therefore, the walls ended being somewhat thick on a big part, requiring a lot of infill. I only needed it to be stiff on the radial axis in order to maintain its volume, so I was very disappointed when I couldn't find any infill pattern that efficiently matched my load case. Take a look at this layer view:

image In this case I wanted to make the inner wall as stiff as possible, so I would prefer an infill that creates lines perpendicular to the inner wall (For the purpouse of this infill, the inner wall is the one closest to the part's center of mass). However I think there will be a lot of cases when someone wants to make the outer wall the stiffer, so it might be a good idea to offer the option of having either the inner of outer wall as the root of the radial line. Alternatively, a least material option in which each point of the the inner wall is connected to the closest point of the outer wall would eliminate any crossings of radial lines while offering somewhat of a midterm between inner and outer wall stiffness.

I believe that with these three settings most load cases will be covered if the radial wall stength is more important than than the layer adhesion strength. So the infill algorithm migh look a litte bit like this:

Draw a concentric infill every C mm (which influences the Z strength and radial line overhang) and determine it's print area. Draw each radial line, based on the root wall setting and the infill percentage. This could be done somewhat like this: 2.1. Determine the desired radial lines area (DRLA) by multiplying the total infill area by infill percentage and then subtracting the concentric infill area; 2.2. Calculate an estimated radial line count (ERLC) by dividing the DRLA by the average of the inner and outer wall perimeters and the line width; 2.3. Draw radial lines from the root wall according to the selected radial line option. The perimetric distance between the starting points shall be the perimeter of the root wall devided by the ERLC.

2.4.1 Add the areas of the drawn radial lines and compare it to DRLA. Adjust ERLC and go to step 3 until the adjustment is oposite to a previous adjustment. 2.4.2. If the perimetric distance between the starting points on the root wall is less than the line width, maintain the drawn lines and start drawing lines on a new layer, that starts when the distance between adjacent lines is equal to the line width. You can define the start point location of the Nth line on the new layer as a point on a line averaging the Nth and N+1th lines of the first layer with a perpendicular distance between it and the first layer's Nth line equal to a line width, such as visualized in the following image: image 2.4.3 Create new layers if there is no more space between the lines of the previous layer. If there is no more space in in the final layer, define the infill as 100% concentric.

daniels220 commented 1 year ago

@emab123 Your explanation in the now-closed CuraEngine#1635 is much more complete than what you have here—might you edit your comment and copy it over?

While I'm here, let me add another use-case for this pattern: supports. If the part being supported is relatively thin, mostly walls, the best support structure for it (easiest to remove relative to how effective it is as support) is going to be essentially a ladder or zigzag whose rungs are perpendicular to the walls it is supporting:

radial-support-01

radial-support-02

The "ladder" form would naturally come out of this proposal (with one support wall). The zigzag is actually better, though, so it might be better to approach it with that in mind as a separate proposal. Except, it's also important to have a pattern that is just the perpendicular lines, no outer walls or zigzag at all, which I would use for the support interface, again for ease of removal (this is a top-down view—the top few layers would have only the purple lines, then the blue lines would appear once we get out of support interface):

radial-support-03

emab123 commented 1 year ago

Splendid idea @daniels220 ! This should dramatically improve printing times for perimetric overhangs. However I feel like that would be a different issue. What do you think about moving this idea to a new issue so we can discuss specifically the infill around here?