Skip to content

Fix internal bridges over Hilbert Curve / Octagram Spiral sparse infill - #5

Draft
aceRage wants to merge 3 commits into
mainfrom
cursor/fix-internal-bridges-hilbert-octagram-4b7b
Draft

Fix internal bridges over Hilbert Curve / Octagram Spiral sparse infill#5
aceRage wants to merge 3 commits into
mainfrom
cursor/fix-internal-bridges-hilbert-octagram-4b7b

Conversation

@aceRage

@aceRage aceRage commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Description

Port of OrcaSlicer/OrcaSlicer#15206 (open, mergeable) into Snapmaker-Ultra.

Internal bridges over Hilbert Curve and Octagram Spiral sparse infill could be generated mid-air because determine_bridging_angle() sampled every local turning direction, then applied a blind Hilbert/Octagram offset. This port:

  • Uses the supporting (lower) layer's rotation template + 90°, plus model alignment, for Hilbert/Octagram bridge angles
  • Keeps real sparse-infill anchors instead of replacing them
  • Samples curved bridge boundaries at 4× resolution (scan_spacing)
  • Sets params.extrusion_role on the anchoring fill path so plane-path origins match make_fills()

Ultra-specific adaptations

  • calculate_infill_rotation_angle already existed in Fill/Fill.cpp and is export-only via Fill.hpp. It is not duplicated.
  • Ultra's Fill.hpp is the thin Filler wrapper; the helper is declared there so PrintObject.cpp can share the same rotation grammar as infill generation.
  • generate_sparse_infill_polylines_for_anchoring did not set extrusion_role; that is now wired like make_fills().
  • Ultra has no relative_bridge_angle, sparse_infill_smooth_factor, or separated_infills. Those Orca keys were not introduced.
  • Ultra still has an active 3D Honeycomb / Cross Hatch fixed-angle fallback. That behavior is preserved at the call site (Orca had already commented it out of the helper).
  • Tests use Ultra's init_print(..., config, comments) signature (no nullptr slicer argument).

Paint-depth paths are untouched. Unrelated bridge_over_infill logic outside the PR hunks is unchanged.

Screenshots/Recordings/Graphs

See upstream PR screenshots: OrcaSlicer#15206

Tests

Ported/adapted from Orca#15206:

  • Sparse plane-path anchors match the printed infill — Hilbert / Octagram / Archimedean, multiline, rotation
  • Internal bridge angles follow the lower infill layer and model rotation
  • Turning infill does not replace the anchors of another region

Cloud compile limits: this environment cannot build the full slicer / fff_print_tests binary. Please run locally after deps are available:

cmake --build build --target fff_print_tests --parallel
./build/tests/fff_print/fff_print_tests "[InternalBridge]" --order rand --warn NoAssertions
Open in Web Open in Cursor 

cursoragent and others added 3 commits September 4, 2026 04:09
…on_role (OrcaSlicer#15206)

Export the existing rotation helper through Fill.hpp and set
params.extrusion_role in generate_sparse_infill_polylines_for_anchoring
so plane-path origins match make_fills().

Co-authored-by: aceRage <aceRage@users.noreply.github.com>
)

Select Hilbert/Octagram bridge angles from the supporting layer's
rotation template and model alignment, keep real sparse anchors, and
sample curved boundaries at 4x resolution. Preserve Ultra's
3D Honeycomb / Cross Hatch fixed-angle fallback at the call site.

Co-authored-by: aceRage <aceRage@users.noreply.github.com>
Port OrcaSlicer#15206 regression coverage for plane-path anchor
alignment, Hilbert/Octagram bridge angles, and multi-region isolation.
Drop Ultra-missing keys (sparse_infill_smooth_factor, separated_infills,
relative_bridge_angle) and adapt init_print to the local test helper.

Co-authored-by: aceRage <aceRage@users.noreply.github.com>
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