OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
Loading...
Searching...
No Matches
occtl_io_obj.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
32#ifndef OCCTL_IO_OBJ_H
33#define OCCTL_IO_OBJ_H
34
35#include <stddef.h>
36#include <stdint.h>
37
38#include "occtl_core.h"
39#include "occtl_topo.h"
40
41#ifdef __cplusplus
42extern "C"
43{
44#endif
45
56
57#define OCCTL_IO_OBJ_READ_OPTIONS_VERSION_1 1u
58#define OCCTL_IO_OBJ_WRITE_OPTIONS_VERSION_1 1u
59
78
79#define OCCTL_IO_OBJ_READ_OPTIONS_INIT \
80 {OCCTL_IO_OBJ_READ_OPTIONS_VERSION_1, \
81 NULL, \
82 1.0, \
83 OCCTL_IO_OBJ_COORDINATE_SYSTEM_Z_UP, \
84 OCCTL_IO_OBJ_COORDINATE_SYSTEM_Y_UP, \
85 0, \
86 0, \
87 1, \
88 -1, \
89 NULL}
90
105
106#define OCCTL_IO_OBJ_WRITE_OPTIONS_INIT \
107 {OCCTL_IO_OBJ_WRITE_OPTIONS_VERSION_1, \
108 NULL, \
109 OCCTL_IO_OBJ_COORDINATE_SYSTEM_Z_UP, \
110 OCCTL_IO_OBJ_COORDINATE_SYSTEM_Y_UP, \
111 NULL, \
112 NULL}
113
126
139
163OCCTL_API occtl_status_t OCCTL_CALL occtl_io_obj_read(const char* path,
164 occtl_graph_t** out_graph,
165 occtl_node_id_t* out_root,
166 const occtl_io_obj_read_options_t* options);
167
188 occtl_node_id_t root,
189 const char* path,
190 const occtl_io_obj_write_options_t* options);
191
192#ifdef __cplusplus
193} /* extern "C" */
194#endif
195
196#endif /* OCCTL_IO_OBJ_H */
OCCT-Light: core public API.
#define OCCTL_API
Definition occtl_core.h:111
enum occtl_status occtl_status_t
enum occtl_io_obj_coordinate_system occtl_io_obj_coordinate_system_t
struct occtl_io_obj_read_options occtl_io_obj_read_options_t
struct occtl_io_obj_write_options occtl_io_obj_write_options_t
occtl_status_t occtl_io_obj_read(const char *path, occtl_graph_t **out_graph, occtl_node_id_t *out_root, const occtl_io_obj_read_options_t *options)
void occtl_io_obj_write_options_init(occtl_io_obj_write_options_t *options)
occtl_status_t occtl_io_obj_write(const occtl_graph_t *graph, occtl_node_id_t root, const char *path, const occtl_io_obj_write_options_t *options)
occtl_io_obj_coordinate_system
Definition occtl_io_obj.h:50
@ OCCTL_IO_OBJ_COORDINATE_SYSTEM_Y_UP
Definition occtl_io_obj.h:51
@ OCCTL_IO_OBJ_COORDINATE_SYSTEM_Z_UP
Definition occtl_io_obj.h:52
@ OCCTL_IO_OBJ_COORDINATE_SYSTEM_GLTF
Definition occtl_io_obj.h:53
void occtl_io_obj_read_options_init(occtl_io_obj_read_options_t *options)
OCCT-Light: topology module public API.
struct occtl_graph occtl_graph_t
Definition occtl_topo_types.h:152
Definition occtl_io_obj.h:64
double file_length_unit_m
Definition occtl_io_obj.h:67
int32_t create_shapes
Definition occtl_io_obj.h:73
int32_t single_precision
Definition occtl_io_obj.h:72
uint32_t struct_version
Definition occtl_io_obj.h:65
int32_t fill_incomplete
Definition occtl_io_obj.h:74
occtl_io_obj_coordinate_system_t file_coordinate_system
Definition occtl_io_obj.h:71
int32_t memory_limit_mib
Definition occtl_io_obj.h:75
const void * p_next
Definition occtl_io_obj.h:66
const char * root_prefix
Definition occtl_io_obj.h:76
occtl_io_obj_coordinate_system_t system_coordinate_system
Definition occtl_io_obj.h:69
Definition occtl_io_obj.h:95
occtl_io_obj_coordinate_system_t file_coordinate_system
Definition occtl_io_obj.h:101
occtl_io_obj_coordinate_system_t system_coordinate_system
Definition occtl_io_obj.h:99
uint32_t struct_version
Definition occtl_io_obj.h:96
const char * comment
Definition occtl_io_obj.h:102
const void * p_next
Definition occtl_io_obj.h:97
const char * author
Definition occtl_io_obj.h:103
Definition occtl_topo_types.h:50