SoftFever / OrcaSlicer

G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.)
https://discord.gg/P4VE9UY9gJ
GNU Affero General Public License v3.0
5.86k stars 669 forks source link

Sinusoidal truss infill #5748

Open laukejas opened 1 week ago

laukejas commented 1 week ago

Is there an existing issue for this feature request?

Is your feature request related to a problem?

Description

Several closed-source, proprietary slicers have the option to generate a sinusoidal truss infill, typically used for parts printed vertically that have more or less consistent thickness. This infill is geometry-aware, meaning that it always tries to keep the same angle to the perimeter walls in the X/Y direction. In the Z direction, this infill shifts in a sinusoidal wave. Here are a few examples for reference:

340554514-7b54f25c-a30d-45c7-83c6-1ab92b7a9c2b

340554550-a89f7a9f-7974-4430-be6e-e00b6ad54b22

340554566-9377f915-0a8e-4d10-8141-41dd8c7a440c

Benefits

This infill is typically used for printing large and lightweight structures very quickly. When printed with a single perimeter, it allows printing with a constant toolhead and extruder speed and zero retractions, similar to Spiral Vase mode, which can be highly beneficial for lots of filament types, reduces the risk of clogs, failures or print defects, and results in a very weight-efficient structure.

Which printers will be beneficial to this feature?

All

Describe the solution you'd like

Slicer integration

This infill could be included with the rest of the infill types, with some setting specific to it:

  1. Truss angle - the target angle between the neighboring truss segment, default at 90°. Alternatively, this could be indirectly controlled with fill_density, as higher density would result in higher angles.
  2. Sine wave amplitude and frequency - determines the shape of the truss shift in the Z direction.
  3. Truss and sine wave offset - to allow the user to specify where the truss starts at the first layer, to allow lining up truss infill for parts that will be glued together.

Alternatively, if the requirements of this infill type are too inconsistent with other infill types, it could be treated as an Experimental Mode, or something similar to Spiral Vase (setting that adjusts multiple other settings to make it work).

Software implementation

The following is just a suggestion of how I'd do it. There might be a better way.

  1. For each layer, slicer should run a thickness analysis in XY direction, and determine two opposing perimeters that are closer than the other two. In the following picture - the blue lines:

340567014-0bbad3c6-e747-44e7-bc12-b79655b10ff5

  1. Pick an arbitrary point on one of the perimeters near the end, and determine a normal direction from that point (yellow):

340567644-7deaf009-cd74-4da2-90dd-743cf4af249f

  1. Extend a ray from that point at an angle that is half the user-specified truss angle, until it hits the opposing perimeter (green):

340568092-f9057e20-6b87-46ee-a638-aaf18f8f1ecb

  1. Repeat steps 2 and 3 to bounce the rays back and forth between the perimeters, until the last ray no longer hits the lines of the main perimeter pair. At each reflection point, an average between the user-specified truss angle and the perimeter normal direction will have to be calculated, to avoid the truss from developing a sawtooth pattern.

340571495-dd294dce-0926-4446-bd17-037ff1679ddb

  1. Generate infill lines on the rays.

  2. Move to the next layer, offsetting the ray deflection points in the X/Y direction to account for the change in part shape and the sine wave shape.

Describe alternatives you've considered

No response

Additional context

Final remarks

It is likely that this infill won't work for all parts universally, for example - parts that don't have obvious "thickness" to them, or it is extremely irregular. However, it should still work reasonably well for parts that have a reasonably consistent thickness, even if the opposing perimeters are not strictly offset from one another.

evilDave commented 3 days ago

I like the look of that. I think if you were careful about how you generate (i.e. exactly 2 places where 3 lines intersect) you could still print in vase mode (if your part was originally printable in vase mode)