21#ifndef OCCTL_HPP_IO_STL_HPP
22#define OCCTL_HPP_IO_STL_HPP
35namespace occtl::io_stl
41 bool ascii_mode =
false;
53inline std::pair<Graph, NodeId> read(
const std::string& thePath)
63inline std::pair<Graph, NodeId> read_memory(
const uint8_t*
const theData,
const std::size_t theSize)
73inline std::pair<Graph, NodeId> read_memory(
const std::vector<uint8_t>& theData)
75 return read_memory(theData.data(), theData.size());
80inline void write(
const Graph& theGraph,
82 const std::string& thePath,
85 const ::occtl_io_stl_write_options_t aOpts = theOptions.to_c();
91inline std::vector<uint8_t> write_memory(
const Graph& theGraph,
95 const ::occtl_io_stl_write_options_t aOpts = theOptions.to_c();
96 std::size_t aSize = 0;
98 std::vector<uint8_t> aBytes(aSize);
105 aBytes.resize(aSize);
RAII handle for a topology graph. Mirrors occtl_graph_t.
Definition topo.hpp:1444
::occtl_graph_t * get() const noexcept
Borrows-it pointer to the underlying C handle, for direct ABI calls.
Definition topo.hpp:1494
Session-local identity of a graph node. Mirrors occtl_node_id_t.
Definition topo.hpp:52
::occtl_node_id_t get() const noexcept
Borrows-it view of the underlying C value type, for direct ABI calls.
Definition topo.hpp:64
C++ veneer for the core module.
void check(const ::occtl_status_t theStatus)
Throw on non-OK; otherwise a no-op.
Definition core.hpp:85
OCCT-Light: STL file I/O (stereolithography mesh format).
occtl_status_t occtl_io_stl_read_memory(const uint8_t *data, size_t size, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
occtl_status_t occtl_io_stl_write_memory(const occtl_graph_t *graph, occtl_node_id_t root, const occtl_io_stl_write_options_t *options, uint8_t *out_data, size_t capacity, size_t *out_size)
occtl_status_t occtl_io_stl_write(const occtl_graph_t *graph, occtl_node_id_t root, const char *path, const occtl_io_stl_write_options_t *options)
occtl_status_t occtl_io_stl_read(const char *path, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
struct occtl_graph occtl_graph_t
Definition occtl_topo_types.h:152
Options for write. PascalCase mirror of occtl_io_stl_write_options_t.
Definition io_stl.hpp:40
Definition occtl_io_stl.h:54
int32_t ascii_mode
Definition occtl_io_stl.h:57
Definition occtl_topo_types.h:50
C++ veneer for the topo module.