Skip to content

feat: Z Anti-Aliasing (ZAA) non-planar contouring#9727

Open
mnott wants to merge 2 commits intobambulab:masterfrom
mnott:feature/zaa-contouring
Open

feat: Z Anti-Aliasing (ZAA) non-planar contouring#9727
mnott wants to merge 2 commits intobambulab:masterfrom
mnott:feature/zaa-contouring

Conversation

@mnott
Copy link

@mnott mnott commented Feb 10, 2026

Summary

Adds Z Anti-Aliasing (ZAA) — a non-planar contouring post-processing step that smooths staircase artifacts on curved surfaces by micro-adjusting Z heights during extrusion. Based on the BambuStudio-ZAA implementation by AdoC3.

  • Integrates ZAA as a toggleable per-object setting (disabled by default)
  • Adds contouring parameters: max angle, smoothing radius, transition width
  • Post-processes G-code to replace discrete layer boundaries with smooth Z transitions
  • Verified output: 1,306 unique Z heights vs 85 without ZAA, with only 3 redundant Z moves

Changes

  • 81 files modified, +2,447/-214 lines
  • Core ZAA engine in src/libslic3r/NonplanarSurface/
  • G-code post-processing in GCode.cpp and GCodeWriter.cpp
  • UI integration: print settings panel, preset handling
  • Build system: build.sh for macOS, BUILD.md walkthrough
  • Documentation: docs/ZAA.md
  • Network plugin compatibility fix for third-party builds

Test plan

  • Verified ZAA output quality with test model (quadlock)
  • Compared with/without ZAA: correct Z interpolation, minimal redundant moves
  • macOS arm64 build, sign, notarize — full release tested
  • Network plugin downloads and loads correctly
  • Windows / Linux build verification (untested)

Matthias Nott added 2 commits February 10, 2026 02:43
Port of ZAA from BambuStudio-ZAA (github.com/adob/BambuStudio-ZAA)
to stock BambuStudio. ZAA eliminates stair-stepping on curved surfaces
by raycasting each extrusion point against the mesh and adjusting
Z height to follow the true surface geometry.

Changes:
- Core algorithm: ContourZ.cpp (~330 lines) performs vertical raycasting
- 3D geometry: Point3, Line3, Polyline3, MultiPoint3 extensions
- ExtrusionPath::polyline changed from Polyline to Polyline3
- GCode writer emits per-point Z when path.z_contoured is set
- Pipeline step posContouring in PrintObject after perimeter/infill gen
- 5 new print settings under Quality (zaa_enabled, zaa_min_z, etc.)
- GUI integration: config options, preset registration, search support
- Guard for missing resources/nonplanar/ directory
- cmake_minimum_required bumped to 3.5 for CMake 4.x compatibility
- Build script, build guide, and release guide for macOS
- Change SLIC3R_VERSION from 02.05.01.52 to 02.05.00.52 to match
  the network plugin available on Bambu's servers (02.05.00.56).
  The first 8 chars must match for check_networking_version().
- Force ignore_module_cert=true since our Developer ID certificate
  differs from Bambu Lab's, causing IsSamePublisher() to reject
  the downloaded plugin.
@digitalresistor
Copy link

digitalresistor commented Feb 12, 2026

\o/ this would be great to have in a released version of BambuStudio! Thanks for doing the work of getting an MR put together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants