|
OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
|
OCCT-Light: IGES file I/O (US PRO/IP 100 / ANSI). More...


Go to the source code of this file.
Classes | |
| struct | occtl_io_iges_read_options |
| struct | occtl_io_iges_write_options |
Typedefs | |
| typedef struct occtl_io_iges_read_options | occtl_io_iges_read_options_t |
| typedef struct occtl_io_iges_write_options | occtl_io_iges_write_options_t |
Functions | |
| void | occtl_io_iges_read_options_init (occtl_io_iges_read_options_t *options) |
| void | occtl_io_iges_write_options_init (occtl_io_iges_write_options_t *options) |
| occtl_status_t | occtl_io_iges_read (const char *path, occtl_graph_t **out_graph, occtl_node_id_t *out_root, const occtl_io_iges_read_options_t *options) |
| occtl_status_t | occtl_io_iges_write (const occtl_graph_t *graph, occtl_node_id_t root, const char *path, const occtl_io_iges_write_options_t *options) |
OCCT-Light: IGES file I/O (US PRO/IP 100 / ANSI).
Reads and writes IGES 5.3 files via OCCT's DEIGES_Provider / DEIGES_ConfigurationNode. OCAF is linked privately and never reaches the public surface.
UIDs are not preserved across the round-trip — the IGES file format has no UID slot. Use occtl_uid_to_bytes / occtl_uid_from_bytes for an out-of-band UID handshake if persistent identity is required.
| typedef struct occtl_io_iges_read_options occtl_io_iges_read_options_t |
Options for occtl_io_iges_read. Pass NULL for defaults.
| typedef struct occtl_io_iges_write_options occtl_io_iges_write_options_t |
Options for occtl_io_iges_write. Pass NULL for defaults (faces-only output).
| occtl_status_t occtl_io_iges_read | ( | const char * | path, |
| occtl_graph_t ** | out_graph, | ||
| occtl_node_id_t * | out_root, | ||
| const occtl_io_iges_read_options_t * | options | ||
| ) |
Reads an IGES file and ingests it into a freshly-created graph.
| [in] | path | Borrows it. NUL-terminated UTF-8 path to the file. Must be non-NULL. |
| [out] | out_graph | Owns it. Receives a new graph on success; NULL on failure. |
| [out] | out_root | Borrows it. Receives the NodeId of the root entity. |
| [in] | options | Borrows it. May be NULL for defaults. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | path, out_graph, or out_root is NULL. |
| OCCTL_VERSION_MISMATCH | options has an unsupported struct_version. |
| OCCTL_IO_ERROR | File not found or unreadable. |
| OCCTL_FORMAT_ERROR | File contents were not a valid IGES stream. |
\par Thread Safety Yes.
| void occtl_io_iges_read_options_init | ( | occtl_io_iges_read_options_t * | options | ) |
Initialises options to default values matching OCCTL_IO_IGES_READ_OPTIONS_INIT.
NULL-tolerant.
| [out] | options | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| occtl_status_t occtl_io_iges_write | ( | const occtl_graph_t * | graph, |
| occtl_node_id_t | root, | ||
| const char * | path, | ||
| const occtl_io_iges_write_options_t * | options | ||
| ) |
Writes the topology rooted at root to an IGES file.
| [in] | graph | Borrows it. Must be non-NULL. |
| [in] | root | Root node id to serialise. |
| [in] | path | Borrows it. NUL-terminated UTF-8 path; existing file is overwritten. |
| [in] | options | Borrows it. May be NULL for defaults. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | graph or path is NULL. |
| OCCTL_NOT_FOUND | root is invalid or has been removed. |
| OCCTL_VERSION_MISMATCH | options has an unsupported struct_version. |
| OCCTL_IO_ERROR | Filesystem failure or unwritable file. |
\par Thread Safety Yes (read-only on graph).
| void occtl_io_iges_write_options_init | ( | occtl_io_iges_write_options_t * | options | ) |
Initialises options to default values matching OCCTL_IO_IGES_WRITE_OPTIONS_INIT.
NULL-tolerant.
| [out] | options | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.