OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
Loading...
Searching...
No Matches
occtl_io_stl.h
Go to the documentation of this file.
1// Copyright (c) 2026 Capgemini Engineering Research and Development.
2//
3// This file is part of OCCT-Light software library.
4//
5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Affero General Public License version 3 as published
7// by the Free Software Foundation, with an option to use any later version.
8// Consult the file LICENSE_AGPL_30.txt included in OCCT-Light distribution
9// for complete text of the license and disclaimer of any warranty.
10//
11// Alternatively, this file may be used under the terms of a commercial
12// license or contractual agreement.
13//
14// SPDX-License-Identifier: AGPL-3.0-or-later
15
33#ifndef OCCTL_IO_STL_H
34#define OCCTL_IO_STL_H
35
36#include <stddef.h>
37#include <stdint.h>
38
39#include "occtl_core.h"
40#include "occtl_topo.h"
41
42#ifdef __cplusplus
43extern "C"
44{
45#endif
46
47#define OCCTL_IO_STL_WRITE_OPTIONS_VERSION_1 1u
48
59
60#define OCCTL_IO_STL_WRITE_OPTIONS_INIT {OCCTL_IO_STL_WRITE_OPTIONS_VERSION_1, NULL, 0}
61
74
91OCCTL_API occtl_status_t OCCTL_CALL occtl_io_stl_read(const char* path,
92 occtl_graph_t** out_graph,
93 occtl_node_id_t* out_root);
94
115OCCTL_API occtl_status_t OCCTL_CALL occtl_io_stl_read_memory(const uint8_t* data,
116 size_t size,
117 occtl_graph_t** out_graph,
118 occtl_node_id_t* out_root);
119
143 occtl_node_id_t root,
144 const char* path,
145 const occtl_io_stl_write_options_t* options);
146
174OCCTL_API occtl_status_t OCCTL_CALL
176 occtl_node_id_t root,
177 const occtl_io_stl_write_options_t* options,
178 uint8_t* out_data,
179 size_t capacity,
180 size_t* out_size);
181
182#ifdef __cplusplus
183} /* extern "C" */
184#endif
185
186#endif /* OCCTL_IO_STL_H */
OCCT-Light: core public API.
#define OCCTL_API
Definition occtl_core.h:111
enum occtl_status occtl_status_t
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)
void occtl_io_stl_write_options_init(occtl_io_stl_write_options_t *options)
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_io_stl_write_options occtl_io_stl_write_options_t
OCCT-Light: topology module public API.
struct occtl_graph occtl_graph_t
Definition occtl_topo_types.h:152
Definition occtl_io_stl.h:54
const void * p_next
Definition occtl_io_stl.h:56
int32_t ascii_mode
Definition occtl_io_stl.h:57
uint32_t struct_version
Definition occtl_io_stl.h:55
Definition occtl_topo_types.h:50