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

Transform relations #315

Merged
merged 15 commits into from
Feb 7, 2023
Merged

Transform relations #315

merged 15 commits into from
Feb 7, 2023

Conversation

elalish
Copy link
Owner

@elalish elalish commented Feb 1, 2023

Related #282

This adds transformation feedback to to the MeshGL output, as well as taking these transforms and original IDs as input. The ReserveIDs function allows you to make your own IDs to pass in for when your input mesh has multiple materials, for instance.

I think this is moving the API in the right direction, because the tests are getting cleaner while checking more things. I still need to add feedback about if the reference is inverted to complete the normal transforms for #282.

@elalish elalish self-assigned this Feb 1, 2023
@codecov
Copy link

codecov bot commented Feb 2, 2023

Codecov Report

Base: 91.36% // Head: 91.48% // Increases project coverage by +0.11% 🎉

Coverage data is based on head (dfe77db) compared to base (bbb1fab).
Patch coverage: 94.20% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #315      +/-   ##
==========================================
+ Coverage   91.36%   91.48%   +0.11%     
==========================================
  Files          33       33              
  Lines        3626     3677      +51     
==========================================
+ Hits         3313     3364      +51     
  Misses        313      313              
Impacted Files Coverage Δ
samples/src/bracelet.cpp 100.00% <ø> (ø)
src/manifold/include/manifold.h 100.00% <ø> (ø)
src/manifold/src/impl.h 70.00% <ø> (ø)
src/utilities/include/hashtable.h 81.57% <0.00%> (-2.21%) ⬇️
src/manifold/src/csg_tree.cpp 92.82% <71.42%> (-0.90%) ⬇️
src/manifold/src/constructors.cpp 96.02% <90.00%> (+0.11%) ⬆️
src/manifold/src/impl.cpp 95.08% <95.12%> (+0.65%) ⬆️
src/manifold/src/boolean_result.cpp 97.40% <100.00%> (+0.03%) ⬆️
src/manifold/src/edge_op.cpp 98.95% <100.00%> (+<0.01%) ⬆️
src/manifold/src/manifold.cpp 88.10% <100.00%> (+1.53%) ⬆️
... and 7 more

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.

@elalish
Copy link
Owner Author

elalish commented Feb 7, 2023

@geoffder I updated cbind enough it would build, but there are some API updates here, which I presume is causing the CI failure.

@elalish
Copy link
Owner Author

elalish commented Feb 7, 2023

Possibly related to #302: I noticed the ubuntu OMP builds have started to flake out sometimes, appearing to infinite-loop on Samples.Bracelet, but only about 50% of the time. Let's keep an eye on this. I've made the OMP builds not required for now.

@elalish elalish merged commit 4415cfc into master Feb 7, 2023
@elalish elalish deleted the transforms branch February 7, 2023 17:50
@geoffder
Copy link
Collaborator

geoffder commented Feb 7, 2023

@elalish The CI error

 [ RUN      ] CBIND.level_set
unknown file: Failure
C++ exception with description "Error in file: /__w/manifold/manifold/test/meshIO/src/meshIO.cpp (207): 'validChannels' is false: Invalid colorChannels." thrown in the test body.
[  FAILED  ] CBIND.level_set (1849 ms)

doesn't reproduce on my machine compiled with the current master. My first naive inclination was to try using the MeshGL extracted from a Manifold constructed from the level set mesh, rather than directly exporting it, thinking that the process may fill in whatever was missing (I have not looked into it) but it doesn't appear to hit the same error for me. Not sure what would be different for me vs the CI given that the exception is coming from within Manifold code (not something external like assimp which may have version mismatch).

On the topic of parallel backends, I found that testing hung out on Samples.Knot42 when built with OMP, and Samples.Bracelet when built with TBB.

@elalish
Copy link
Owner Author

elalish commented Feb 7, 2023

Strange - I wonder how it could succeed on your local machine. Seems like a simple enough problem once it repros...

@elalish
Copy link
Owner Author

elalish commented Feb 8, 2023

@geoffder I ran into this in #317 and solved it there. Turns out it was because I changed the API to return a uint_32t instead of an int - apparently C++ prefers to convert int to uint during a compare rather than the other way around. :/

@geoffder
Copy link
Collaborator

geoffder commented Feb 8, 2023

@elalish Ahh interesting, good catch! I wonder if that behaviour changed between compiler versions then since I didn't hit the bug.

cartesian-theatrics pushed a commit to SovereignShop/manifold that referenced this pull request Mar 11, 2024
* added transforms output

* removed meshids

* read MeshGL runs, IDs, and transforms

* cleanup

* replaced lambdas

* refactor reserveIDs

* refactored reference initialization

* added round-trip test

* added multi-material round trip test

* added faceID round trip test

* back to const inputs

* added missing error types

* shorten CI timeouts

* update docs
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