bambulab / BambuStudio

PC Software for BambuLab and other 3D printers
GNU Affero General Public License v3.0
1.86k stars 261 forks source link

X-Y Compensation Offsets Inner Surface with Through Holes #3817

Open zhangyx1998 opened 5 months ago

zhangyx1998 commented 5 months ago

Bambu Studio Version

1.8.4.51

Where is the application from?

Bambu Lab Official website

OS version

MacOS 14.3.1

Additional system information

N/A

Printer

Bambu Lab A1 Mini

How to reproduce

  1. Load a cylindrical model with through holes on its wall (minimum reproducible example: Contour_vs_Hole.stl.zip).
  2. Configure X-Y Hole Compensation (x1) and X-Y Contour Compensation (x2) to a different value, i.e. x1 !== -x2.
  3. Slice the model.
sample model and configuration

Actual results

Inner surface of the layers with holes are offset from other layers. i.e. an extra "ring" was printed on the inner surface, with exactly the same heights of the through hole.

Expected results

Demonstrative Cross Sectional View:

Expected Actual
expected actual

Project file & Debug log uploads

Project file is not necessary for this specific issue.

The problem arises because the hole breaks the topology of a layer, making the inner wall part of the outer contour. The slicer would then apply outer wall expansion on the inner wall contour, which is actually supposed to be shrunk instead of expanded (under given configuration).

Sliced layers:

Normal layer Layer with one or more holes
normal condition layer with hole

This is kind of the "expected" behavior according to topology, but it destroys the inner surface of the model. In my use case, I need a perfect smooth inner surface to create a sliding fit.

Possible solutions:

  1. Instead of checking the direction of a contour line, use the curvature of the path (i.e. inward v.s. outward) to calculate the offset. i.e. Higher inward/LHS curvature corresponds to smaller hole, and should be shrunk more, and vise versa.

    This should be a more precise way to model the extrusion expansion. This looks like the ideal and optimal solution to me.

  2. Insead of offset each layer, apply the compensation to the meshed model before slicing.

Checklist of files to include

zhangyx1998 commented 5 months ago

This problem also exists on objects with semi-open holes and complex geometries. An example image is attached. The "holes" denoted in red lines are supposed to be shrunk instead of being expanded.

Additional Problem

In these cases, the expansion could only be reliably calculated from the local curvature of contour paths.

LMK if you would like to investigate on this more, I would be happy to help implementing some algorithm.

BambulabRobot commented 1 month ago

This issue has been marked as inactive due to no response for 90 days.