Please note that the license for this print is for the layer-change G-code only. The Roses of Unicofil flower used as an example remains “Attribution-NoDerivatives” and is itself unmodified in this print.
By dynamically adjusting the flow-rate to very low values (as low as 25% in this example), it is possible to create a lacy effect on a print.
I originally tried using a linear adjustment (based on the ratio of layer_z and the part's height), but I found that the laciness wasn't good enough. What I wanted was a gentler adjustment so that more of the print would have higher density while the laciness starts and increases gradually at the top.
The best way I found to do that was to use a sinusoidal function based on the ratio of the layer_num versus the total_layer_count. Unfortunately, PrusaSlicer doesn't support sin(x) in the G-code placeholders; it only supports basic arithmetic.
Then I discovered the Bhaskara I approximation that gave me a way to convert the sine function into a basic algebraic formula:
where x is:
(l is layer_num and t is total_layer_count.)
Substituting x in gives us (including the 100% → 25% flow-rate range factor):
That's quite complicated, but fortunately WolframAlpha simplified that down to just:
That then translates to this G-code that does all the magic:
;AFTER_LAYER_CHANGE
;[layer_z]
M221 S{min(95, 212.5 - (375.0 * total_layer_count * total_layer_count) / 2.0 / (layer_num * layer_num - 2.0 * layer_num * total_layer_count + 2.0 * total_layer_count * total_layer_count))}
This technique should work for lots of different items, not just flowers, although it may be possible to use this layer-change G-code as-is on other generally similarly-shaped flowers.
N.B. Hopefully this won't be a surprise to anyone. Due to the significant underextrusion, the top parts of the petals are fragile.
The author hasn't provided the model origin yet.