Skip to content

Comments

fix(slicing): fix settings mesh alignment for angled slicing#97

Merged
liamnwhite1 merged 3 commits intodevelopfrom
fix/settings-mesh-alignment-for-angled-slicing
Dec 9, 2025
Merged

fix(slicing): fix settings mesh alignment for angled slicing#97
liamnwhite1 merged 3 commits intodevelopfrom
fix/settings-mesh-alignment-for-angled-slicing

Conversation

@liamnwhite1
Copy link
Collaborator

This pull request introduces improvements to the cross-sectioning and skeleton region processing logic to ensure consistent alignment, simplify interfaces, and improve debug traceability. The main changes include updating the cross-section function to optionally preserve input shifts for mesh alignment, propagating this alignment through the buffered slicer and settings geometry, and refactoring skeleton region methods to use internal state for layer tracking and debugging.

Cross-sectioning and mesh alignment improvements

  • The doCrossSection function in cross_section.h and cross_section.cpp now accepts a preserve_input_shift parameter, allowing multiple meshes to share the same flattening transform when slicing with an angled plane. This ensures consistent alignment of settings and build geometry. [1] [2] [3] [4]
  • The computeSettingsPolygons method in buffered_slicer.h and buffered_slicer.cpp now takes a base_shift parameter, propagating the primary mesh's shift to settings geometry for proper alignment in 2D space. Geometry is translated if needed to match the base shift. [1] [2] [3]

Skeleton region refactoring and debug improvements

  • The Skeleton region class now stores the current layer number internally (m_layer_num) and uses it for debugging and geometry cleaning, replacing previous method signatures that passed the layer number as a parameter. This change affects simplifyInputGeometry, inspectSkeleton, and related debug output. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Debug output for skeleton geometry cleaning and inspection now consistently reports the correct layer number via the internal state, improving traceability during development and troubleshooting. [1] [2] [3] [4] [5]

Minor interface and documentation updates

  • Documentation comments and parameter lists have been updated in several header files for clarity and consistency, especially regarding the new alignment and shift-preservation features. [1] [2]
  • Minor code style and parameter passing improvements were made, such as using references and const correctness in lambda functions. [1] [2]

These changes collectively improve the reliability and maintainability of cross-sectioning and region processing, especially when handling complex multi-mesh slicing scenarios.

@liamnwhite1 liamnwhite1 self-assigned this Nov 24, 2025
@liamnwhite1 liamnwhite1 merged commit a770640 into develop Dec 9, 2025
4 checks passed
@liamnwhite1 liamnwhite1 deleted the fix/settings-mesh-alignment-for-angled-slicing branch December 9, 2025 16:11
@liamnwhite1 liamnwhite1 restored the fix/settings-mesh-alignment-for-angled-slicing branch February 6, 2026 19:01
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.

1 participant