Repository navigation
fix(core): open_top guard, deterministic bevel(all/sharp), and centered voxel remesh (Fixes #93, Fixes #94, Fixes #81) - #98
Merged
wrong-nebula merged 2 commits intoDec 4, 2026
Conversation
…ed voxel remesh (Fixes wrong-nebula#93, Fixes wrong-nebula#94, Fixes wrong-nebula#81)
# Conflicts: # crates/forma-core/tests/kernel_tests.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes three independent
forma-coregeometry/determinism issues:1. Reject
open_top=truewhen no flat top face exists (Fixes #93)solidify_mesh(crates/forma-core/src/deform.rs) to track how many top faces were removed whenopen_top == true. If zero faces matched (sphere(), horizontalcyl(),torus()), returns a clear error (open_top=true found no flat top face to open) instead of silently producing a sealed 2-component hollow shell.2. Deterministic face & UV ordering in
bevel_general_polyhedron(Fixes #94)adj.edge_faceskeys before bridging bevel quads and replacedHashMapwithBTreeMapforv_to_facescorner patches (crates/forma-core/src/ops.rs), eliminatingHashMaprandomization across runs sobevel(all)/bevel(sharp)and downstreamunwrap()produce byte-identical outputs.3. Center voxel grid & snap Y/Z edges in
remesh_voxel(Fixes #81)bb.center()(adapting half-cell shift whenspan < hor boundaries lie near half-integers) and projected triangles onto(x, z)and(x, y)scanlines via a sharedproject_tri_scanlineshelper so Y and Z edge crossings snap to exact triangle intersections just like X edges, eliminating the-0.5 * hY/Z shift.Verification
test_issue_93_open_top_requires_flat_top_face,test_issue_94_bevel_general_polyhedron_is_deterministic, andtest_issue_81_remesh_voxel_preserves_center_all_axesincrates/forma-core/tests/kernel_tests.rs.cargo test --locked --release -p forma-core -p forma-lang -p forma-cli -p forma-mcp -p forma-server -- --skip test_10000_fuzzed_modeling_operations_zero_crashes_zero_nans: all passed.