15#include <fmt/format.h>
27 if (file_ ==
nullptr) {
28 throw std::runtime_error(
"STL export: failed to open file");
33 fmt::print(file_,
"solid \n");
40 fwrite(&tris_num_,
sizeof(
uint32_t), 1, file_);
46 if (file_ ==
nullptr) {
50 fmt::print(file_,
"endsolid \n");
54 fwrite(&tris_num_,
sizeof(
uint32_t), 1, file_);
64 "facet normal {} {} {}\n"
86 fwrite(&data,
sizeof(data), 1, file_);
File and directory operations.
FILE * BLI_fopen(const char *filepath, const char *mode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
FileWriter(const char *filepath, bool ascii)
void write_triangle(const PackedTriangle &data)
constexpr size_t BINARY_HEADER_SIZE