MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / write

Method write

src/IO/MEDITWriter.cpp:21–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21void MEDITWriter::write(
22 const VectorF& vertices,
23 const VectorI& faces,
24 const VectorI& voxels,
25 size_t dim, size_t vertex_per_face, size_t vertex_per_voxel) {
26 std::ofstream fout(m_filename.c_str());
27 fout.precision(16);
28 fout << "MeshVersionFormatted 1" << std::endl;
29 fout << "Dimension " << dim << std::endl;
30 if (!is_anonymous()) {
31 fout << "# Generated with PyMesh" << std::endl;
32 }
33
34 write_vertices(fout, vertices, dim);
35 write_faces(fout, faces, vertex_per_face);
36 write_voxels(fout, voxels, vertex_per_voxel);
37
38 fout.close();
39}
40
41void MEDITWriter::write_vertices(
42 std::ofstream& fout, const VectorF& vertices, const size_t dim) {

Callers

nothing calls this directly

Calls 2

write_verticesFunction · 0.85
write_facesFunction · 0.85

Tested by

no test coverage detected