Git Product home page Git Product logo

Comments (4)

Yixin-Hu avatar Yixin-Hu commented on July 20, 2024

Hi Charles,

Could you share the input and the command you used?

Thanks,
Yixin

from tetwild.

cpuelz avatar cpuelz commented on July 20, 2024

Hi Yixin,

I ran a command like

./TetWild --input input.stl --bg-mesh bg_mesh.msh.

I did some more investigating since my background mesh MSH file is in ASCII format and I was able to see that no mesh information was in that file... it was basically a "postprocessed view" file. I am using a libMesh GMSH read/write object to output the background mesh with the element sizes and I guess the mesh information was left out of the write command.

I then opened this postprocessed MSH file in GMSH and reexported it with the mesh information. With this workflow it seems to store both mesh info and the "values" field, but in ElementNodeData format. It seems like this is not currently supported with TetWild. Maybe it is possible to force GMSH to export the values field in NodeData format instead? I am not a heavy user of GMSH so I am not sure.

I can write a parser to try and convert this ElementNodeData to NodeData (which I think is what I need, correct?), or is it possible that ElementNodeData might be supported in the near future?

I am happy to share my input files as well... can I send them to you over email?

-- Charles

from tetwild.

cpuelz avatar cpuelz commented on July 20, 2024

another way to ask my question is... what exactly is the MSH format required for the background mesh, and what things should be in that file? for example, if I open the background mesh in your example and reexport in ASCII format, the ASCII background mesh file does not work with TetWild. an error is thrown that $Entities is not supported.

from tetwild.

Yixin-Hu avatar Yixin-Hu commented on July 20, 2024

Hi Charles,

You can try to use pymesh (https://github.com/PyMesh/PyMesh/blob/main/src/IO/MshSaver.h) to read/write gmsh file. Here is a piece of sample code:

TetWild/src/main.cpp

Lines 54 to 62 in 1c75f7d

PyMesh::MshSaver mSaver(output_volume, true);
PyMesh::VectorF V_flat(V.size());
PyMesh::VectorI T_flat(T.size());
Eigen::MatrixXd VV = V.transpose();
Eigen::MatrixXi TT = T.transpose();
std::copy_n(VV.data(), V.size(), V_flat.data());
std::copy_n(TT.data(), T.size(), T_flat.data());
mSaver.save_mesh(V_flat, T_flat, 3, mSaver.TET);
mSaver.save_elem_scalar_field("min_dihedral_angle", A);
where save_elem_scalar_field save a value field for tetrahedra.

Hope this hepls,
Yixin

from tetwild.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.