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

How to get the wasm file of MeshLib, I want to use it in the browser #3623

Open
LoongZP opened this issue Nov 7, 2024 · 5 comments
Open

Comments

@LoongZP
Copy link

LoongZP commented Nov 7, 2024

How to get the wasm file of MeshLib, I want to use it in the browser

@Grantim Grantim changed the title Sorry,this is no issue . How to get the wasm file of MeshLib, I want to use it in the browser How to get the wasm file of MeshLib, I want to use it in the browser Nov 7, 2024
@Grantim
Copy link
Contributor

Grantim commented Nov 7, 2024

Hello!

Now we don't distribute wasm binaries, only way is to build meshlib locally by this guide:
https://github.com/MeshInspector/MeshLib?tab=readme-ov-file#wasmemscripten

@LoongZP
Copy link
Author

LoongZP commented Nov 7, 2024

Hello!

Can MeshLib handle non-manifold models?

@Grantim
Copy link
Contributor

Grantim commented Nov 7, 2024

MeshLib internal mesh representation forbid non-manifold topologies, so any mesh converted into MeshLib format will be manifold (some vertices might be duplicated and some faces might be skipped to achieve this).

/// construct mesh from vertex coordinates and a set of triangles with given ids;
/// unlike simple fromTriangles() it tries to resolve non-manifold vertices by creating duplicate vertices
[[nodiscard]] MRMESH_API static Mesh fromTrianglesDuplicatingNonManifoldVertices(
VertCoords vertexCoordinates,
Triangulation & t,
std::vector<MeshBuilder::VertDuplication> * dups = nullptr,
const MeshBuilder::BuildSettings & settings = {} );

@LoongZP
Copy link
Author

LoongZP commented Nov 8, 2024

When I try to build a docker image via emscriptenDockerfile, I get an error. I can't figure it out.

Image

Image

@Grantim
Copy link
Contributor

Grantim commented Nov 8, 2024

Hello!
It looks like you have not cloned submodules if MeshLib
please call

git submodule update --init --recursive

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

No branches or pull requests

2 participants