8000 Remove mesh by elalish · Pull Request #950 · elalish/manifold · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Remove mesh #950

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

Merged
merged 5 commits into from
Sep 27, 2024
Merged

Remove mesh #950

merged 5 commits into from
Sep 27, 2024

Conversation

elalish
Copy link
Owner
@elalish elalish commented Sep 24, 2024

Fixes #932

@elalish elalish self-assigned this Sep 24, 2024
@@ -223,7 +223,10 @@ std::vector<Manifold> SplitByPlane(Manifold& m, vec3 normal,
}

void CollectVertices(std::vector<vec3>& verts, const Manifold& manifold) {
Mesh mesh = manifold.GetMesh();
verts.insert(verts.end(), mesh.vertPos.begin(), mesh.vertPos.end());
const MeshGL64 mesh = manifold.GetMeshGL64();
Copy link
Owner Author

Choose a reason for hiding this comment

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

@pca006132 This was a surprising change I needed. It looks like our WASM vectors are 64-bit internally, yet we're only exposing MeshGL so far. Is that how it should be?

Copy link
Collaborator

Choose a reason for hiding this comment

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

No, this is weird, we should look into this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

but if it is std::vector<vec3> it will be using double, we should use std::vector<glm::vec3>

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yeah, that's what I was thinking too. It looks like all the vectors we define for the WASM bindings are doubles now (probably part of the big find-replace). Care to have a look?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Will have a look this weekend.

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK, I looked at this, vec3 is exactly the problem here. What I am not sure is that if we should switch to 32-bit floats. I don't think 32-bit float will buy us anything? Users don't directly pass these vectors to/from graphics applications AFAIK, and we are already using 32-bit floats for MeshGL.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Oh okay, good. I had thought somehow mesh was becoming 64-bit, but you're right, it's just these hull and polygon vectors. I guess that's fine.

@elalish elalish requested a review from pca006132 September 24, 2024 21:00
@pca006132
Copy link
Collaborator

and we probably need to open another issue for MeshGL64 tests.

@elalish
Copy link
Owner Author
elalish commented Sep 25, 2024

and we probably need to open another issue for MeshGL64 tests.

I already switched a few more random tests over to MeshGL64 here. Do you have anything specific in mind? I'm happy as long as we don't have major holes in our coverage.

@pca006132
Copy link
Collaborator

and we probably need to open another issue for MeshGL64 tests.

I already switched a few more random tests over to MeshGL64 here. Do you have anything specific in mind? I'm happy as long as we don't have major holes in our coverage.

Sounds good to me. I think any bugs we can have with only MeshGL64 will probably be pretty trivial, so it is enough to have a few tests that exercise it.

Copy link
Collaborator
@pca006132 pca006132 left a comment

Choose a reason for hiding this comment

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

Other than the wasm problem (which I'm not sure if it is even a problem), this LGTM.

@elalish elalish merged commit 9f62dbb into master Sep 27, 2024
20 checks passed
@elalish elalish deleted the removeMesh branch September 27, 2024 23:46
wtholliday added a commit to audulus/manifold that referenced this pull request Oct 12, 2024
`Mesh` was removed in elalish#950
@wtholliday wtholliday mentioned this pull request Oct 12, 2024
pca006132 pushed a commit that referenced this pull request Oct 12, 2024
`Mesh` was removed in #950
RahimovIR pushed a commit to RahimovIR/manifold that referenced this pull request Oct 18, 2024
@elalish elalish mentioned this pull request Nov 5, 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.

MeshGL64 tests, bindings, and deprecate Mesh
2 participants
0