Ultimaker / CuraEngine

Powerful, fast and robust engine for converting 3D models into g-code instructions for 3D printers. It is part of the larger open source project Cura.
https://ultimaker.com/en/products/cura-software
GNU Affero General Public License v3.0
1.66k stars 876 forks source link

[CURA-10407] Introduce fractional layer-height support gaps #1955

Closed rburema closed 8 months ago

rburema commented 10 months ago

Support gaps (z distance) between the model(s) and the support can be non-multiples of layer-heights now.

github-actions[bot] commented 10 months ago

Unit Test Results

26 tests  ±0   26 :heavy_check_mark: ±0   15s :stopwatch: +6s   1 suites ±0     0 :zzz: ±0    1 files   ±0     0 :x: ±0 

Results for commit 4a094517. ± Comparison against base commit d9523056.

:recycle: This comment has been updated with latest results.

wawanbreton commented 8 months ago

I'm afraid the current implementation breaks the supports with a 0 Z-distance (which works properly in 5.5): image image

wawanbreton commented 8 months ago

Also there is a strange behavior: when I set a 0.2mm Z-distance with a 0.1mm layer height, I get only one empty layer between support and model. On 5.5 I get two empty layers as I would expect.

rburema commented 8 months ago

The last two may be related -- there could be an off-by-one error?

wawanbreton commented 8 months ago

Yeah maybe :) It looks like the "intermediate" layer height grows in the wrong direction. When reducing the gap, the layer becomes sparser, which should be the opposite.

rburema commented 8 months ago

... haha oh no, that's a bit embarrassing. It does sort of explain all the other bugs as well though.

wawanbreton commented 8 months ago

Yeah I think it's all the same problem, and it should be easy to fix.

wawanbreton commented 8 months ago

Forget my last comment... When the gap grows, the intermediate layer becomes sparser. That is expected. But when it finally become null-height, then it is printed as if it was full height.

rburema commented 8 months ago

I see. Still probably an easy fix, just avoid the 'exactly zero' scenario.

wawanbreton commented 8 months ago

Just tested new version : 0mm gap works again, but now it does not take care about the "full" layers for the gap: actual maximum distance between support and model is at most 0.99*layer_height

rburema commented 8 months ago

Last commit should fix that, I think. Tested it with support roof on and 0.2 layer height, gaps of 0.4, 0.45, 0.55, 0.6 all gave the expected results (z gaps of; 2 full layers, 2+ layers, 2+ layers, 3 full layers respectively).

edit Oh, and 0mm works as well. The top layer does get split into parts 'just below model' and other parts, but I'm not sure if that's a problem, as it does have continuity with the other behaviour.