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

Remove Mesh from interface + memcpy depuplication #313

Merged
merged 1 commit into from
Jan 29, 2023
Merged

Remove Mesh from interface + memcpy depuplication #313

merged 1 commit into from
Jan 29, 2023

Conversation

geoffder
Copy link
Collaborator

In addition to the cleanup in the closed PR, I've removed Mesh from the interface in the spirit of your intention to keep it as a C++ only implementation detail.

@codecov
Copy link

codecov bot commented Jan 28, 2023

Codecov Report

Base: 91.36% // Head: 91.36% // No change to project coverage 👍

Coverage data is based on head (acb1685) compared to base (f43dded).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #313   +/-   ##
=======================================
  Coverage   91.36%   91.36%           
=======================================
  Files          33       33           
  Lines        3626     3626           
=======================================
  Hits         3313     3313           
  Misses        313      313           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

Copy link
Owner

@elalish elalish left a comment

Choose a reason for hiding this comment

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

Thanks, less code is always nice!

ManifoldMesh *manifold_level_set(void *mem, float (*sdf)(float, float, float),
ManifoldBox *bounds, float edge_length,
float level) {
ManifoldMeshGL *manifold_level_set(void *mem, float (*sdf)(float, float, float),
Copy link
Owner

Choose a reason for hiding this comment

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

You might consider returning a Manifold instead. I return a Mesh so there isn't a dependency, but here I'd guess the whole point would be to do further operations. It'll be fastest to push the Mesh directly into the Manifold constructor without the intermediate MeshGL step in this case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In the higher level bindings I do provide a direct to manifold function (by including the manifold construction), but I suppose I could also expose one directly in the C. I think it still makes sense to have a mesh returning version in the case the user plans to go straight to pulling out / using properties.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thinking about it a bit more, providing a straight to manifold version would mean two more, rather than one more function since there already has to be a forced sequential version. Since it is so simple to provide the higher level direct manifold function in the FFI bindings, I think the MeshGL version should be sufficient for the C side.

@elalish elalish merged commit bbb1fab into elalish:master Jan 29, 2023
cartesian-theatrics pushed a commit to SovereignShop/manifold that referenced this pull request Mar 11, 2024
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