Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1981 +/- ##
=======================================
Coverage 92.42% 92.43%
=======================================
Files 45 45
Lines 9917 9922 +5
=======================================
+ Hits 9166 9171 +5
Misses 751 751 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
zmerlynn
approved these changes
Nov 16, 2026
zmerlynn
left a comment
Collaborator
There was a problem hiding this comment.
Thanks, looks good. Locally, with MANIFOLD_PAR=OFF, the output hashes the same as master for 7 shapes and every pair of channels from {-1, 0, 1, 3, 7}. That covers aliased channels, channels past the current numProp, and an empty input. A 131k-triangle sphere also matches. I also tried guarding the mean block on the Gaussian buffer, and CurvatureChannels catches it. A mean-only call on that sphere went from about 31 to 28 ms serial for me.
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.
Problem
CalculateCurvatureaccepts a negative channel index to leave that result unstored, and mean-only calls are used by the smoothing examples/tests. The implementation still allocates both curvature buffers and calculates both results for every triangle.Changes
Allocate and accumulate only the requested curvature channels. Skip the mean-curvature dihedral calculation when the mean channel is negative, and skip the Gaussian corner-angle calculation when the Gaussian channel is negative. Keep the shared area/degree calculation and the final property-channel writes unchanged.
Add coverage for mean-only and Gaussian-only requests on smooth, faceted, and concave inputs, both overwriting existing channels and extending the property set. The test also checks preserved channels and input immutability.
Validation
Properties.*,Smooth.*, and the curvature error-propagation test), using GCC 14.2, Release, assertions/debug checks enabled, andMANIFOLD_PAR=OFF.8 * NumVert()= 524,304 bytes.git diff --checkpass.The benchmark records allocation requests during the actual public operation. Timing samples varied across runs, so this change makes no elapsed-time improvement claim. Source, raw results, full-field hashes, and native-test logs are in the validation record.