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

Method write_surface_mesh

src/IO/MSHWriter.cpp:101–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99
100
101void MSHWriter::write_surface_mesh(Mesh& mesh) {
102 MshSaver saver(m_filename, !m_in_ascii);
103
104 size_t dim = mesh.get_dim();
105 size_t num_vertices = mesh.get_num_vertices();
106 size_t num_faces = mesh.get_num_faces();
107 size_t vertex_per_face = mesh.get_vertex_per_face();
108
109 saver.save_mesh(mesh.get_vertices(), mesh.get_faces(), dim,
110 get_face_type(vertex_per_face));
111
112 for (AttrNames::const_iterator itr = m_attr_names.begin();
113 itr != m_attr_names.end(); itr++) {
114 if (!mesh.has_attribute(*itr)) {
115 std::cerr << "Error: Attribute \"" << *itr<< "\" does not exist."
116 << std::endl;
117 continue;
118 }
119
120 VectorF& attr = mesh.get_attribute(*itr);
121 write_attribute(saver, *itr, attr, dim, num_vertices, num_faces);
122 }
123}
124
125void MSHWriter::write_volume_mesh(Mesh& mesh) {
126 MshSaver saver(m_filename, !m_in_ascii);

Callers

nothing calls this directly

Calls 12

get_face_typeFunction · 0.85
get_dimMethod · 0.45
get_num_verticesMethod · 0.45
get_num_facesMethod · 0.45
get_vertex_per_faceMethod · 0.45
save_meshMethod · 0.45
get_verticesMethod · 0.45
get_facesMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
has_attributeMethod · 0.45
get_attributeMethod · 0.45

Tested by

no test coverage detected