16 FILE *fp =
Fopen(name.c_str(),
"w");
18 Msg::Error(
"Unable to open file '%s'", name.c_str());
26 if(saveAll || (*it)->physicals.size())
27 numTriangles += (*it)->triangles.size();
29 fprintf(fp,
" %d %d\n", numVertices, numTriangles);
31 std::vector<GEntity *> entities;
33 for(std::size_t i = 0; i < entities.size(); i++) {
34 for(std::size_t j = 0; j < entities[i]->mesh_vertices.size(); j++) {
35 MVertex *v = entities[i]->mesh_vertices[j];
36 fprintf(fp,
" %19.10E %19.10E %19.10E\n", v->
x() * scalingFactor,
37 v->
y() * scalingFactor, v->
z() * scalingFactor);
42 if(saveAll || (*it)->physicals.size()) {
43 for(std::size_t i = 0; i < (*it)->triangles.size(); i++) {
53 if(saveAll || (*it)->physicals.size()) {
54 for(std::size_t i = 0; i < (*it)->triangles.size(); i++) {
56 fprintf(fp,
" %d %d %d\n", 0, 0, 0);