Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change curvature API #448

Merged
merged 3 commits into from
Jun 10, 2023
Merged

Change curvature API #448

merged 3 commits into from
Jun 10, 2023

Conversation

elalish
Copy link
Owner

@elalish elalish commented Jun 8, 2023

I decided to update the curvature API, since I never much liked returning a list that one can only hope stays correlated to output vertices. Now that we have a properties API, I've updated this to simply fill that in as desired. I plan to follow this pattern to add a CalculateNormals API, which I swear I discussed with someone here, but I can't find the thread now. This is a breaking change, but I don't think we have many users of curvature yet.

@geoffder I removed the c bindings related to the old API - the new one should be a lot simpler. I figure you can add it in when you have a chance?

@elalish elalish added this to the v2.2 milestone Jun 8, 2023
@elalish elalish self-assigned this Jun 8, 2023
@codecov
Copy link

codecov bot commented Jun 8, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.10 🎉

Comparison is base (2643c29) 89.66% compared to head (5e82050) 89.77%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #448      +/-   ##
==========================================
+ Coverage   89.66%   89.77%   +0.10%     
==========================================
  Files          35       35              
  Lines        4249     4274      +25     
==========================================
+ Hits         3810     3837      +27     
+ Misses        439      437       -2     
Impacted Files Coverage Δ
src/manifold/include/manifold.h 100.00% <ø> (ø)
src/manifold/src/impl.h 72.72% <ø> (ø)
src/utilities/include/public.h 67.05% <ø> (ø)
src/manifold/src/manifold.cpp 92.36% <100.00%> (+0.42%) ⬆️
src/manifold/src/properties.cpp 84.71% <100.00%> (+3.37%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -229,7 +229,7 @@ Module.setup = function() {
};

Module.Manifold.prototype.setProperties = function(numProp, func) {
const oldNumProp = this.numProp;
const oldNumProp = this.numProp();
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a bug - reading existing properties didn't work before.

@geoffder
Copy link
Collaborator

geoffder commented Jun 9, 2023

Sounds goos, I'll plan to add the new bindings after these changes are in.

@elalish elalish merged commit e727b11 into master Jun 10, 2023
@elalish elalish deleted the getCurvatureAPI branch June 10, 2023 05:36
@elalish elalish mentioned this pull request Nov 3, 2023
cartesian-theatrics pushed a commit to SovereignShop/manifold that referenced this pull request Mar 11, 2024
* new curvature API compiles

* tests pass

* update JS example and fix bindings
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