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.74k stars 1.93k forks source link

Jittery Interface Perimeters Multi-part Object #9070

Open Lukrative525 opened 2 years ago

Lukrative525 commented 2 years ago

Description of the bug

For multi-part objects where the meshes have a negligible gap between them (or perhaps slightly overlapping vertices), the interface perimeters are not smooth. These jittery perimeters are present with both classic and Arachne perimeter generators, and regardless of whether "Clip multi-part objects" is active. When there is a small gap between the meshes (In the example to follow, I used 0.0254mm), the jitteriness goes away. I made two models, one with a gap between meshes (left picture), and another with no gap (right picture).

For my specific application, I'm printing an object with custom modeled supports, so the jitteriness would show up on the printed part after the support material is dissolved away. For other multi-part object applications, this could result in improperly fused joints between parts of an object.

Expected result: two meshes which are touching each other should have smooth joints between them.

Project file & How to reproduce

jittery interface perimeters.zip

Sliced file. Parts with gap left, parts with no gap right: side by side sliced

Imported STL files. Parts with gap left, parts with no gap right: gap vs no gap

Checklist of files included above

Version of PrusaSlicer

2.5.0

Operating system

Windows 10 Pro

Printer model

Custom I3 Build

Lukrative525 commented 2 years ago

The interface is much improved if the meshes have a significant overlap, but the XY Size Compensation is not respected if this is the case. This is desirable if the multi-part object is being printed from two different colors (but same material), for example. You wouldn't want a gap at the interface.

Here we have two meshes which have a lot of overlap, and I have exaggerated the XY Size Compensation. overlapping meshes

From this, it appears that the jitteriness (in the case of meshes that are very close together) is being caused by the meshes overlapping slightly in some areas but not in others. Where there is overlap, the XY Size Compensation is being ignored, and where there is no overlap, it is not being ignored, causing the observed jitter.

I don't know if there's an easy way to address this problem. My first idea was this: for two objects that overlap, make the one that clips the other have a constant XY Size Compensation, and negate the XY Size Compensation for the other in the places where they overlap. This is only a partial solution though. The clipping mesh would produce smooth perimeters, but the clipped mesh would still produce jittery perimeters.

Edit: One way to skirt around this problem (at least in my case) would be to have an option for aligning two parts' origins, but still have them print as separate objects.