55 MRMESH_API
bool writeTri(
const Triangle3f& tri );
67 std::ostream::pos_type numTrisPos_ = 0;
68 std::uint32_t headNumTris_ = 0;
69 std::uint32_t savedNumTris_ = 0;
saver in binary .stl format that can write triangles one by one not knowing their number beforehand
Definition MRMeshSave.h:49
MRMESH_API bool updateHeadCounter()
MRMESH_API BinaryStlSaver(std::ostream &out, const SaveSettings &settings={}, std::uint32_t expectedNumTris=0)
writes STL header in the stream
MRMESH_API ~BinaryStlSaver()
calls updateHeadCounter();
MRMESH_API bool writeTri(const Triangle3f &tri)
writes one more triangle in the stream
tl::expected< T, E > Expected
Definition MRExpected.h:31
MRMESH_API Expected< void > to3mf(const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
saves in .3mf file
MRMESH_API Expected< void > toAsciiStl(const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
MRMESH_API Expected< void > toModel3mf(const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
saves in 3mf .model file
MRMESH_API Expected< void > toOff(const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
saves in .off file
MRMESH_API Expected< void > toBinaryStl(const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
MRMESH_API Expected< void > toMrmesh(const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
MRMESH_API Expected< void > toAnySupportedFormat(const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
detects the format from file extension and save mesh to it
MRMESH_API Expected< void > toPly(const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
saves in .ply file
MRMESH_API Expected< void > toObj(const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings, int firstVertId)
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
determines how to save points/lines/mesh
Definition MRSaveSettings.h:20