13#include <fmt/format.h>
25 if (file_ ==
nullptr) {
26 throw std::runtime_error(
"STL export: failed to open file");
31 fmt::print(file_,
"solid \n");
38 fwrite(&tris_num_,
sizeof(
uint32_t), 1, file_);
44 if (file_ ==
nullptr) {
48 fmt::print(file_,
"endsolid \n");
52 fwrite(&tris_num_,
sizeof(
uint32_t), 1, file_);
62 "facet normal {} {} {}\n"
84 fwrite(&
data,
sizeof(
data), 1, file_);
File and directory operations.
FileWriter(const char *filepath, bool ascii)
void write_triangle(const PackedTriangle &data)
constexpr size_t BINARY_HEADER_SIZE
FILE * BLI_fopen(const char *filepath, const char *mode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BMesh const char void * data