OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
Loading...
Searching...
No Matches
occtl_topo.h File Reference

OCCT-Light: topology module public API. More...

#include <stddef.h>
#include <stdint.h>
#include "occtl_core.h"
#include "occtl_curves.h"
#include "occtl_curves2d.h"
#include "occtl_geom.h"
#include "occtl_surfaces.h"
#include "occtl_topo_build.h"
#include "occtl_topo_relation.h"
#include "occtl_topo_types.h"
Include dependency graph for occtl_topo.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  occtl_topo_make_product_info
 
struct  occtl_edge_view
 
struct  occtl_coedge_view
 
struct  occtl_face_view
 
struct  occtl_vertex_view
 
struct  occtl_wire_view
 
struct  occtl_shell_view
 
struct  occtl_solid_view
 
struct  occtl_compound_view
 

Macros

#define OCCTL_TOPO_MAKE_PRODUCT_INFO_VERSION_1   1u
 
#define OCCTL_TOPO_MAKE_PRODUCT_INFO_INIT
 
#define OCCTL_EDGE_VIEW_VERSION_1   1u
 
#define OCCTL_EDGE_VIEW_INIT
 
#define OCCTL_COEDGE_VIEW_VERSION_1   1u
 
#define OCCTL_COEDGE_VIEW_INIT
 
#define OCCTL_FACE_VIEW_VERSION_1   1u
 
#define OCCTL_FACE_VIEW_INIT    {OCCTL_FACE_VIEW_VERSION_1, NULL, 0.0, 0.0, 0.0, 0.0, 0.0, OCCTL_NODE_ID_INVALID, 0u, 0, 0, 0}
 
#define OCCTL_VERTEX_VIEW_VERSION_1   1u
 
#define OCCTL_VERTEX_VIEW_INIT   {OCCTL_VERTEX_VIEW_VERSION_1, NULL, {0.0, 0.0, 0.0}, 0.0}
 
#define OCCTL_WIRE_VIEW_VERSION_1   1u
 
#define OCCTL_WIRE_VIEW_INIT   {OCCTL_WIRE_VIEW_VERSION_1, NULL, 0, 0, 0}
 
#define OCCTL_SHELL_VIEW_VERSION_1   1u
 
#define OCCTL_SHELL_VIEW_INIT   {OCCTL_SHELL_VIEW_VERSION_1, NULL, 0, 0}
 
#define OCCTL_SOLID_VIEW_VERSION_1   1u
 
#define OCCTL_SOLID_VIEW_INIT   {OCCTL_SOLID_VIEW_VERSION_1, NULL, 0}
 
#define OCCTL_COMPOUND_VIEW_VERSION_1   1u
 
#define OCCTL_COMPOUND_VIEW_INIT   {OCCTL_COMPOUND_VIEW_VERSION_1, NULL, 0}
 

Typedefs

typedef struct occtl_node_iter occtl_node_iter_t
 
typedef occtl_status_t(* occtl_node_visitor_t) (occtl_node_id_t node, void *user_data)
 Callback for occtl_graph_for_each.
 
typedef occtl_status_t(* occtl_ref_visitor_t) (occtl_ref_id_t ref, void *user_data)
 Callback for occtl_graph_for_each_ref.
 
typedef occtl_status_t(* occtl_rep_visitor_t) (occtl_rep_id_t rep, void *user_data)
 Callback for occtl_graph_for_each_rep.
 
typedef struct occtl_topo_make_product_info occtl_topo_make_product_info_t
 
typedef struct occtl_edge_view occtl_edge_view_t
 
typedef struct occtl_coedge_view occtl_coedge_view_t
 
typedef struct occtl_face_view occtl_face_view_t
 
typedef struct occtl_vertex_view occtl_vertex_view_t
 
typedef struct occtl_wire_view occtl_wire_view_t
 
typedef struct occtl_shell_view occtl_shell_view_t
 
typedef struct occtl_solid_view occtl_solid_view_t
 
typedef struct occtl_compound_view occtl_compound_view_t
 

Functions

occtl_status_t occtl_graph_create (occtl_graph_t **out_graph)
 
void occtl_graph_free (occtl_graph_t *graph)
 
occtl_status_t occtl_graph_node_id_from_uid (const occtl_graph_t *graph, occtl_uid_t uid, occtl_node_id_t *out_node_id)
 
occtl_status_t occtl_graph_uid_from_node_id (const occtl_graph_t *graph, occtl_node_id_t id, occtl_uid_t *out_uid)
 
occtl_status_t occtl_graph_history_modified (const occtl_graph_t *graph, occtl_uid_t input_uid, occtl_uid_t *out_buf, size_t cap, size_t *out_count)
 
occtl_status_t occtl_graph_history_generated (const occtl_graph_t *graph, occtl_uid_t input_uid, occtl_uid_t *out_buf, size_t cap, size_t *out_count)
 
occtl_status_t occtl_graph_history_deleted_all (const occtl_graph_t *graph, occtl_uid_t *out_buf, size_t cap, size_t *out_count)
 
occtl_status_t occtl_graph_ref_id_from_ref_uid (const occtl_graph_t *graph, occtl_ref_uid_t ref_uid, occtl_ref_id_t *out_ref_id)
 
occtl_status_t occtl_graph_ref_uid_from_ref_id (const occtl_graph_t *graph, occtl_ref_id_t ref_id, occtl_ref_uid_t *out_ref_uid)
 
occtl_status_t occtl_graph_rep_id_from_rep_uid (const occtl_graph_t *graph, occtl_rep_uid_t rep_uid, occtl_rep_id_t *out_rep_id)
 
occtl_status_t occtl_graph_rep_uid_from_rep_id (const occtl_graph_t *graph, occtl_rep_id_t rep_id, occtl_rep_uid_t *out_rep_uid)
 
occtl_status_t occtl_ref_uid_to_bytes (occtl_ref_uid_t ref_uid, uint8_t *out_bytes)
 
occtl_status_t occtl_ref_uid_from_bytes (const uint8_t *in_bytes, occtl_ref_uid_t *out_ref_uid)
 
occtl_status_t occtl_rep_uid_to_bytes (occtl_rep_uid_t rep_uid, uint8_t *out_bytes)
 
occtl_status_t occtl_rep_uid_from_bytes (const uint8_t *in_bytes, occtl_rep_uid_t *out_rep_uid)
 
occtl_status_t occtl_graph_uid_table (const occtl_graph_t *graph, occtl_uid_t *out_uids, occtl_node_id_t *out_nodes, size_t cap, size_t *out_count)
 
occtl_status_t occtl_graph_ref_uid_table (const occtl_graph_t *graph, occtl_ref_uid_t *out_ref_uids, occtl_ref_id_t *out_refs, size_t cap, size_t *out_count)
 
occtl_status_t occtl_graph_node_kind (const occtl_graph_t *graph, occtl_node_id_t id, occtl_node_kind_t *out_kind)
 
occtl_status_t occtl_graph_uid_kind (const occtl_graph_t *graph, occtl_uid_t uid, occtl_node_kind_t *out_kind)
 
occtl_status_t occtl_graph_ref_kind (const occtl_graph_t *graph, occtl_ref_id_t id, occtl_ref_kind_t *out_kind)
 
occtl_status_t occtl_graph_ref_uid_kind (const occtl_graph_t *graph, occtl_ref_uid_t ref_uid, occtl_ref_kind_t *out_kind)
 
occtl_status_t occtl_graph_rep_kind (const occtl_graph_t *graph, occtl_rep_id_t id, occtl_rep_kind_t *out_kind)
 
occtl_status_t occtl_graph_solid_count (const occtl_graph_t *graph, size_t *out_count)
 
occtl_status_t occtl_graph_shell_count (const occtl_graph_t *graph, size_t *out_count)
 
occtl_status_t occtl_graph_face_count (const occtl_graph_t *graph, size_t *out_count)
 
occtl_status_t occtl_graph_wire_count (const occtl_graph_t *graph, size_t *out_count)
 
occtl_status_t occtl_graph_edge_count (const occtl_graph_t *graph, size_t *out_count)
 
occtl_status_t occtl_graph_vertex_count (const occtl_graph_t *graph, size_t *out_count)
 
occtl_status_t occtl_graph_compound_count (const occtl_graph_t *graph, size_t *out_count)
 
occtl_status_t occtl_graph_compsolid_count (const occtl_graph_t *graph, size_t *out_count)
 
occtl_status_t occtl_graph_coedge_count (const occtl_graph_t *graph, size_t *out_count)
 
occtl_status_t occtl_graph_product_count (const occtl_graph_t *graph, size_t *out_count)
 
occtl_status_t occtl_graph_occurrence_count (const occtl_graph_t *graph, size_t *out_count)
 
occtl_status_t occtl_graph_node_count (const occtl_graph_t *graph, size_t *out_count)
 
occtl_status_t occtl_topo_vertex_point (const occtl_graph_t *graph, occtl_node_id_t vertex, occtl_point3_t *out_point)
 
occtl_status_t occtl_topo_vertex_tolerance (const occtl_graph_t *graph, occtl_node_id_t vertex, double *out_tolerance)
 
occtl_status_t occtl_topo_vertex_edge_count (const occtl_graph_t *graph, occtl_node_id_t vertex, uint32_t *out_count)
 
occtl_status_t occtl_topo_edge_range (const occtl_graph_t *graph, occtl_node_id_t edge, double *out_first, double *out_last)
 
occtl_status_t occtl_topo_edge_tolerance (const occtl_graph_t *graph, occtl_node_id_t edge, double *out_tolerance)
 
occtl_status_t occtl_topo_edge_is_degenerated (const occtl_graph_t *graph, occtl_node_id_t edge, int32_t *out_is_degenerated)
 
occtl_status_t occtl_topo_edge_has_curve (const occtl_graph_t *graph, occtl_node_id_t edge, int32_t *out_has_curve)
 
occtl_status_t occtl_topo_edge_curve_kind (const occtl_graph_t *graph, occtl_node_id_t edge, occtl_curve_kind_t *out_kind)
 
occtl_status_t occtl_topo_edge_start_vertex (const occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_id_t *out_vertex)
 
occtl_status_t occtl_topo_edge_end_vertex (const occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_id_t *out_vertex)
 
occtl_status_t occtl_topo_coedge_is_seam (const occtl_graph_t *graph, occtl_node_id_t coedge, int32_t *out_is_seam)
 
occtl_status_t occtl_topo_coedge_edge_of (const occtl_graph_t *graph, occtl_node_id_t coedge, occtl_node_id_t *out_edge)
 
occtl_status_t occtl_topo_coedge_face_of (const occtl_graph_t *graph, occtl_node_id_t coedge, occtl_node_id_t *out_face)
 
occtl_status_t occtl_topo_face_tolerance (const occtl_graph_t *graph, occtl_node_id_t face, double *out_tolerance)
 
occtl_status_t occtl_topo_face_wire_count (const occtl_graph_t *graph, occtl_node_id_t face, uint32_t *out_count)
 
occtl_status_t occtl_topo_face_outer_wire (const occtl_graph_t *graph, occtl_node_id_t face, occtl_node_id_t *out_wire)
 
occtl_status_t occtl_topo_face_uv_bounds (const occtl_graph_t *graph, occtl_node_id_t face, double *out_umin, double *out_umax, double *out_vmin, double *out_vmax)
 
occtl_status_t occtl_topo_edge_eval (const occtl_graph_t *graph, occtl_node_id_t edge, double u, occtl_point3_t *out_p)
 
occtl_status_t occtl_topo_edge_eval_d1 (const occtl_graph_t *graph, occtl_node_id_t edge, double u, occtl_point3_t *out_p, occtl_vector3_t *out_d1)
 
occtl_status_t occtl_topo_edge_eval_d2 (const occtl_graph_t *graph, occtl_node_id_t edge, double u, occtl_point3_t *out_p, occtl_vector3_t *out_d1, occtl_vector3_t *out_d2)
 
occtl_status_t occtl_topo_edge_eval_d3 (const occtl_graph_t *graph, occtl_node_id_t edge, double u, occtl_point3_t *out_p, occtl_vector3_t *out_d1, occtl_vector3_t *out_d2, occtl_vector3_t *out_d3)
 
occtl_status_t occtl_topo_edge_eval_dn (const occtl_graph_t *graph, occtl_node_id_t edge, double u, uint32_t n, occtl_vector3_t *out_dn)
 
occtl_status_t occtl_topo_coedge_pcurve_eval (const occtl_graph_t *graph, occtl_node_id_t coedge, double u, occtl_point2_t *out_uv)
 
occtl_status_t occtl_topo_coedge_pcurve_eval_d1 (const occtl_graph_t *graph, occtl_node_id_t coedge, double u, occtl_point2_t *out_uv, occtl_vector2_t *out_d1)
 
occtl_status_t occtl_topo_coedge_pcurve_eval_d2 (const occtl_graph_t *graph, occtl_node_id_t coedge, double u, occtl_point2_t *out_uv, occtl_vector2_t *out_d1, occtl_vector2_t *out_d2)
 
occtl_status_t occtl_topo_coedge_pcurve_eval_d3 (const occtl_graph_t *graph, occtl_node_id_t coedge, double u, occtl_point2_t *out_uv, occtl_vector2_t *out_d1, occtl_vector2_t *out_d2, occtl_vector2_t *out_d3)
 
occtl_status_t occtl_topo_coedge_pcurve_eval_dn (const occtl_graph_t *graph, occtl_node_id_t coedge, double u, uint32_t n, occtl_vector2_t *out_dn)
 
occtl_status_t occtl_topo_face_eval (const occtl_graph_t *graph, occtl_node_id_t face, double u, double v, occtl_point3_t *out_p)
 
occtl_status_t occtl_topo_face_eval_d1 (const occtl_graph_t *graph, occtl_node_id_t face, double u, double v, occtl_point3_t *out_p, occtl_vector3_t *out_d1u, occtl_vector3_t *out_d1v)
 
occtl_status_t occtl_topo_face_eval_d2 (const occtl_graph_t *graph, occtl_node_id_t face, double u, double v, occtl_point3_t *out_p, occtl_vector3_t *out_d1u, occtl_vector3_t *out_d1v, occtl_vector3_t *out_d2u, occtl_vector3_t *out_d2v, occtl_vector3_t *out_d2uv)
 
occtl_status_t occtl_topo_face_eval_d3 (const occtl_graph_t *graph, occtl_node_id_t face, double u, double v, occtl_point3_t *out_p, occtl_vector3_t *out_d1u, occtl_vector3_t *out_d1v, occtl_vector3_t *out_d2u, occtl_vector3_t *out_d2v, occtl_vector3_t *out_d2uv, occtl_vector3_t *out_d3u, occtl_vector3_t *out_d3v, occtl_vector3_t *out_d3uuv, occtl_vector3_t *out_d3uvv)
 
occtl_status_t occtl_topo_face_eval_dn (const occtl_graph_t *graph, occtl_node_id_t face, double u, double v, uint32_t nu, uint32_t nv, occtl_vector3_t *out_dn)
 
occtl_status_t occtl_topo_face_has_surface (const occtl_graph_t *graph, occtl_node_id_t face, int32_t *out_has_surface)
 
occtl_status_t occtl_topo_face_surface_kind (const occtl_graph_t *graph, occtl_node_id_t face, occtl_surface_kind_t *out_kind)
 
occtl_status_t occtl_topo_wire_is_closed (const occtl_graph_t *graph, occtl_node_id_t wire, int32_t *out_is_closed)
 
occtl_status_t occtl_topo_wire_coedge_count (const occtl_graph_t *graph, occtl_node_id_t wire, uint32_t *out_count)
 
occtl_status_t occtl_topo_shell_is_closed (const occtl_graph_t *graph, occtl_node_id_t shell, int32_t *out_is_closed)
 
occtl_status_t occtl_topo_shell_face_count (const occtl_graph_t *graph, occtl_node_id_t shell, uint32_t *out_count)
 
occtl_status_t occtl_topo_vertex_parameter (const occtl_graph_t *graph, occtl_node_id_t vertex, occtl_node_id_t edge, double *out_parameter)
 
occtl_status_t occtl_topo_vertex_parameters (const occtl_graph_t *graph, occtl_node_id_t vertex, occtl_node_id_t face, occtl_point2_t *out_uv)
 
occtl_status_t occtl_topo_edge_same_parameter (const occtl_graph_t *graph, occtl_node_id_t edge, int32_t *out_has_same_parameter)
 
occtl_status_t occtl_topo_edge_same_range (const occtl_graph_t *graph, occtl_node_id_t edge, int32_t *out_has_same_range)
 
occtl_status_t occtl_topo_edge_is_manifold (const occtl_graph_t *graph, occtl_node_id_t edge, int32_t *out_is_manifold)
 
occtl_status_t occtl_topo_edge_is_boundary (const occtl_graph_t *graph, occtl_node_id_t edge, int32_t *out_is_boundary)
 
occtl_status_t occtl_topo_edge_is_seam_on_face (const occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_id_t face, int32_t *out_is_seam)
 
occtl_status_t occtl_topo_edge_face_count (const occtl_graph_t *graph, occtl_node_id_t edge, uint32_t *out_count)
 
occtl_status_t occtl_topo_coedge_is_reversed (const occtl_graph_t *graph, occtl_node_id_t coedge, int32_t *out_is_reversed)
 
occtl_status_t occtl_topo_coedge_has_pcurve (const occtl_graph_t *graph, occtl_node_id_t coedge, int32_t *out_has_pcurve)
 
occtl_status_t occtl_topo_coedge_pcurve_parameter (const occtl_graph_t *graph, occtl_node_id_t coedge, occtl_node_id_t vertex, double *out_parameter)
 
occtl_status_t occtl_topo_coedge_range (const occtl_graph_t *graph, occtl_node_id_t coedge, double *out_first, double *out_last)
 
occtl_status_t occtl_topo_coedge_uv_points (const occtl_graph_t *graph, occtl_node_id_t coedge, occtl_point2_t *out_uv_start, occtl_point2_t *out_uv_end)
 
occtl_status_t occtl_topo_coedge_seam_pair (const occtl_graph_t *graph, occtl_node_id_t coedge, occtl_node_id_t *out_pair)
 
occtl_status_t occtl_topo_face_natural_restriction (const occtl_graph_t *graph, occtl_node_id_t face, int32_t *out_has_natural_restriction)
 
occtl_status_t occtl_topo_face_has_triangulation (const occtl_graph_t *graph, occtl_node_id_t face, int32_t *out_has_triangulation)
 
occtl_status_t occtl_topo_wire_distinct_edge_count (const occtl_graph_t *graph, occtl_node_id_t wire, uint32_t *out_count)
 
occtl_status_t occtl_topo_wire_face_of (const occtl_graph_t *graph, occtl_node_id_t wire, occtl_node_id_t *out_face)
 
occtl_status_t occtl_topo_wire_is_outer (const occtl_graph_t *graph, occtl_node_id_t wire, int32_t *out_is_outer)
 
occtl_status_t occtl_topo_solid_shell_count (const occtl_graph_t *graph, occtl_node_id_t solid, uint32_t *out_count)
 
occtl_status_t occtl_topo_wire_edge_count (const occtl_graph_t *graph, occtl_node_id_t wire, uint32_t *out_count)
 
occtl_status_t occtl_topo_edge_vertex_count (const occtl_graph_t *graph, occtl_node_id_t edge, uint32_t *out_count)
 
occtl_status_t occtl_topo_compound_child_count (const occtl_graph_t *graph, occtl_node_id_t compound, uint32_t *out_count)
 
occtl_status_t occtl_topo_compsolid_solid_count (const occtl_graph_t *graph, occtl_node_id_t compsolid, uint32_t *out_count)
 
occtl_status_t occtl_topo_product_occurrence_count (const occtl_graph_t *graph, occtl_node_id_t product, uint32_t *out_count)
 
occtl_status_t occtl_node_iter_next (occtl_node_iter_t *iter, occtl_node_id_t *out_id)
 
void occtl_node_iter_free (occtl_node_iter_t *iter)
 
occtl_status_t occtl_graph_solid_iter_create (const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
 
occtl_status_t occtl_graph_shell_iter_create (const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
 
occtl_status_t occtl_graph_face_iter_create (const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
 
occtl_status_t occtl_graph_wire_iter_create (const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
 
occtl_status_t occtl_graph_edge_iter_create (const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
 
occtl_status_t occtl_graph_vertex_iter_create (const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
 
occtl_status_t occtl_graph_compound_iter_create (const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
 
occtl_status_t occtl_graph_compsolid_iter_create (const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
 
occtl_status_t occtl_graph_coedge_iter_create (const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
 
occtl_status_t occtl_graph_product_iter_create (const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
 
occtl_status_t occtl_graph_occurrence_iter_create (const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
 
occtl_status_t occtl_graph_root_product_iter_create (const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
 
occtl_status_t occtl_topo_shells_of_solid_iter_create (const occtl_graph_t *graph, occtl_node_id_t solid, occtl_node_iter_t **out_iter)
 
occtl_status_t occtl_topo_faces_of_shell_iter_create (const occtl_graph_t *graph, occtl_node_id_t shell, occtl_node_iter_t **out_iter)
 
occtl_status_t occtl_topo_wires_of_face_iter_create (const occtl_graph_t *graph, occtl_node_id_t face, occtl_node_iter_t **out_iter)
 
occtl_status_t occtl_topo_coedges_of_wire_iter_create (const occtl_graph_t *graph, occtl_node_id_t wire, occtl_node_iter_t **out_iter)
 
occtl_status_t occtl_topo_edges_of_wire_iter_create (const occtl_graph_t *graph, occtl_node_id_t wire, occtl_node_iter_t **out_iter)
 
occtl_status_t occtl_topo_wire_explorer_create (const occtl_graph_t *graph, occtl_node_id_t wire, occtl_node_iter_t **out_iter)
 
occtl_status_t occtl_topo_occurrences_of_product_iter_create (const occtl_graph_t *graph, occtl_node_id_t product, occtl_node_iter_t **out_iter)
 
occtl_status_t occtl_topo_vertices_of_edge_iter_create (const occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_iter_t **out_iter)
 
occtl_status_t occtl_graph_for_each (const occtl_graph_t *graph, uint64_t kind_mask, occtl_node_visitor_t visitor, void *user_data)
 
occtl_status_t occtl_graph_for_each_ref (const occtl_graph_t *graph, uint64_t ref_kind_mask, occtl_ref_visitor_t visitor, void *user_data)
 
occtl_status_t occtl_graph_for_each_rep (const occtl_graph_t *graph, uint64_t rep_kind_mask, occtl_rep_visitor_t visitor, void *user_data)
 
occtl_status_t occtl_topo_for_each_related (const occtl_graph_t *graph, occtl_node_id_t node, occtl_node_visitor_t visitor, void *user_data)
 
occtl_status_t occtl_graph_color_set (occtl_graph_t *graph, occtl_node_id_t target, occtl_color_rgba_t color)
 
occtl_status_t occtl_graph_color_get (const occtl_graph_t *graph, occtl_node_id_t target, occtl_color_rgba_t *out_color)
 
occtl_status_t occtl_graph_color_entries (const occtl_graph_t *graph, occtl_node_id_t *out_nodes, occtl_color_rgba_t *out_colors, size_t cap, size_t *out_count)
 
occtl_status_t occtl_graph_color_unset (occtl_graph_t *graph, occtl_node_id_t target)
 
occtl_status_t occtl_graph_name_set (occtl_graph_t *graph, occtl_node_id_t target, const char *name, size_t nameLen)
 
occtl_status_t occtl_graph_name_get (const occtl_graph_t *graph, occtl_node_id_t target, char *buf, size_t bufSize, size_t *out_required)
 
occtl_status_t occtl_graph_name_nodes (const occtl_graph_t *graph, occtl_node_id_t *out_nodes, size_t cap, size_t *out_count)
 
occtl_status_t occtl_graph_material_set (occtl_graph_t *graph, occtl_node_id_t target, const occtl_material_info_t *info)
 
occtl_status_t occtl_graph_material_get (const occtl_graph_t *graph, occtl_node_id_t target, occtl_material_info_t *out_info, char *name_buf, size_t name_buf_size, size_t *out_name_required)
 
occtl_status_t occtl_graph_material_nodes (const occtl_graph_t *graph, occtl_node_id_t *out_nodes, size_t cap, size_t *out_count)
 
occtl_status_t occtl_graph_material_unset (occtl_graph_t *graph, occtl_node_id_t target)
 
occtl_status_t occtl_graph_units_set (occtl_graph_t *graph, double length_unit_to_meter, const char *name, size_t nameLen)
 
occtl_status_t occtl_graph_units_get (const occtl_graph_t *graph, double *out_length_unit_to_meter, char *name_buf, size_t name_buf_size, size_t *out_name_required)
 
occtl_status_t occtl_graph_node_metadata_set (occtl_graph_t *graph, occtl_node_id_t target, const char *key, size_t keyLen, const char *value, size_t valueLen)
 
occtl_status_t occtl_graph_node_metadata_get (const occtl_graph_t *graph, occtl_node_id_t target, const char *key, size_t keyLen, char *buf, size_t bufSize, size_t *out_required)
 
occtl_status_t occtl_graph_node_metadata_keys (const occtl_graph_t *graph, occtl_node_id_t target, occtl_metadata_key_view_t *out_keys, size_t cap, size_t *out_count)
 
occtl_status_t occtl_graph_node_metadata_nodes (const occtl_graph_t *graph, occtl_node_id_t *out_nodes, size_t cap, size_t *out_count)
 
occtl_status_t occtl_graph_metadata_set (occtl_graph_t *graph, const char *key, size_t keyLen, const char *value, size_t valueLen)
 
occtl_status_t occtl_graph_metadata_get (const occtl_graph_t *graph, const char *key, size_t keyLen, char *buf, size_t bufSize, size_t *out_required)
 
occtl_status_t occtl_graph_metadata_keys (const occtl_graph_t *graph, occtl_metadata_key_view_t *out_keys, size_t cap, size_t *out_count)
 
occtl_status_t occtl_graph_metadata_unset (occtl_graph_t *graph, const char *key, size_t keyLen)
 
occtl_status_t occtl_graph_node_metadata_unset (occtl_graph_t *graph, occtl_node_id_t target, const char *key, size_t keyLen)
 
occtl_status_t occtl_graph_tag_add (occtl_graph_t *graph, occtl_node_id_t target, const char *tag, size_t tagLen)
 
occtl_status_t occtl_graph_tag_remove (occtl_graph_t *graph, occtl_node_id_t target, const char *tag, size_t tagLen)
 
occtl_status_t occtl_graph_tag_has (const occtl_graph_t *graph, occtl_node_id_t target, const char *tag, size_t tagLen, int32_t *out_has_tag)
 
occtl_status_t occtl_graph_tag_list (const occtl_graph_t *graph, occtl_node_id_t target, occtl_tag_view_t *out_tags, size_t cap, size_t *out_count)
 
occtl_status_t occtl_graph_tag_nodes (const occtl_graph_t *graph, const char *tag, size_t tagLen, occtl_node_id_t *out_nodes, size_t cap, size_t *out_count)
 
void occtl_joint_info_init (occtl_joint_info_t *info)
 
occtl_status_t occtl_joint_create (occtl_graph_t *graph, const occtl_joint_info_t *info, occtl_joint_id_t *out_joint)
 
occtl_status_t occtl_joint_get (const occtl_graph_t *graph, occtl_joint_id_t joint, occtl_joint_info_t *out_info)
 
occtl_status_t occtl_joint_remove (occtl_graph_t *graph, occtl_joint_id_t joint)
 
occtl_status_t occtl_joint_list (const occtl_graph_t *graph, occtl_node_id_t node, occtl_joint_id_t *out_joints, size_t cap, size_t *out_count)
 
void occtl_topo_make_product_info_init (occtl_topo_make_product_info_t *info)
 
occtl_status_t occtl_topo_make_product (occtl_graph_t *graph, const occtl_topo_make_product_info_t *info, occtl_node_id_t *out_product)
 
occtl_status_t occtl_topo_link_product (occtl_graph_t *graph, occtl_node_id_t product, occtl_node_id_t root, occtl_transform_t placement)
 
occtl_status_t occtl_topo_link_product_occurrence (occtl_graph_t *graph, occtl_node_id_t product, occtl_node_id_t root, occtl_transform_t placement, occtl_node_id_t *out_occurrence)
 
occtl_status_t occtl_topo_link_products (occtl_graph_t *graph, occtl_node_id_t parentProduct, occtl_node_id_t childProduct, occtl_transform_t placement, occtl_node_id_t parentOccurrence)
 
occtl_status_t occtl_topo_link_products_occurrence (occtl_graph_t *graph, occtl_node_id_t parentProduct, occtl_node_id_t childProduct, occtl_transform_t placement, occtl_node_id_t parentOccurrence, occtl_node_id_t *out_occurrence)
 
occtl_status_t occtl_topo_remove_occurrence (occtl_graph_t *graph, occtl_ref_id_t occurrence_ref)
 
occtl_status_t occtl_topo_occurrence_set_transform (occtl_graph_t *graph, occtl_node_id_t occurrence, occtl_transform_t transform)
 
occtl_status_t occtl_topo_occurrence_transform (const occtl_graph_t *graph, occtl_node_id_t occurrence, occtl_transform_t *out_transform)
 
occtl_status_t occtl_topo_occurrence_world_transform (const occtl_graph_t *graph, occtl_node_id_t root, occtl_node_id_t occurrence, occtl_transform_t *out_transform)
 
void occtl_edge_view_init (occtl_edge_view_t *view)
 
occtl_status_t occtl_topo_edge_view (const occtl_graph_t *graph, occtl_node_id_t edge, occtl_edge_view_t *view)
 
void occtl_coedge_view_init (occtl_coedge_view_t *view)
 
occtl_status_t occtl_topo_coedge_view (const occtl_graph_t *graph, occtl_node_id_t coedge, occtl_coedge_view_t *view)
 
void occtl_face_view_init (occtl_face_view_t *view)
 
occtl_status_t occtl_topo_face_view (const occtl_graph_t *graph, occtl_node_id_t face, occtl_face_view_t *view)
 
void occtl_vertex_view_init (occtl_vertex_view_t *view)
 
occtl_status_t occtl_topo_vertex_view (const occtl_graph_t *graph, occtl_node_id_t vertex, occtl_vertex_view_t *view)
 
void occtl_wire_view_init (occtl_wire_view_t *view)
 
occtl_status_t occtl_topo_wire_view (const occtl_graph_t *graph, occtl_node_id_t wire, occtl_wire_view_t *view)
 
void occtl_shell_view_init (occtl_shell_view_t *view)
 
occtl_status_t occtl_topo_shell_view (const occtl_graph_t *graph, occtl_node_id_t shell, occtl_shell_view_t *view)
 
void occtl_solid_view_init (occtl_solid_view_t *view)
 
occtl_status_t occtl_topo_solid_view (const occtl_graph_t *graph, occtl_node_id_t solid, occtl_solid_view_t *view)
 
void occtl_compound_view_init (occtl_compound_view_t *view)
 
occtl_status_t occtl_topo_compound_view (const occtl_graph_t *graph, occtl_node_id_t compound, occtl_compound_view_t *view)
 

Detailed Description

OCCT-Light: topology module public API.

Defines occtl_graph_t (the topology graph), session-local identity types (occtl_node_id_t / occtl_ref_id_t / occtl_rep_id_t), persistent identity (occtl_uid_t, declared in occtl_core.h, and occtl_ref_uid_t), graph lifecycle, count queries, identity conversion, geometry accessors, opaque node-iteration, and high-level topology builders.

Macro Definition Documentation

◆ OCCTL_COEDGE_VIEW_INIT

#define OCCTL_COEDGE_VIEW_INIT
Value:
{OCCTL_COEDGE_VIEW_VERSION_1, \
NULL, \
0.0, \
0.0, \
{0.0, 0.0}, \
{0.0, 0.0}, \
0, \
0, \
0}
@ OCCTL_ORIENTATION_FORWARD
Definition occtl_topo_relation.h:67
#define OCCTL_NODE_ID_INVALID
Definition occtl_topo_types.h:138

◆ OCCTL_EDGE_VIEW_INIT

#define OCCTL_EDGE_VIEW_INIT
Value:
{OCCTL_EDGE_VIEW_VERSION_1, \
NULL, \
0.0, \
0.0, \
0.0, \
0u, \
0u, \
0, \
0, \
0, \
0, \
0, \
0, \
0}

◆ OCCTL_TOPO_MAKE_PRODUCT_INFO_INIT

#define OCCTL_TOPO_MAKE_PRODUCT_INFO_INIT
Value:
{OCCTL_TOPO_MAKE_PRODUCT_INFO_VERSION_1, \
NULL, \
{1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0}}

Typedef Documentation

◆ occtl_coedge_view_t

Aggregate snapshot of a coedge's scalar state.

uv_start / uv_end are the UV-space endpoints of the coedge's pcurve on the parent face's surface, as reported by BRepGraph_Tool::CoEdge::UVPoints. When has_pcurve is 0 they default to (0,0).

◆ occtl_compound_view_t

Aggregate snapshot of a compound's scalar state.

◆ occtl_edge_view_t

Aggregate snapshot of an edge's scalar state.

Each aggregate view struct opens with struct_version and p_next. Callers must initialise the struct with the matching init function or INIT literal so the library can dispatch on the version they understand. Filler functions write scalars only, so view lifetime ends with the function call.

Fields after p_next are written by the library. All fields are caller-owned (no borrowed pointers): the snapshot is decoupled from the source graph and survives subsequent mutation.

The boolean fields are 0/1; the int32_t storage forbids bool per the ABI rules. Face-context queries (is_seam_on_face, is_boundary_on_face) are not part of the snapshot; use the occtl_topo_edge_is_*_on_face accessors for those.

◆ occtl_face_view_t

Aggregate snapshot of a face's scalar state.

◆ occtl_node_iter_t

typedef struct occtl_node_iter occtl_node_iter_t

Opaque iterator over a sequence of node IDs.

Holds a snapshot view rooted in a graph; created by one of the enumeration factories below. Yielded IDs are session-local occtl_node_id_t values whose kind is determined by the factory used to create the iterator (e.g. occtl_graph_face_iter_create yields OCCTL_KIND_FACE). Removed nodes are filtered internally and never exposed. Iteration order is documented per factory.

Lifetime: borrows from the source graph. Valid until either occtl_node_iter_free is called on the iterator or the source graph is freed. Adding nodes, calling a future compact, or freeing the graph while an iterator is live is undefined behaviour. Removing a node that has not yet been visited is well-defined (the iterator filters it out); removing the node currently positioned at is undefined. Release iterators before any mutating call to keep the contract simple.

Not thread-safe with respect to its own state. Distinct iterators over the same graph may be advanced from distinct threads if the graph is not concurrently mutated (matching the read-only concurrency contract on graph reads).

◆ occtl_shell_view_t

Aggregate snapshot of a shell's scalar state.

◆ occtl_solid_view_t

Aggregate snapshot of a solid's scalar state.

◆ occtl_topo_make_product_info_t

Info for occtl_topo_make_product.

When root == OCCTL_NODE_ID_INVALID, an empty product is created. Otherwise the product wraps root with placement as a shape root.

◆ occtl_vertex_view_t

Aggregate snapshot of a vertex's scalar state.

◆ occtl_wire_view_t

Aggregate snapshot of a wire's scalar state.

Function Documentation

◆ occtl_coedge_view_init()

void occtl_coedge_view_init ( occtl_coedge_view_t view)

Initialises view to default values matching OCCTL_EDGE_VIEW_INIT.

NULL-tolerant.

Parameters
[out]viewBorrows it. May be NULL (no-op).

\par Thread Safety Yes.

See also
occtl_topo_edge_view

◆ occtl_compound_view_init()

void occtl_compound_view_init ( occtl_compound_view_t view)

Initialises view to default values matching OCCTL_EDGE_VIEW_INIT.

NULL-tolerant.

Parameters
[out]viewBorrows it. May be NULL (no-op).

\par Thread Safety Yes.

See also
occtl_topo_edge_view

◆ occtl_edge_view_init()

void occtl_edge_view_init ( occtl_edge_view_t view)

Initialises view to default values matching OCCTL_EDGE_VIEW_INIT.

NULL-tolerant.

Parameters
[out]viewBorrows it. May be NULL (no-op).

\par Thread Safety Yes.

See also
occtl_topo_edge_view

◆ occtl_face_view_init()

void occtl_face_view_init ( occtl_face_view_t view)

Initialises view to default values matching OCCTL_EDGE_VIEW_INIT.

NULL-tolerant.

Parameters
[out]viewBorrows it. May be NULL (no-op).

\par Thread Safety Yes.

See also
occtl_topo_edge_view

◆ occtl_graph_coedge_count()

occtl_status_t occtl_graph_coedge_count ( const occtl_graph_t graph,
size_t *  out_count 
)

Returns the number of active (non-removed) solids in the graph.

Parameters
[in]graphGraph pointer. Must be non-NULL.
[out]out_countBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.

\par Thread Safety Yes (read-only).

◆ occtl_graph_coedge_iter_create()

occtl_status_t occtl_graph_coedge_iter_create ( const occtl_graph_t graph,
occtl_node_iter_t **  out_iter 
)

Creates an iterator over all active solids.

Iterator borrows from graph; release with occtl_node_iter_free before mutating or freeing the graph. Iteration order is implementation-defined but stable for a given graph state.

Parameters
[in]graphMust be non-NULL.
[out]out_iterOwns it. Must be non-NULL. On success receives a new iterator; on failure set to NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes (read-only on graph).

◆ occtl_graph_color_entries()

occtl_status_t occtl_graph_color_entries ( const occtl_graph_t graph,
occtl_node_id_t out_nodes,
occtl_color_rgba_t out_colors,
size_t  cap,
size_t *  out_count 
)

Lists nodes that have an explicit colour entry.

Two-call buffer pattern: pass out_nodes and out_colors as NULL with cap 0 to learn the entry count, then call again with both arrays of at least that many elements. Values are snapshots copied from the graph-owned colour metadata.

Parameters
[in]graphBorrows it. Must be non-NULL.
[out]out_nodesBorrows it. Length cap; may be NULL only on the sizing call.
[out]out_colorsBorrows it. Length cap; may be NULL only on the sizing call.
[in]capCapacity of out_nodes and out_colors.
[out]out_countBorrows it. Must be non-NULL. Receives total count.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL, or only one output array is NULL on a refill call.
OCCTL_BUFFER_TOO_SMALLOutput arrays are non-NULL and cap is smaller than out_count.

\par Thread Safety Yes (read-only on graph metadata).

See also
occtl_graph_color_get, occtl_graph_name_nodes

◆ occtl_graph_color_get()

occtl_status_t occtl_graph_color_get ( const occtl_graph_t graph,
occtl_node_id_t  target,
occtl_color_rgba_t out_color 
)

Retrieves the colour of a target node.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]targetNode ID to query. Must be valid and active.
[out]out_colorBorrows it. Must be non-NULL. Receives the stored colour, or opaque white if no colour was previously set.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_color is NULL.
OCCTL_NOT_FOUNDtarget is invalid or removed.

\par Thread Safety Yes (read-only on graph).

See also
occtl_graph_color_set, occtl_graph_color_unset

◆ occtl_graph_color_set()

occtl_status_t occtl_graph_color_set ( occtl_graph_t graph,
occtl_node_id_t  target,
occtl_color_rgba_t  color 
)

Sets a colour on a target node.

The colour is stored as an RGBA value and associated with target in an internal graph-wide colour metadata.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]targetNode ID to colour. Must be valid and active.
[in]colorRGBA colour value (by value).
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL, or any color channel in color is non-finite.
OCCTL_NOT_FOUNDtarget is invalid or removed.

\par Thread Safety No (mutates graph).

See also
occtl_graph_color_get, occtl_graph_color_unset

◆ occtl_graph_color_unset()

occtl_status_t occtl_graph_color_unset ( occtl_graph_t graph,
occtl_node_id_t  target 
)

Removes the colour associated with a target node.

After this call, occtl_graph_color_get returns the default colour (opaque white). Idempotent — calling on a node with no colour set is a successful no-op.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]targetNode ID to clear. Must be valid and active.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDtarget is invalid or removed.

\par Thread Safety No (mutates graph).

See also
occtl_graph_color_set

◆ occtl_graph_compound_count()

occtl_status_t occtl_graph_compound_count ( const occtl_graph_t graph,
size_t *  out_count 
)

Returns the number of active (non-removed) solids in the graph.

Parameters
[in]graphGraph pointer. Must be non-NULL.
[out]out_countBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.

\par Thread Safety Yes (read-only).

◆ occtl_graph_compound_iter_create()

occtl_status_t occtl_graph_compound_iter_create ( const occtl_graph_t graph,
occtl_node_iter_t **  out_iter 
)

Creates an iterator over all active solids.

Iterator borrows from graph; release with occtl_node_iter_free before mutating or freeing the graph. Iteration order is implementation-defined but stable for a given graph state.

Parameters
[in]graphMust be non-NULL.
[out]out_iterOwns it. Must be non-NULL. On success receives a new iterator; on failure set to NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes (read-only on graph).

◆ occtl_graph_compsolid_count()

occtl_status_t occtl_graph_compsolid_count ( const occtl_graph_t graph,
size_t *  out_count 
)

Returns the number of active (non-removed) solids in the graph.

Parameters
[in]graphGraph pointer. Must be non-NULL.
[out]out_countBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.

\par Thread Safety Yes (read-only).

◆ occtl_graph_compsolid_iter_create()

occtl_status_t occtl_graph_compsolid_iter_create ( const occtl_graph_t graph,
occtl_node_iter_t **  out_iter 
)

Creates an iterator over all active solids.

Iterator borrows from graph; release with occtl_node_iter_free before mutating or freeing the graph. Iteration order is implementation-defined but stable for a given graph state.

Parameters
[in]graphMust be non-NULL.
[out]out_iterOwns it. Must be non-NULL. On success receives a new iterator; on failure set to NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes (read-only on graph).

◆ occtl_graph_create()

occtl_status_t occtl_graph_create ( occtl_graph_t **  out_graph)

Creates an empty topology graph.

The returned graph is heap-allocated; the caller owns it and must release it with occtl_graph_free. The graph starts with zero entities.

Parameters
[out]out_graphOwns it. Must be non-NULL. On success receives a valid handle (never NULL); on failure set to NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTout_graph is NULL.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes.

See also
occtl_graph_free

◆ occtl_graph_edge_count()

occtl_status_t occtl_graph_edge_count ( const occtl_graph_t graph,
size_t *  out_count 
)

Returns the number of active (non-removed) solids in the graph.

Parameters
[in]graphGraph pointer. Must be non-NULL.
[out]out_countBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.

\par Thread Safety Yes (read-only).

◆ occtl_graph_edge_iter_create()

occtl_status_t occtl_graph_edge_iter_create ( const occtl_graph_t graph,
occtl_node_iter_t **  out_iter 
)

Creates an iterator over all active solids.

Iterator borrows from graph; release with occtl_node_iter_free before mutating or freeing the graph. Iteration order is implementation-defined but stable for a given graph state.

Parameters
[in]graphMust be non-NULL.
[out]out_iterOwns it. Must be non-NULL. On success receives a new iterator; on failure set to NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes (read-only on graph).

◆ occtl_graph_face_count()

occtl_status_t occtl_graph_face_count ( const occtl_graph_t graph,
size_t *  out_count 
)

Returns the number of active (non-removed) solids in the graph.

Parameters
[in]graphGraph pointer. Must be non-NULL.
[out]out_countBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.

\par Thread Safety Yes (read-only).

◆ occtl_graph_face_iter_create()

occtl_status_t occtl_graph_face_iter_create ( const occtl_graph_t graph,
occtl_node_iter_t **  out_iter 
)

Creates an iterator over all active solids.

Iterator borrows from graph; release with occtl_node_iter_free before mutating or freeing the graph. Iteration order is implementation-defined but stable for a given graph state.

Parameters
[in]graphMust be non-NULL.
[out]out_iterOwns it. Must be non-NULL. On success receives a new iterator; on failure set to NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes (read-only on graph).

◆ occtl_graph_for_each()

occtl_status_t occtl_graph_for_each ( const occtl_graph_t graph,
uint64_t  kind_mask,
occtl_node_visitor_t  visitor,
void *  user_data 
)

Iterates over all nodes in graph whose kind is in kind_mask using internal per-kind iterators. Calls visitor for each matching node.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]kind_maskBitwise OR of occtl_node_kind_t values.
[in]visitorCallback invoked for each matching node.
[in,out]user_dataPassed through to visitor. May be NULL.
Return values
OCCTL_OKOn completion.
OCCTL_INVALID_ARGUMENTgraph or visitor is NULL. \par Thread Safety Yes (read-only).
See also
occtl_node_iter_create

◆ occtl_graph_for_each_ref()

occtl_status_t occtl_graph_for_each_ref ( const occtl_graph_t graph,
uint64_t  ref_kind_mask,
occtl_ref_visitor_t  visitor,
void *  user_data 
)

Iterates over all references in graph whose kind is in ref_kind_mask. Calls visitor for each matching reference.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]ref_kind_maskBitwise OR of occtl_ref_kind_t values.
[in]visitorCallback invoked for each matching ref.
[in,out]user_dataPassed through. May be NULL.
Return values
OCCTL_OKOn completion.
OCCTL_INVALID_ARGUMENTgraph or visitor is NULL.

\par Thread Safety Yes (read-only).

◆ occtl_graph_for_each_rep()

occtl_status_t occtl_graph_for_each_rep ( const occtl_graph_t graph,
uint64_t  rep_kind_mask,
occtl_rep_visitor_t  visitor,
void *  user_data 
)

Iterates over all representations in graph whose kind is in rep_kind_mask. Calls visitor for each matching representation.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]rep_kind_maskBitwise OR of occtl_rep_kind_t values.
[in]visitorCallback invoked for each matching rep.
[in,out]user_dataPassed through. May be NULL.
Return values
OCCTL_OKOn completion.
OCCTL_INVALID_ARGUMENTgraph or visitor is NULL.

\par Thread Safety Yes (read-only).

◆ occtl_graph_free()

void occtl_graph_free ( occtl_graph_t graph)

Releases a graph and all associated resources.

NULL-tolerant (free on NULL is a no-op). After this returns, all NodeIds, RefIds, and borrowed pointers obtained from this graph are invalidated.

Parameters
[in]graphGraph to free. May be NULL.

\par Thread Safety No — do not free a graph that another thread may be using.

See also
occtl_graph_create

◆ occtl_graph_history_deleted_all()

occtl_status_t occtl_graph_history_deleted_all ( const occtl_graph_t graph,
occtl_uid_t out_buf,
size_t  cap,
size_t *  out_count 
)

Dump all deleted input UIDs recorded on graph.

Parameters
[in]graphBorrows it. Must be non-NULL.
[out]out_bufBorrows it. May be NULL for sizing.
[in]capCapacity of out_buf in entries.
[out]out_countBorrows it. Must be non-NULL. Receives required count.
Return values
OCCTL_OKOn sizing or successful fill.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_BUFFER_TOO_SMALLout_buf is non-NULL and cap is too small.

\par Thread Safety Yes (read-only on graph).

See also
occtl_graph_history_modified, occtl_graph_history_generated

◆ occtl_graph_history_generated()

occtl_status_t occtl_graph_history_generated ( const occtl_graph_t graph,
occtl_uid_t  input_uid,
occtl_uid_t out_buf,
size_t  cap,
size_t *  out_count 
)

Look up Generated history images of an input UID recorded on graph.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]input_uidInput entity UID recorded by a shape-modifying operation.
[out]out_bufBorrows it. May be NULL for sizing.
[in]capCapacity of out_buf in entries.
[out]out_countBorrows it. Must be non-NULL. Receives required count.
Return values
OCCTL_OKOn sizing or successful fill.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL, or input_uid is malformed.
OCCTL_BUFFER_TOO_SMALLout_buf is non-NULL and cap is too small.

\par Thread Safety Yes (read-only on graph).

See also
occtl_graph_history_modified, occtl_graph_history_deleted_all

◆ occtl_graph_history_modified()

occtl_status_t occtl_graph_history_modified ( const occtl_graph_t graph,
occtl_uid_t  input_uid,
occtl_uid_t out_buf,
size_t  cap,
size_t *  out_count 
)

Look up Modified history images of an input UID recorded on graph.

History is owned by the graph that received the operation result. The function uses the two-call buffer pattern: pass out_buf NULL to query the required count, then call again with enough capacity.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]input_uidInput entity UID recorded by a shape-modifying operation.
[out]out_bufBorrows it. May be NULL for sizing.
[in]capCapacity of out_buf in entries.
[out]out_countBorrows it. Must be non-NULL. Receives required count.
Return values
OCCTL_OKOn sizing or successful fill.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL, or input_uid is malformed.
OCCTL_BUFFER_TOO_SMALLout_buf is non-NULL and cap is too small.

\par Thread Safety Yes (read-only on graph).

See also
occtl_graph_history_generated, occtl_graph_history_deleted_all

◆ occtl_graph_material_get()

occtl_status_t occtl_graph_material_get ( const occtl_graph_t graph,
occtl_node_id_t  target,
occtl_material_info_t out_info,
char *  name_buf,
size_t  name_buf_size,
size_t *  out_name_required 
)

Retrieves material-lite data from a target node (two-call buffer pattern).

Call once with name_buf == NULL to learn the required material-name buffer size in out_name_required, then call again with a buffer of at least that size. out_info is always populated on success; when name_buf is NULL its name pointer is NULL and name_len is the stored name byte length. When name_buf is supplied, out_info->name points at name_buf. The written name is NUL-terminated and out_name_required includes that terminator.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]targetNode ID to query. Must be valid and active.
[out]out_infoBorrows it. Must be non-NULL.
[out]name_bufOwns it (caller-allocated). May be NULL to query required size.
[in]name_buf_sizeSize of name_buf in bytes.
[out]out_name_requiredBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_info, or out_name_required is NULL.
OCCTL_NOT_FOUNDtarget is invalid / removed, or has no material set.
OCCTL_BUFFER_TOO_SMALLname_buf is non-NULL and name_buf_size is too small.

\par Thread Safety Yes (read-only on graph).

See also
occtl_graph_material_set, occtl_graph_material_unset

◆ occtl_graph_material_nodes()

occtl_status_t occtl_graph_material_nodes ( const occtl_graph_t graph,
occtl_node_id_t out_nodes,
size_t  cap,
size_t *  out_count 
)

Lists nodes that have explicit material-lite data.

Two-call buffer pattern: pass out_nodes as NULL with cap 0 to learn the count, then call again with an array of at least that many elements. Retrieve each material record with occtl_graph_material_get.

Parameters
[in]graphBorrows it. Must be non-NULL.
[out]out_nodesBorrows it. Length cap; may be NULL to query count.
[in]capCapacity of out_nodes in elements.
[out]out_countBorrows it. Must be non-NULL. Receives total count.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_BUFFER_TOO_SMALLout_nodes is non-NULL and cap is too small.

\par Thread Safety Yes (read-only on graph metadata).

See also
occtl_graph_material_get, occtl_graph_node_metadata_nodes

◆ occtl_graph_material_set()

occtl_status_t occtl_graph_material_set ( occtl_graph_t graph,
occtl_node_id_t  target,
const occtl_material_info_t info 
)

Sets material-lite data on a target node.

The material record is copied into graph-owned metadata. The name field in info is a borrowed byte span and does not need to be NUL-terminated. Density is optional; when present it must be finite and strictly positive. Diffuse colour is optional and uses the same channel convention as occtl_color_rgba_t.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]targetNode ID to annotate. Must be valid and active.
[in]infoBorrows it. Must be non-NULL with a recognised struct_version and NULL p_next.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or info is NULL, or an info field is malformed.
OCCTL_VERSION_MISMATCHinfo->struct_version is unsupported.
OCCTL_NOT_FOUNDtarget is invalid or removed.

\par Thread Safety No (mutates graph metadata).

See also
occtl_graph_material_get, occtl_graph_material_unset

◆ occtl_graph_material_unset()

occtl_status_t occtl_graph_material_unset ( occtl_graph_t graph,
occtl_node_id_t  target 
)

Removes material-lite data from a target node.

Idempotent: removing a missing material is a successful no-op.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]targetNode ID to modify. Must be valid and active.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDtarget is invalid or removed.

\par Thread Safety No (mutates graph metadata).

See also
occtl_graph_material_set, occtl_graph_material_get

◆ occtl_graph_metadata_get()

occtl_status_t occtl_graph_metadata_get ( const occtl_graph_t graph,
const char *  key,
size_t  keyLen,
char *  buf,
size_t  bufSize,
size_t *  out_required 
)

Retrieves UTF-8 metadata from the graph itself (two-call buffer pattern).

Call once with buf == NULL to learn the required buffer size in out_required, then call again with a buffer of at least that size. The written value is NUL-terminated; out_required includes the NUL terminator.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]keyMetadata key bytes. Borrowed; must be non-NULL and non-empty.
[in]keyLenLength of key in bytes.
[out]bufOwns it (caller-allocated). May be NULL to query required size.
[in]bufSizeSize of buf in bytes.
[out]out_requiredBorrows it. Must be non-NULL. Receives required size including NUL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_required is NULL, or key is NULL/empty.
OCCTL_NOT_FOUNDkey is not set on graph.
OCCTL_BUFFER_TOO_SMALLbuf is non-NULL and bufSize is too small.

\par Thread Safety Yes (read-only on graph metadata).

See also
occtl_graph_metadata_set, occtl_graph_metadata_keys

◆ occtl_graph_metadata_keys()

occtl_status_t occtl_graph_metadata_keys ( const occtl_graph_t graph,
occtl_metadata_key_view_t out_keys,
size_t  cap,
size_t *  out_count 
)

Lists graph-level metadata keys.

Uses the two-call buffer pattern: pass out_keys as NULL with cap 0 to learn the key count, then call again with an array of at least that many entries. Returned key pointers borrow from the graph's internal metadata storage and are not necessarily NUL-terminated; use key_len.

Parameters
[in]graphBorrows it. Must be non-NULL.
[out]out_keysBorrows it (caller-allocated). Length cap; may be NULL to query count.
[in]capCapacity of out_keys in elements.
[out]out_countBorrows it. Must be non-NULL. Receives total count.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_BUFFER_TOO_SMALLout_keys is non-NULL and cap is too small.

\par Thread Safety Yes (read-only on graph metadata).

See also
occtl_graph_metadata_get, occtl_graph_node_metadata_keys

◆ occtl_graph_metadata_set()

occtl_status_t occtl_graph_metadata_set ( occtl_graph_t graph,
const char *  key,
size_t  keyLen,
const char *  value,
size_t  valueLen 
)

Sets UTF-8 metadata on the graph itself.

Graph metadata is for document/model-level attributes such as author, source format, exchange notes, or mesh-model metadata. It is stored in the graph metadata storage, survives graph clone and native graph snapshots, and is not attached to any particular node. key and value are byte buffers; neither needs to be NUL-terminated. A key must be non-empty.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]keyMetadata key bytes. Borrowed; copied internally. Must be non-NULL and non-empty.
[in]keyLenLength of key in bytes.
[in]valueMetadata value bytes. Borrowed; copied internally. May be NULL only when valueLen is 0.
[in]valueLenLength of value in bytes.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL; key is NULL/empty; or value is NULL when valueLen > 0.

\par Thread Safety No (mutates graph metadata).

See also
occtl_graph_metadata_get, occtl_graph_metadata_unset, occtl_graph_node_metadata_set

◆ occtl_graph_metadata_unset()

occtl_status_t occtl_graph_metadata_unset ( occtl_graph_t graph,
const char *  key,
size_t  keyLen 
)

Removes one graph-level metadata key.

Idempotent: removing a missing key is a successful no-op.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]keyMetadata key bytes. Borrowed; must be non-NULL and non-empty.
[in]keyLenLength of key in bytes.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL, or key is NULL/empty.

\par Thread Safety No (mutates graph metadata).

See also
occtl_graph_metadata_set, occtl_graph_metadata_get

◆ occtl_graph_name_get()

occtl_status_t occtl_graph_name_get ( const occtl_graph_t graph,
occtl_node_id_t  target,
char *  buf,
size_t  bufSize,
size_t *  out_required 
)

Retrieves the name of a target node (two-call buffer pattern).

Call once with buf == NULL to learn the required buffer size in out_required, then call again with a buffer of at least that size. The written string is NUL-terminated; out_required includes the NUL terminator.

If a node has no name set, the written string is empty (just the NUL terminator) and *out_required is 1.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]targetNode ID to query. Must be valid and active.
[out]bufOwns it (caller-allocated). May be NULL to query required size.
[in]bufSizeSize of buf in bytes.
[out]out_requiredBorrows it. Must be non-NULL. Receives the required buffer size (including NUL).
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_required is NULL.
OCCTL_BUFFER_TOO_SMALLbuf is non-NULL and bufSize is too small; out_required receives the needed size.
OCCTL_NOT_FOUNDtarget is invalid or removed.

\par Thread Safety Yes (read-only on graph).

See also
occtl_graph_name_set

◆ occtl_graph_name_nodes()

occtl_status_t occtl_graph_name_nodes ( const occtl_graph_t graph,
occtl_node_id_t out_nodes,
size_t  cap,
size_t *  out_count 
)

Lists nodes that have an explicit name entry.

Two-call buffer pattern: pass out_nodes as NULL with cap 0 to learn the count, then call again with an array of at least that many elements. Retrieve each name with occtl_graph_name_get.

Parameters
[in]graphBorrows it. Must be non-NULL.
[out]out_nodesBorrows it. Length cap; may be NULL to query count.
[in]capCapacity of out_nodes in elements.
[out]out_countBorrows it. Must be non-NULL. Receives total count.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_BUFFER_TOO_SMALLout_nodes is non-NULL and cap is too small.

\par Thread Safety Yes (read-only on graph metadata).

See also
occtl_graph_name_get, occtl_graph_color_entries

◆ occtl_graph_name_set()

occtl_status_t occtl_graph_name_set ( occtl_graph_t graph,
occtl_node_id_t  target,
const char *  name,
size_t  nameLen 
)

Sets a human-readable name on a target node.

name is a byte buffer of length nameLen; it need not be NUL-terminated. The internal copy is NUL-terminated.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]targetNode ID to name. Must be valid and active.
[in]nameByte buffer containing the name. Borrowed; copied internally. May be NULL only when nameLen is 0.
[in]nameLenLength of name in bytes.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL, or name is NULL when nameLen > 0.
OCCTL_NOT_FOUNDtarget is invalid or removed.

\par Thread Safety No (mutates graph).

See also
occtl_graph_name_get

◆ occtl_graph_node_count()

occtl_status_t occtl_graph_node_count ( const occtl_graph_t graph,
size_t *  out_count 
)

Returns the total number of active nodes across all kinds.

Parameters
[in]graphGraph pointer. Must be non-NULL.
[out]out_countBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.

\par Thread Safety Yes (read-only).

◆ occtl_graph_node_id_from_uid()

occtl_status_t occtl_graph_node_id_from_uid ( const occtl_graph_t graph,
occtl_uid_t  uid,
occtl_node_id_t out_node_id 
)

Resolves a persistent UID to its current NodeId.

UIDs survive node removal and any future compaction operation; call this after any operation that may have reindexed nodes. Returns OCCTL_NOT_FOUND if the entity has been removed.

Parameters
[in]graphMust be non-NULL.
[in]uidUID to resolve. An all-zero (invalid) UID always returns OCCTL_NOT_FOUND.
[out]out_node_idBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_node_id is NULL.
OCCTL_NOT_FOUNDThe UID refers to a removed entity, or the UID is all-zero (invalid).

\par Thread Safety Yes (read-only on graph).

See also
occtl_graph_uid_from_node_id

◆ occtl_graph_node_kind()

occtl_status_t occtl_graph_node_kind ( const occtl_graph_t graph,
occtl_node_id_t  id,
occtl_node_kind_t out_kind 
)

Returns the kind of a node ID.

No bit manipulation is exposed to the caller; treat occtl_node_id_t as opaque and query its kind through this function.

Parameters
[in]graphMust be non-NULL.
[in]idNode ID to inspect.
[out]out_kindBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_kind is NULL.
OCCTL_NOT_FOUNDThe node has been removed, or id is all-zero (invalid).

\par Thread Safety Yes (read-only on graph).

See also
occtl_graph_uid_kind, occtl_graph_ref_kind

◆ occtl_graph_node_metadata_get()

occtl_status_t occtl_graph_node_metadata_get ( const occtl_graph_t graph,
occtl_node_id_t  target,
const char *  key,
size_t  keyLen,
char *  buf,
size_t  bufSize,
size_t *  out_required 
)

Retrieves UTF-8 metadata from a target node (two-call buffer pattern).

Call once with buf == NULL to learn the required buffer size in out_required, then call again with a buffer of at least that size. The written value is NUL-terminated; out_required includes the NUL terminator.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]targetNode ID to query. Must be valid and active.
[in]keyMetadata key bytes. Borrowed; must be non-NULL and non-empty.
[in]keyLenLength of key in bytes.
[out]bufOwns it (caller-allocated). May be NULL to query required size.
[in]bufSizeSize of buf in bytes.
[out]out_requiredBorrows it. Must be non-NULL. Receives required size including NUL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_required is NULL, or key is NULL/empty.
OCCTL_NOT_FOUNDtarget is invalid / removed, or key is not set on target.
OCCTL_BUFFER_TOO_SMALLbuf is non-NULL and bufSize is too small.

\par Thread Safety Yes (read-only on graph).

See also
occtl_graph_node_metadata_set, occtl_graph_node_metadata_unset

◆ occtl_graph_node_metadata_keys()

occtl_status_t occtl_graph_node_metadata_keys ( const occtl_graph_t graph,
occtl_node_id_t  target,
occtl_metadata_key_view_t out_keys,
size_t  cap,
size_t *  out_count 
)

Lists metadata keys stored on a target node.

Uses the two-call buffer pattern: pass out_keys as NULL with cap 0 to learn the key count, then call again with an array of at least that many entries. Returned key pointers borrow from the graph's internal metadata storage and are not necessarily NUL-terminated; use key_len.

A valid target with no metadata keys returns OCCTL_OK and count 0.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]targetNode ID to query. Must be valid and active.
[out]out_keysBorrows it (caller-allocated). Length cap; may be NULL to query count.
[in]capCapacity of out_keys in elements.
[out]out_countBorrows it. Must be non-NULL. Receives total count.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_NOT_FOUNDtarget is invalid or removed.
OCCTL_BUFFER_TOO_SMALLout_keys is non-NULL and cap is too small.

\par Thread Safety Yes (read-only on graph metadata).

See also
occtl_graph_node_metadata_set, occtl_graph_node_metadata_get

◆ occtl_graph_node_metadata_nodes()

occtl_status_t occtl_graph_node_metadata_nodes ( const occtl_graph_t graph,
occtl_node_id_t out_nodes,
size_t  cap,
size_t *  out_count 
)

Lists nodes that have at least one metadata key.

Two-call buffer pattern: pass out_nodes as NULL with cap 0 to learn the count, then call again with an array of at least that many elements. Retrieve each node's keys with occtl_graph_node_metadata_keys and each value with occtl_graph_node_metadata_get.

Parameters
[in]graphBorrows it. Must be non-NULL.
[out]out_nodesBorrows it. Length cap; may be NULL to query count.
[in]capCapacity of out_nodes in elements.
[out]out_countBorrows it. Must be non-NULL. Receives total count.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_BUFFER_TOO_SMALLout_nodes is non-NULL and cap is too small.

\par Thread Safety Yes (read-only on graph metadata).

See also
occtl_graph_node_metadata_keys, occtl_graph_name_nodes

◆ occtl_graph_node_metadata_set()

occtl_status_t occtl_graph_node_metadata_set ( occtl_graph_t graph,
occtl_node_id_t  target,
const char *  key,
size_t  keyLen,
const char *  value,
size_t  valueLen 
)

Sets UTF-8 metadata on a target node.

key and value are byte buffers; neither needs to be NUL-terminated. A key must be non-empty. A zero-length value is allowed and stores an empty string. Metadata is stored as graph-owned metadata and follows graph compact / clone remapping.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]targetNode ID to annotate. Must be valid and active.
[in]keyMetadata key bytes. Borrowed; copied internally. Must be non-NULL and non-empty.
[in]keyLenLength of key in bytes.
[in]valueMetadata value bytes. Borrowed; copied internally. May be NULL only when valueLen is 0.
[in]valueLenLength of value in bytes.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL; key is NULL/empty; or value is NULL when valueLen > 0.
OCCTL_NOT_FOUNDtarget is invalid or removed.

\par Thread Safety No (mutates graph metadata).

See also
occtl_graph_node_metadata_get, occtl_graph_node_metadata_unset

◆ occtl_graph_node_metadata_unset()

occtl_status_t occtl_graph_node_metadata_unset ( occtl_graph_t graph,
occtl_node_id_t  target,
const char *  key,
size_t  keyLen 
)

Removes one metadata key from a target node.

Idempotent: removing a missing key is a successful no-op.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]targetNode ID to modify. Must be valid and active.
[in]keyMetadata key bytes. Borrowed; must be non-NULL and non-empty.
[in]keyLenLength of key in bytes.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL, or key is NULL/empty.
OCCTL_NOT_FOUNDtarget is invalid or removed.

\par Thread Safety No (mutates graph metadata).

See also
occtl_graph_node_metadata_set, occtl_graph_node_metadata_get

◆ occtl_graph_occurrence_count()

occtl_status_t occtl_graph_occurrence_count ( const occtl_graph_t graph,
size_t *  out_count 
)

Returns the number of active (non-removed) solids in the graph.

Parameters
[in]graphGraph pointer. Must be non-NULL.
[out]out_countBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.

\par Thread Safety Yes (read-only).

◆ occtl_graph_occurrence_iter_create()

occtl_status_t occtl_graph_occurrence_iter_create ( const occtl_graph_t graph,
occtl_node_iter_t **  out_iter 
)

Creates an iterator over all active solids.

Iterator borrows from graph; release with occtl_node_iter_free before mutating or freeing the graph. Iteration order is implementation-defined but stable for a given graph state.

Parameters
[in]graphMust be non-NULL.
[out]out_iterOwns it. Must be non-NULL. On success receives a new iterator; on failure set to NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes (read-only on graph).

◆ occtl_graph_product_count()

occtl_status_t occtl_graph_product_count ( const occtl_graph_t graph,
size_t *  out_count 
)

Returns the number of active (non-removed) solids in the graph.

Parameters
[in]graphGraph pointer. Must be non-NULL.
[out]out_countBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.

\par Thread Safety Yes (read-only).

◆ occtl_graph_product_iter_create()

occtl_status_t occtl_graph_product_iter_create ( const occtl_graph_t graph,
occtl_node_iter_t **  out_iter 
)

Creates an iterator over all active solids.

Iterator borrows from graph; release with occtl_node_iter_free before mutating or freeing the graph. Iteration order is implementation-defined but stable for a given graph state.

Parameters
[in]graphMust be non-NULL.
[out]out_iterOwns it. Must be non-NULL. On success receives a new iterator; on failure set to NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes (read-only on graph).

◆ occtl_graph_ref_id_from_ref_uid()

occtl_status_t occtl_graph_ref_id_from_ref_uid ( const occtl_graph_t graph,
occtl_ref_uid_t  ref_uid,
occtl_ref_id_t out_ref_id 
)

Resolves a persistent RefUID to its current RefId.

RefUIDs survive graph compaction; call this after operations that may have reindexed reference entries. Returns OCCTL_NOT_FOUND if the reference has been removed or if ref_uid is invalid.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]ref_uidRefUID to resolve.
[out]out_ref_idBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_ref_id is NULL.
OCCTL_NOT_FOUNDref_uid is invalid or not active.

\par Thread Safety Yes (read-only on graph).

See also
occtl_graph_ref_uid_from_ref_id, occtl_graph_ref_uid_table

◆ occtl_graph_ref_kind()

occtl_status_t occtl_graph_ref_kind ( const occtl_graph_t graph,
occtl_ref_id_t  id,
occtl_ref_kind_t out_kind 
)

Returns the kind of a ref ID.

Parameters
[in]graphMust be non-NULL.
[in]idRef ID to inspect.
[out]out_kindBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_kind is NULL.
OCCTL_NOT_FOUNDThe reference has been removed, or id is all-zero (invalid).

\par Thread Safety Yes (read-only on graph).

◆ occtl_graph_ref_uid_from_ref_id()

occtl_status_t occtl_graph_ref_uid_from_ref_id ( const occtl_graph_t graph,
occtl_ref_id_t  ref_id,
occtl_ref_uid_t out_ref_uid 
)

Returns the persistent RefUID for a RefId.

The RefUID survives compaction and can be stored for later resolution. If the reference is later removed the RefUID becomes unresolvable.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]ref_idRefId to inspect.
[out]out_ref_uidBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_ref_uid is NULL.
OCCTL_NOT_FOUNDref_id is invalid or removed.

\par Thread Safety Yes (read-only on graph).

See also
occtl_graph_ref_id_from_ref_uid, occtl_graph_ref_uid_table

◆ occtl_graph_ref_uid_kind()

occtl_status_t occtl_graph_ref_uid_kind ( const occtl_graph_t graph,
occtl_ref_uid_t  ref_uid,
occtl_ref_kind_t out_kind 
)

Returns the kind embedded in a RefUID.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]ref_uidRefUID to inspect.
[out]out_kindBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_kind is NULL.
OCCTL_NOT_FOUNDref_uid is invalid or not active.

\par Thread Safety Yes (read-only on graph).

See also
occtl_graph_ref_kind

◆ occtl_graph_ref_uid_table()

occtl_status_t occtl_graph_ref_uid_table ( const occtl_graph_t graph,
occtl_ref_uid_t out_ref_uids,
occtl_ref_id_t out_refs,
size_t  cap,
size_t *  out_count 
)

Dumps the (RefUID -> RefId) mapping for every active reference in graph.

Two-call buffer pattern: pass out_ref_uids and out_refs as NULL to query out_count, then call again with both arrays of at least that size. Returned arrays are parallel: entry i is (out_ref_uids[i], out_refs[i]).

Parameters
[in]graphBorrows it. Must be non-NULL.
[out]out_ref_uidsOwns it (caller-allocated). Length cap; may be NULL only on the sizing call.
[out]out_refsOwns it (caller-allocated). Length cap; may be NULL only on the sizing call.
[in]capCapacity of both output arrays.
[out]out_countBorrows it. Must be non-NULL. Receives total count.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL, or only one output array is NULL on a refill call.
OCCTL_BUFFER_TOO_SMALLOutput arrays are non-NULL and cap is smaller than out_count.

\par Thread Safety Yes (read-only on graph).

See also
occtl_graph_ref_uid_from_ref_id, occtl_graph_ref_id_from_ref_uid

◆ occtl_graph_rep_id_from_rep_uid()

occtl_status_t occtl_graph_rep_id_from_rep_uid ( const occtl_graph_t graph,
occtl_rep_uid_t  rep_uid,
occtl_rep_id_t out_rep_id 
)

Resolves a persistent RepUID to its current RepId.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]rep_uidRepUID to resolve.
[out]out_rep_idBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_rep_id is NULL.
OCCTL_NOT_FOUNDrep_uid is invalid or not active.

\par Thread Safety Yes (read-only on graph).

See also
occtl_graph_rep_uid_from_rep_id

◆ occtl_graph_rep_kind()

occtl_status_t occtl_graph_rep_kind ( const occtl_graph_t graph,
occtl_rep_id_t  id,
occtl_rep_kind_t out_kind 
)

Returns the kind of a rep ID.

Parameters
[in]graphMust be non-NULL.
[in]idRep ID to inspect.
[out]out_kindBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_kind is NULL.
OCCTL_NOT_FOUNDThe representation has been removed, or id is all-zero (invalid).

\par Thread Safety Yes (read-only on graph).

◆ occtl_graph_rep_uid_from_rep_id()

occtl_status_t occtl_graph_rep_uid_from_rep_id ( const occtl_graph_t graph,
occtl_rep_id_t  rep_id,
occtl_rep_uid_t out_rep_uid 
)

Returns the persistent RepUID for a RepId.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]rep_idRepId to inspect.
[out]out_rep_uidBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_rep_uid is NULL.
OCCTL_NOT_FOUNDrep_id is invalid or removed.

\par Thread Safety Yes (read-only on graph).

See also
occtl_graph_rep_id_from_rep_uid

◆ occtl_graph_root_product_iter_create()

occtl_status_t occtl_graph_root_product_iter_create ( const occtl_graph_t graph,
occtl_node_iter_t **  out_iter 
)

Creates an iterator over all root products (products not referenced by any active occurrence).

Creates an iterator over all active solids.

Iterator borrows from graph; release with occtl_node_iter_free before mutating or freeing the graph. Iteration order is implementation-defined but stable for a given graph state.

Parameters
[in]graphMust be non-NULL.
[out]out_iterOwns it. Must be non-NULL. On success receives a new iterator; on failure set to NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes (read-only on graph).

◆ occtl_graph_shell_count()

occtl_status_t occtl_graph_shell_count ( const occtl_graph_t graph,
size_t *  out_count 
)

Returns the number of active (non-removed) solids in the graph.

Parameters
[in]graphGraph pointer. Must be non-NULL.
[out]out_countBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.

\par Thread Safety Yes (read-only).

◆ occtl_graph_shell_iter_create()

occtl_status_t occtl_graph_shell_iter_create ( const occtl_graph_t graph,
occtl_node_iter_t **  out_iter 
)

Creates an iterator over all active solids.

Iterator borrows from graph; release with occtl_node_iter_free before mutating or freeing the graph. Iteration order is implementation-defined but stable for a given graph state.

Parameters
[in]graphMust be non-NULL.
[out]out_iterOwns it. Must be non-NULL. On success receives a new iterator; on failure set to NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes (read-only on graph).

◆ occtl_graph_solid_count()

occtl_status_t occtl_graph_solid_count ( const occtl_graph_t graph,
size_t *  out_count 
)

Returns the number of active (non-removed) solids in the graph.

Parameters
[in]graphGraph pointer. Must be non-NULL.
[out]out_countBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.

\par Thread Safety Yes (read-only).

◆ occtl_graph_solid_iter_create()

occtl_status_t occtl_graph_solid_iter_create ( const occtl_graph_t graph,
occtl_node_iter_t **  out_iter 
)

Creates an iterator over all active solids.

Iterator borrows from graph; release with occtl_node_iter_free before mutating or freeing the graph. Iteration order is implementation-defined but stable for a given graph state.

Parameters
[in]graphMust be non-NULL.
[out]out_iterOwns it. Must be non-NULL. On success receives a new iterator; on failure set to NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes (read-only on graph).

◆ occtl_graph_tag_add()

occtl_status_t occtl_graph_tag_add ( occtl_graph_t graph,
occtl_node_id_t  target,
const char *  tag,
size_t  tagLen 
)

Adds a UTF-8 tag to a target node.

Tags are byte strings; they do not need to be NUL-terminated. A tag must be non-empty. Tags are stored as graph-owned metadata and follow graph compact / clone remapping.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]targetNode ID to annotate. Must be valid and active.
[in]tagTag bytes. Borrowed; copied internally. Must be non-NULL and non-empty.
[in]tagLenLength of tag in bytes.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL, or tag is NULL/empty.
OCCTL_NOT_FOUNDtarget is invalid or removed.

\par Thread Safety No (mutates graph tags).

See also
occtl_graph_tag_remove, occtl_graph_tag_has

◆ occtl_graph_tag_has()

occtl_status_t occtl_graph_tag_has ( const occtl_graph_t graph,
occtl_node_id_t  target,
const char *  tag,
size_t  tagLen,
int32_t *  out_has_tag 
)

Tests whether a target node carries a UTF-8 tag.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]targetNode ID to query. Must be valid and active.
[in]tagTag bytes. Borrowed; must be non-NULL and non-empty.
[in]tagLenLength of tag in bytes.
[out]out_has_tagBorrows it. Must be non-NULL. Receives 0 or 1.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_has_tag is NULL, or tag is NULL/empty.
OCCTL_NOT_FOUNDtarget is invalid or removed.

\par Thread Safety Yes (read-only on graph tags).

See also
occtl_graph_tag_add, occtl_graph_tag_list

◆ occtl_graph_tag_list()

occtl_status_t occtl_graph_tag_list ( const occtl_graph_t graph,
occtl_node_id_t  target,
occtl_tag_view_t out_tags,
size_t  cap,
size_t *  out_count 
)

Lists tags stored on a target node.

Uses the two-call buffer pattern: pass out_tags as NULL with cap 0 to learn the tag count, then call again with an array of at least that many entries. Returned tag pointers borrow from the graph's internal tag storage and are not necessarily NUL-terminated; use tag_len.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]targetNode ID to query. Must be valid and active.
[out]out_tagsBorrows it (caller-allocated). Length cap; may be NULL to query count.
[in]capCapacity of out_tags in elements.
[out]out_countBorrows it. Must be non-NULL. Receives total count.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_NOT_FOUNDtarget is invalid or removed.
OCCTL_BUFFER_TOO_SMALLout_tags is non-NULL and cap is too small.

\par Thread Safety Yes (read-only on graph tags).

See also
occtl_graph_tag_add, occtl_graph_tag_nodes

◆ occtl_graph_tag_nodes()

occtl_status_t occtl_graph_tag_nodes ( const occtl_graph_t graph,
const char *  tag,
size_t  tagLen,
occtl_node_id_t out_nodes,
size_t  cap,
size_t *  out_count 
)

Lists nodes carrying tags.

Pass tag == NULL and tagLen == 0 to list nodes that have at least one tag. Pass a non-empty tag to list nodes carrying that exact tag.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]tagOptional tag bytes. Borrowed; must be non-NULL when tagLen is non-zero.
[in]tagLenLength of tag in bytes.
[out]out_nodesBorrows it. Length cap; may be NULL to query count.
[in]capCapacity of out_nodes in elements.
[out]out_countBorrows it. Must be non-NULL. Receives total count.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL, tag is NULL with non-zero tagLen, or tag is non-NULL with zero tagLen.
OCCTL_BUFFER_TOO_SMALLout_nodes is non-NULL and cap is too small.

\par Thread Safety Yes (read-only on graph tags).

See also
occtl_graph_tag_list, occtl_graph_node_metadata_nodes

◆ occtl_graph_tag_remove()

occtl_status_t occtl_graph_tag_remove ( occtl_graph_t graph,
occtl_node_id_t  target,
const char *  tag,
size_t  tagLen 
)

Removes a UTF-8 tag from a target node.

Idempotent: removing a missing tag is a successful no-op.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]targetNode ID to modify. Must be valid and active.
[in]tagTag bytes. Borrowed; must be non-NULL and non-empty.
[in]tagLenLength of tag in bytes.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL, or tag is NULL/empty.
OCCTL_NOT_FOUNDtarget is invalid or removed.

\par Thread Safety No (mutates graph tags).

See also
occtl_graph_tag_add, occtl_graph_tag_has

◆ occtl_graph_uid_from_node_id()

occtl_status_t occtl_graph_uid_from_node_id ( const occtl_graph_t graph,
occtl_node_id_t  id,
occtl_uid_t out_uid 
)

Returns the persistent UID for a NodeId.

The UID survives node removal and any future compaction operation and can be stored for later resolution. If the node is later removed the UID becomes permanently unresolvable.

Parameters
[in]graphMust be non-NULL.
[in]idNode ID. An all-zero (invalid) NodeId always returns OCCTL_NOT_FOUND.
[out]out_uidBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_uid is NULL.
OCCTL_NOT_FOUNDThe NodeId refers to a removed entity, or the NodeId is all-zero (invalid).

\par Thread Safety Yes (read-only on graph).

See also
occtl_graph_node_id_from_uid

◆ occtl_graph_uid_kind()

occtl_status_t occtl_graph_uid_kind ( const occtl_graph_t graph,
occtl_uid_t  uid,
occtl_node_kind_t out_kind 
)

Returns the kind embedded in a UID.

Parameters
[in]graphMust be non-NULL.
[in]uidUID to inspect.
[out]out_kindBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_kind is NULL.
OCCTL_NOT_FOUNDThe UID is all-zero (invalid) or the entity has been removed.

\par Thread Safety Yes (read-only on graph).

See also
occtl_graph_node_kind

◆ occtl_graph_uid_table()

occtl_status_t occtl_graph_uid_table ( const occtl_graph_t graph,
occtl_uid_t out_uids,
occtl_node_id_t out_nodes,
size_t  cap,
size_t *  out_count 
)

Dumps the (UID → NodeId) mapping for every active node in graph.

Two-call buffer (§10.1): pass out_uids and out_nodes as NULL, any cap, to size the dump; reissue with both arrays of length at least out_count (the value the sizing call returned). The resulting parallel arrays form the wire-format-stable handshake that survives a Compact / save / load cycle.

Iteration order is implementation-defined but stable for a given graph state.

Parameters
[in]graphMust be non-NULL.
[out]out_uidsBorrows it. Length cap; may be NULL on the sizing call.
[out]out_nodesBorrows it. Length cap; may be NULL on the sizing call. Must be the same length as out_uids on the refill call.
[in]capCapacity of both arrays. Ignored when both arrays are NULL (sizing call).
[out]out_countBorrows it. Receives the total number of (UID, NodeId) pairs in the graph.
Return values
OCCTL_OKSuccess — either sizing or full fill.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_BUFFER_TOO_SMALLcap < out_count and at least one of the arrays is non-NULL.

\par Thread Safety Yes (read-only on graph).

See also
occtl_uid_to_bytes, occtl_graph_uid_from_node_id

◆ occtl_graph_units_get()

occtl_status_t occtl_graph_units_get ( const occtl_graph_t graph,
double *  out_length_unit_to_meter,
char *  name_buf,
size_t  name_buf_size,
size_t *  out_name_required 
)

Retrieves graph-level length-unit metadata (two-call buffer pattern).

Call once with name_buf == NULL to learn the required buffer size in out_name_required, then call again with a buffer of at least that size. The written unit name is NUL-terminated; out_name_required includes the NUL terminator.

Parameters
[in]graphBorrows it. Must be non-NULL.
[out]out_length_unit_to_meterBorrows it. Must be non-NULL. Receives the scale factor from one model length unit to meters.
[out]name_bufOwns it (caller-allocated). May be NULL to query required size.
[in]name_buf_sizeSize of name_buf in bytes.
[out]out_name_requiredBorrows it. Must be non-NULL. Receives required size including NUL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_length_unit_to_meter, or out_name_required is NULL.
OCCTL_BUFFER_TOO_SMALLname_buf is non-NULL and name_buf_size is too small.

\par Thread Safety Yes (read-only on graph).

See also
occtl_graph_units_set

◆ occtl_graph_units_set()

occtl_status_t occtl_graph_units_set ( occtl_graph_t graph,
double  length_unit_to_meter,
const char *  name,
size_t  nameLen 
)

Sets graph-level length-unit metadata.

name is a byte buffer of length nameLen; it need not be NUL-terminated. The internal copy is NUL-terminated. A zero-length name is allowed and means "unnamed unit"; an unset graph reports a default unit of 1.0 meter named m.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]length_unit_to_meterScale factor from one model length unit to meters; must be finite and strictly positive.
[in]nameUnit name bytes. Borrowed; copied internally. May be NULL only when nameLen is 0.
[in]nameLenLength of name in bytes.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL; length_unit_to_meter is non-finite / non-positive; or name is NULL when nameLen > 0.

\par Thread Safety No (mutates graph metadata).

See also
occtl_graph_units_get

◆ occtl_graph_vertex_count()

occtl_status_t occtl_graph_vertex_count ( const occtl_graph_t graph,
size_t *  out_count 
)

Returns the number of active (non-removed) solids in the graph.

Parameters
[in]graphGraph pointer. Must be non-NULL.
[out]out_countBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.

\par Thread Safety Yes (read-only).

◆ occtl_graph_vertex_iter_create()

occtl_status_t occtl_graph_vertex_iter_create ( const occtl_graph_t graph,
occtl_node_iter_t **  out_iter 
)

Creates an iterator over all active solids.

Iterator borrows from graph; release with occtl_node_iter_free before mutating or freeing the graph. Iteration order is implementation-defined but stable for a given graph state.

Parameters
[in]graphMust be non-NULL.
[out]out_iterOwns it. Must be non-NULL. On success receives a new iterator; on failure set to NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes (read-only on graph).

◆ occtl_graph_wire_count()

occtl_status_t occtl_graph_wire_count ( const occtl_graph_t graph,
size_t *  out_count 
)

Returns the number of active (non-removed) solids in the graph.

Parameters
[in]graphGraph pointer. Must be non-NULL.
[out]out_countBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.

\par Thread Safety Yes (read-only).

◆ occtl_graph_wire_iter_create()

occtl_status_t occtl_graph_wire_iter_create ( const occtl_graph_t graph,
occtl_node_iter_t **  out_iter 
)

Creates an iterator over all active solids.

Iterator borrows from graph; release with occtl_node_iter_free before mutating or freeing the graph. Iteration order is implementation-defined but stable for a given graph state.

Parameters
[in]graphMust be non-NULL.
[out]out_iterOwns it. Must be non-NULL. On success receives a new iterator; on failure set to NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes (read-only on graph).

◆ occtl_joint_create()

occtl_status_t occtl_joint_create ( occtl_graph_t graph,
const occtl_joint_info_t info,
occtl_joint_id_t out_joint 
)

Creates an assembly joint record.

The joint is copied into graph-owned metadata. Endpoint nodes may be products, occurrences, or topology nodes; metadata follows graph clone / compact remapping and removes joints whose endpoint is removed without replacement.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL with a recognised struct_version and NULL p_next.
[out]out_jointBorrows it. Must be non-NULL. Receives the new graph-local joint ID.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, info, or out_joint is NULL, or an info field is malformed.
OCCTL_VERSION_MISMATCHinfo->struct_version is unsupported.
OCCTL_NOT_FOUNDAn endpoint node is invalid or removed.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph metadata).

See also
occtl_joint_get, occtl_joint_list, occtl_joint_remove

◆ occtl_joint_get()

occtl_status_t occtl_joint_get ( const occtl_graph_t graph,
occtl_joint_id_t  joint,
occtl_joint_info_t out_info 
)

Retrieves an assembly joint record.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]jointJoint ID to query. Must be valid in graph.
[out]out_infoBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_info is NULL, or joint is the invalid sentinel.
OCCTL_NOT_FOUNDjoint is not present in graph.

\par Thread Safety Yes (read-only on graph).

See also
occtl_joint_create, occtl_joint_list, occtl_joint_remove

◆ occtl_joint_info_init()

void occtl_joint_info_init ( occtl_joint_info_t info)

Initialises info to default values via OCCTL_JOINT_INFO_INIT.

NULL-tolerant.

Parameters
[out]infoBorrows it. May be NULL (no-op).

\par Thread Safety Yes.

See also
occtl_joint_create

◆ occtl_joint_list()

occtl_status_t occtl_joint_list ( const occtl_graph_t graph,
occtl_node_id_t  node,
occtl_joint_id_t out_joints,
size_t  cap,
size_t *  out_count 
)

Lists assembly joints (two-call buffer pattern).

Pass OCCTL_NODE_ID_INVALID as node to list every joint in the graph. Otherwise, only joints whose first or second endpoint is node are listed. Call once with out_joints == NULL to learn the required count, then call again with an array of at least that size.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]nodeEndpoint filter, or OCCTL_NODE_ID_INVALID for all.
[out]out_jointsOwns it (caller-allocated). May be NULL to query required count.
[in]capCapacity of out_joints in elements.
[out]out_countBorrows it. Must be non-NULL. Receives total count.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_NOT_FOUNDnode is non-zero and invalid or removed.
OCCTL_BUFFER_TOO_SMALLout_joints is non-NULL and cap is too small.

\par Thread Safety Yes (read-only on graph).

See also
occtl_joint_create, occtl_joint_get, occtl_joint_remove

◆ occtl_joint_remove()

occtl_status_t occtl_joint_remove ( occtl_graph_t graph,
occtl_joint_id_t  joint 
)

Removes an assembly joint record.

Idempotent: removing a missing joint is a successful no-op.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]jointJoint ID to remove. Must not be the invalid sentinel.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL, or joint is invalid.

\par Thread Safety No (mutates graph metadata).

See also
occtl_joint_create, occtl_joint_get, occtl_joint_list

◆ occtl_node_iter_free()

void occtl_node_iter_free ( occtl_node_iter_t iter)

Releases an iterator. NULL-tolerant; idempotent.

After this call iter must not be passed to occtl_node_iter_next.

Parameters
[in]iterIterator to release. May be NULL.

\par Thread Safety No.

See also
occtl_node_iter_next

◆ occtl_node_iter_next()

occtl_status_t occtl_node_iter_next ( occtl_node_iter_t iter,
occtl_node_id_t out_id 
)

Advances the iterator and returns the next node ID.

On a successful step writes the next ID to out_id and returns OCCTL_OK. When the iterator is exhausted writes OCCTL_NODE_ID_INVALID to out_id and returns OCCTL_NOT_FOUND; subsequent calls remain OCCTL_NOT_FOUND (idempotent end).

Parameters
[in,out]iterBorrows it. Must be non-NULL. Advanced in place.
[out]out_idBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn a successful step; out_id receives the ID.
OCCTL_NOT_FOUNDIterator is exhausted; out_id set to invalid.
OCCTL_INVALID_ARGUMENTiter or out_id is NULL.

\par Thread Safety No (mutates iterator state).

See also
occtl_node_iter_free

◆ occtl_ref_uid_from_bytes()

occtl_status_t occtl_ref_uid_from_bytes ( const uint8_t *  in_bytes,
occtl_ref_uid_t out_ref_uid 
)

Decodes a fixed-width wire-format RefUID.

Rejects payloads whose reserved bytes are non-zero with OCCTL_FORMAT_ERROR; those bytes are reserved for a future wider identity encoding.

Parameters
[in]in_bytesBorrows it. Must point to at least OCCTL_REF_UID_WIRE_SIZE readable bytes.
[out]out_ref_uidBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTin_bytes or out_ref_uid is NULL.
OCCTL_FORMAT_ERRORReserved bytes are non-zero.

\par Thread Safety Yes.

See also
occtl_ref_uid_to_bytes

◆ occtl_ref_uid_to_bytes()

occtl_status_t occtl_ref_uid_to_bytes ( occtl_ref_uid_t  ref_uid,
uint8_t *  out_bytes 
)

Encodes a RefUID into its fixed-width wire format.

Parameters
[in]ref_uidRefUID to encode (may be OCCTL_REF_UID_INVALID).
[out]out_bytesOwns it (caller-allocated). Must point to at least OCCTL_REF_UID_WIRE_SIZE writable bytes.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTout_bytes is NULL.

\par Thread Safety Yes.

See also
occtl_ref_uid_from_bytes

◆ occtl_rep_uid_from_bytes()

occtl_status_t occtl_rep_uid_from_bytes ( const uint8_t *  in_bytes,
occtl_rep_uid_t out_rep_uid 
)

Decodes a fixed-width wire-format RepUID.

Parameters
[in]in_bytesBorrows it. Must point to at least OCCTL_REP_UID_WIRE_SIZE readable bytes.
[out]out_rep_uidBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTin_bytes or out_rep_uid is NULL.
OCCTL_FORMAT_ERRORReserved bytes are non-zero.

\par Thread Safety Yes.

See also
occtl_rep_uid_to_bytes

◆ occtl_rep_uid_to_bytes()

occtl_status_t occtl_rep_uid_to_bytes ( occtl_rep_uid_t  rep_uid,
uint8_t *  out_bytes 
)

Encodes a RepUID into its fixed-width wire format.

Parameters
[in]rep_uidRepUID to encode (may be OCCTL_REP_UID_INVALID).
[out]out_bytesOwns it (caller-allocated). Must point to at least OCCTL_REP_UID_WIRE_SIZE writable bytes.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTout_bytes is NULL.

\par Thread Safety Yes.

See also
occtl_rep_uid_from_bytes

◆ occtl_shell_view_init()

void occtl_shell_view_init ( occtl_shell_view_t view)

Initialises view to default values matching OCCTL_EDGE_VIEW_INIT.

NULL-tolerant.

Parameters
[out]viewBorrows it. May be NULL (no-op).

\par Thread Safety Yes.

See also
occtl_topo_edge_view

◆ occtl_solid_view_init()

void occtl_solid_view_init ( occtl_solid_view_t view)

Initialises view to default values matching OCCTL_EDGE_VIEW_INIT.

NULL-tolerant.

Parameters
[out]viewBorrows it. May be NULL (no-op).

\par Thread Safety Yes.

See also
occtl_topo_edge_view

◆ occtl_topo_coedge_edge_of()

occtl_status_t occtl_topo_coedge_edge_of ( const occtl_graph_t graph,
occtl_node_id_t  coedge,
occtl_node_id_t out_edge 
)

Returns the parent edge of a coedge.

Parameters
[in]graphMust be non-NULL.
[in]coedgeCoEdge node ID.
[out]out_edgeBorrows it. Receives the parent edge NodeId. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_edge is NULL.
OCCTL_NOT_FOUNDcoedge is invalid, removed, or not a coedge.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_coedge_face_of

◆ occtl_topo_coedge_face_of()

occtl_status_t occtl_topo_coedge_face_of ( const occtl_graph_t graph,
occtl_node_id_t  coedge,
occtl_node_id_t out_face 
)

Returns the parent face of a coedge.

Parameters
[in]graphMust be non-NULL.
[in]coedgeCoEdge node ID.
[out]out_faceBorrows it. Receives the parent face NodeId. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_face is NULL.
OCCTL_NOT_FOUNDcoedge is invalid, removed, or not a coedge.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_coedge_edge_of

◆ occtl_topo_coedge_has_pcurve()

occtl_status_t occtl_topo_coedge_has_pcurve ( const occtl_graph_t graph,
occtl_node_id_t  coedge,
int32_t *  out_has_pcurve 
)

Returns whether a coedge has a pcurve.

Parameters
[in]graphMust be non-NULL.
[in]coedgeCoEdge node ID.
[out]out_has_pcurveBorrows it. Set to 1 if pcurve present, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_has_pcurve is NULL.
OCCTL_NOT_FOUNDcoedge is invalid, removed, or not a coedge.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_coedge_is_reversed()

occtl_status_t occtl_topo_coedge_is_reversed ( const occtl_graph_t graph,
occtl_node_id_t  coedge,
int32_t *  out_is_reversed 
)

Returns whether a coedge is reversed (senses its parent edge in the opposite direction).

Parameters
[in]graphMust be non-NULL.
[in]coedgeCoEdge node ID.
[out]out_is_reversedBorrows it. Set to 1 if reversed, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_is_reversed is NULL.
OCCTL_NOT_FOUNDcoedge is invalid, removed, or not a coedge.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_coedge_is_seam()

occtl_status_t occtl_topo_coedge_is_seam ( const occtl_graph_t graph,
occtl_node_id_t  coedge,
int32_t *  out_is_seam 
)

Returns whether a coedge is a seam (closed-surface) edge.

Parameters
[in]graphMust be non-NULL.
[in]coedgeCoEdge node ID.
[out]out_is_seamBorrows it. Set to 1 if seam, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_is_seam is NULL.
OCCTL_NOT_FOUNDcoedge is invalid, removed, or not a coedge.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_coedge_pcurve_eval()

occtl_status_t occtl_topo_coedge_pcurve_eval ( const occtl_graph_t graph,
occtl_node_id_t  coedge,
double  u,
occtl_point2_t out_uv 
)

Evaluates the PCurve UV point on a coedge at parameter u.

Parameters
[in]graphMust be non-NULL.
[in]coedgeCoEdge node ID.
[in]uPCurve parameter.
[out]out_uvBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_uv is NULL.
OCCTL_NOT_FOUNDcoedge is invalid, removed, or not a coedge.
OCCTL_WRONG_KINDcoedge is not a coedge.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_coedge_pcurve_eval_dn

◆ occtl_topo_coedge_pcurve_eval_d1()

occtl_status_t occtl_topo_coedge_pcurve_eval_d1 ( const occtl_graph_t graph,
occtl_node_id_t  coedge,
double  u,
occtl_point2_t out_uv,
occtl_vector2_t out_d1 
)

Evaluates the PCurve UV point and first derivative on a coedge at parameter u.

Parameters
[in]graphMust be non-NULL.
[in]coedgeCoEdge node ID.
[in]uPCurve parameter.
[out]out_uvBorrows it. Must be non-NULL.
[out]out_d1Borrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or an out-param is NULL.
OCCTL_NOT_FOUNDcoedge is invalid or removed.
OCCTL_WRONG_KINDcoedge is not a coedge.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_coedge_pcurve_eval_d2, occtl_topo_coedge_pcurve_eval_dn

◆ occtl_topo_coedge_pcurve_eval_d2()

occtl_status_t occtl_topo_coedge_pcurve_eval_d2 ( const occtl_graph_t graph,
occtl_node_id_t  coedge,
double  u,
occtl_point2_t out_uv,
occtl_vector2_t out_d1,
occtl_vector2_t out_d2 
)

Evaluates the PCurve UV point and first two derivatives on a coedge at parameter u.

Parameters
[in]graphMust be non-NULL.
[in]coedgeCoEdge node ID.
[in]uPCurve parameter.
[out]out_uvBorrows it. Must be non-NULL.
[out]out_d1Borrows it. Must be non-NULL.
[out]out_d2Borrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or an out-param is NULL.
OCCTL_NOT_FOUNDcoedge is invalid or removed.
OCCTL_WRONG_KINDcoedge is not a coedge.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_coedge_pcurve_eval_d1, occtl_topo_coedge_pcurve_eval_d3

◆ occtl_topo_coedge_pcurve_eval_d3()

occtl_status_t occtl_topo_coedge_pcurve_eval_d3 ( const occtl_graph_t graph,
occtl_node_id_t  coedge,
double  u,
occtl_point2_t out_uv,
occtl_vector2_t out_d1,
occtl_vector2_t out_d2,
occtl_vector2_t out_d3 
)

Evaluates the PCurve UV point and first three derivatives on a coedge at parameter u.

Parameters
[in]graphMust be non-NULL.
[in]coedgeCoEdge node ID.
[in]uPCurve parameter.
[out]out_uvBorrows it. Must be non-NULL.
[out]out_d1Borrows it. Must be non-NULL.
[out]out_d2Borrows it. Must be non-NULL.
[out]out_d3Borrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or an out-param is NULL.
OCCTL_NOT_FOUNDcoedge is invalid or removed.
OCCTL_WRONG_KINDcoedge is not a coedge.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_coedge_pcurve_eval_d2, occtl_topo_coedge_pcurve_eval_dn

◆ occtl_topo_coedge_pcurve_eval_dn()

occtl_status_t occtl_topo_coedge_pcurve_eval_dn ( const occtl_graph_t graph,
occtl_node_id_t  coedge,
double  u,
uint32_t  n,
occtl_vector2_t out_dn 
)

Evaluates the Nth derivative vector on a coedge pcurve at parameter u.

Parameters
[in]graphMust be non-NULL.
[in]coedgeCoEdge node ID.
[in]uPCurve parameter.
[in]nDerivative order (0 = point position as vector).
[out]out_dnBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_dn is NULL.
OCCTL_NOT_FOUNDcoedge is invalid or removed.
OCCTL_WRONG_KINDcoedge is not a coedge.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_coedge_pcurve_eval_d3

◆ occtl_topo_coedge_pcurve_parameter()

occtl_status_t occtl_topo_coedge_pcurve_parameter ( const occtl_graph_t graph,
occtl_node_id_t  coedge,
occtl_node_id_t  vertex,
double *  out_parameter 
)

Parameter of vertex on the pcurve carried by coedge.

Parameters
[in]graphMust be non-NULL.
[in]coedgeCoEdge node ID.
[in]vertexVertex node ID.
[out]out_parameterBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_parameter is NULL.
OCCTL_NOT_FOUNDcoedge or vertex is invalid or removed.
OCCTL_WRONG_KINDcoedge is not a coedge or vertex is not a vertex.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_coedge_range()

occtl_status_t occtl_topo_coedge_range ( const occtl_graph_t graph,
occtl_node_id_t  coedge,
double *  out_first,
double *  out_last 
)

Returns the parametric range of a coedge.

Parameters
[in]graphMust be non-NULL.
[in]coedgeCoEdge node ID.
[out]out_firstBorrows it. Must be non-NULL.
[out]out_lastBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or any out-param is NULL.
OCCTL_NOT_FOUNDcoedge is invalid, removed, or not a coedge.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_coedge_seam_pair()

occtl_status_t occtl_topo_coedge_seam_pair ( const occtl_graph_t graph,
occtl_node_id_t  coedge,
occtl_node_id_t out_pair 
)

Returns the paired coedge for a seam edge.

For non-seam coedges sets out_pair to OCCTL_NODE_ID_INVALID and returns OCCTL_OK.

Parameters
[in]graphMust be non-NULL.
[in]coedgeCoEdge node ID.
[out]out_pairBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success (including non-seam case).
OCCTL_INVALID_ARGUMENTgraph or out_pair is NULL.
OCCTL_NOT_FOUNDcoedge is invalid, removed, or not a coedge.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_coedge_uv_points()

occtl_status_t occtl_topo_coedge_uv_points ( const occtl_graph_t graph,
occtl_node_id_t  coedge,
occtl_point2_t out_uv_start,
occtl_point2_t out_uv_end 
)

Returns the UV points at the start and end of a coedge on its parent face surface.

Parameters
[in]graphMust be non-NULL.
[in]coedgeCoEdge node ID.
[out]out_uv_startBorrows it. May be NULL.
[out]out_uv_endBorrows it. May be NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL, or any color channel in color is non-finite.
OCCTL_NOT_FOUNDcoedge is invalid, removed, or not a coedge.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_coedge_view()

occtl_status_t occtl_topo_coedge_view ( const occtl_graph_t graph,
occtl_node_id_t  coedge,
occtl_coedge_view_t view 
)

Fills view with the current scalar state of coedge.

view's struct_version must match a known version constant; only fields up to that version are written.

Parameters
[in]graphMust be non-NULL.
[in]coedgeCoedge node id.
[out]viewBorrows it (caller-allocated). Must be non-NULL and initialised via occtl_coedge_view_init or OCCTL_COEDGE_VIEW_INIT.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or view is NULL, or view->p_next is non-NULL.
OCCTL_NOT_FOUNDcoedge is invalid or removed.
OCCTL_WRONG_KINDcoedge is not a coedge.
OCCTL_VERSION_MISMATCHview's struct_version is not a supported value.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_edge_view, occtl_topo_face_view

◆ occtl_topo_coedges_of_wire_iter_create()

occtl_status_t occtl_topo_coedges_of_wire_iter_create ( const occtl_graph_t graph,
occtl_node_id_t  wire,
occtl_node_iter_t **  out_iter 
)

Creates an iterator over the coedges of a wire.

Yielded IDs are OCCTL_KIND_COEDGE. Iteration order is implementation-defined.

Parameters
[in]graphMust be non-NULL.
[in]wireWire node ID.
[out]out_iterOwns it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL.
OCCTL_NOT_FOUNDwire is invalid or removed.
OCCTL_WRONG_KINDwire is not a wire.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_compound_child_count()

occtl_status_t occtl_topo_compound_child_count ( const occtl_graph_t graph,
occtl_node_id_t  compound,
uint32_t *  out_count 
)

Returns the number of children (direct references) in a compound.

Parameters
[in]graphMust be non-NULL.
[in]compoundCompound node ID.
[out]out_countBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_NOT_FOUNDcompound is invalid or removed.
OCCTL_WRONG_KINDcompound is not a compound.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_make_compound

◆ occtl_topo_compound_view()

occtl_status_t occtl_topo_compound_view ( const occtl_graph_t graph,
occtl_node_id_t  compound,
occtl_compound_view_t view 
)

Fills view with the current scalar state of compound.

view's struct_version must match a known version constant; only fields up to that version are written.

Parameters
[in]graphMust be non-NULL.
[in]compoundCompound node id.
[out]viewBorrows it (caller-allocated). Must be non-NULL and initialised via occtl_compound_view_init or OCCTL_COMPOUND_VIEW_INIT.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or view is NULL, or view->p_next is non-NULL.
OCCTL_NOT_FOUNDcompound is invalid or removed.
OCCTL_WRONG_KINDcompound is not a compound.
OCCTL_VERSION_MISMATCHview's struct_version is not a supported value.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_solid_view

◆ occtl_topo_compsolid_solid_count()

occtl_status_t occtl_topo_compsolid_solid_count ( const occtl_graph_t graph,
occtl_node_id_t  compsolid,
uint32_t *  out_count 
)

Returns the number of solids in a compsolid.

Parameters
[in]graphMust be non-NULL.
[in]compsolidCompSolid node ID.
[out]out_countBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_NOT_FOUNDcompsolid is invalid or removed.
OCCTL_WRONG_KINDcompsolid is not a compsolid.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_edge_curve_kind()

occtl_status_t occtl_topo_edge_curve_kind ( const occtl_graph_t graph,
occtl_node_id_t  edge,
occtl_curve_kind_t out_kind 
)

Returns the OCCT curve kind carried by an edge's 3D curve.

Edges without a 3D curve return OCCTL_CURVE_KIND_UNDEFINED.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]edgeEdge node ID.
[out]out_kindBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_kind is NULL.
OCCTL_NOT_FOUNDedge is invalid or removed.
OCCTL_WRONG_KINDedge is not an edge.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_edge_has_curve, occtl_select_iter_create

◆ occtl_topo_edge_end_vertex()

occtl_status_t occtl_topo_edge_end_vertex ( const occtl_graph_t graph,
occtl_node_id_t  edge,
occtl_node_id_t out_vertex 
)

Returns the end vertex of an edge.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[out]out_vertexBorrows it. Receives the end vertex NodeId. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_vertex is NULL.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_edge_start_vertex

◆ occtl_topo_edge_eval()

occtl_status_t occtl_topo_edge_eval ( const occtl_graph_t graph,
occtl_node_id_t  edge,
double  u,
occtl_point3_t out_p 
)

Evaluates the 3D point on an edge at parameter u.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[in]uCurve parameter.
[out]out_pBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_p is NULL.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.
OCCTL_WRONG_KINDedge is not an edge.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_edge_eval_dn, occtl_topo_edge_eval_d2

◆ occtl_topo_edge_eval_d1()

occtl_status_t occtl_topo_edge_eval_d1 ( const occtl_graph_t graph,
occtl_node_id_t  edge,
double  u,
occtl_point3_t out_p,
occtl_vector3_t out_d1 
)

Evaluates the 3D point and first derivative on an edge at parameter u.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[in]uCurve parameter.
[out]out_pBorrows it. Must be non-NULL.
[out]out_d1Borrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_p, or out_d1 is NULL.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.
OCCTL_WRONG_KINDedge is not an edge.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_edge_eval_dn, occtl_topo_edge_eval_d2

◆ occtl_topo_edge_eval_d2()

occtl_status_t occtl_topo_edge_eval_d2 ( const occtl_graph_t graph,
occtl_node_id_t  edge,
double  u,
occtl_point3_t out_p,
occtl_vector3_t out_d1,
occtl_vector3_t out_d2 
)

Evaluates the 3D point, first derivative, and second derivative on an edge at parameter u.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[in]uCurve parameter.
[out]out_pBorrows it. Must be non-NULL.
[out]out_d1Borrows it. Must be non-NULL.
[out]out_d2Borrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL or an out-param is NULL.
OCCTL_NOT_FOUNDedge is invalid or removed.
OCCTL_WRONG_KINDedge is not an edge.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_edge_eval_d3, occtl_topo_edge_eval_dn

◆ occtl_topo_edge_eval_d3()

occtl_status_t occtl_topo_edge_eval_d3 ( const occtl_graph_t graph,
occtl_node_id_t  edge,
double  u,
occtl_point3_t out_p,
occtl_vector3_t out_d1,
occtl_vector3_t out_d2,
occtl_vector3_t out_d3 
)

Evaluates the 3D point, first derivative, second derivative, and third derivative on an edge at parameter u.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[in]uCurve parameter.
[out]out_pBorrows it. Must be non-NULL.
[out]out_d1Borrows it. Must be non-NULL.
[out]out_d2Borrows it. Must be non-NULL.
[out]out_d3Borrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL or an out-param is NULL.
OCCTL_NOT_FOUNDedge is invalid or removed.
OCCTL_WRONG_KINDedge is not an edge.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_edge_eval_d2, occtl_topo_edge_eval_dn

◆ occtl_topo_edge_eval_dn()

occtl_status_t occtl_topo_edge_eval_dn ( const occtl_graph_t graph,
occtl_node_id_t  edge,
double  u,
uint32_t  n,
occtl_vector3_t out_dn 
)

Evaluates the Nth derivative vector on an edge at parameter u.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[in]uCurve parameter.
[in]nDerivative order (0 = point position as vector).
[out]out_dnBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_dn is NULL.
OCCTL_NOT_FOUNDedge is invalid or removed.
OCCTL_WRONG_KINDedge is not an edge.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_edge_eval_d2, occtl_topo_edge_eval_d3

◆ occtl_topo_edge_face_count()

occtl_status_t occtl_topo_edge_face_count ( const occtl_graph_t graph,
occtl_node_id_t  edge,
uint32_t *  out_count 
)

Returns the number of faces referencing an edge.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[out]out_countBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_edge_has_curve()

occtl_status_t occtl_topo_edge_has_curve ( const occtl_graph_t graph,
occtl_node_id_t  edge,
int32_t *  out_has_curve 
)

Returns whether an edge has a 3D curve.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[out]out_has_curveBorrows it. Set to 1 if the edge has a curve, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_has_curve is NULL.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_edge_is_boundary()

occtl_status_t occtl_topo_edge_is_boundary ( const occtl_graph_t graph,
occtl_node_id_t  edge,
int32_t *  out_is_boundary 
)

Returns whether an edge is a boundary edge (belongs to exactly 1 face).

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[out]out_is_boundaryBorrows it. Set to 1 if boundary, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_is_boundary is NULL.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_edge_is_manifold, occtl_topo_edge_is_seam_on_face

◆ occtl_topo_edge_is_degenerated()

occtl_status_t occtl_topo_edge_is_degenerated ( const occtl_graph_t graph,
occtl_node_id_t  edge,
int32_t *  out_is_degenerated 
)

Returns whether an edge is degenerated.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[out]out_is_degeneratedBorrows it. Set to 1 if degenerated, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_is_degenerated is NULL.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_edge_is_manifold()

occtl_status_t occtl_topo_edge_is_manifold ( const occtl_graph_t graph,
occtl_node_id_t  edge,
int32_t *  out_is_manifold 
)

Returns whether an edge is manifold (shared by at most 2 faces).

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[out]out_is_manifoldBorrows it. Set to 1 if manifold, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_is_manifold is NULL.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_edge_is_boundary, occtl_topo_edge_is_seam_on_face

◆ occtl_topo_edge_is_seam_on_face()

occtl_status_t occtl_topo_edge_is_seam_on_face ( const occtl_graph_t graph,
occtl_node_id_t  edge,
occtl_node_id_t  face,
int32_t *  out_is_seam 
)

Returns whether an edge is a seam edge on a given face.

A seam edge bounds the periodic seam of the face — e.g. the join on a cylindrical or spherical face.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[in]faceFace node ID.
[out]out_is_seamBorrows it. Set to 1 if the edge is a seam on the face, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_is_seam is NULL.
OCCTL_NOT_FOUNDedge or face is invalid or removed.
OCCTL_WRONG_KINDedge is not an edge or face is not a face.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_edge_range()

occtl_status_t occtl_topo_edge_range ( const occtl_graph_t graph,
occtl_node_id_t  edge,
double *  out_first,
double *  out_last 
)

Returns the parametric range of an edge's 3D curve.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[out]out_firstBorrows it. Must be non-NULL.
[out]out_lastBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_first, or out_last is NULL.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_edge_tolerance

◆ occtl_topo_edge_same_parameter()

occtl_status_t occtl_topo_edge_same_parameter ( const occtl_graph_t graph,
occtl_node_id_t  edge,
int32_t *  out_has_same_parameter 
)

Returns whether an edge has the same parameterisation on every face it bounds.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[out]out_has_same_parameterBorrows it. Set to 1 if same-parameter, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_has_same_parameter is NULL.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_edge_same_range()

occtl_status_t occtl_topo_edge_same_range ( const occtl_graph_t graph,
occtl_node_id_t  edge,
int32_t *  out_has_same_range 
)

Returns whether an edge has the same range in 3D and on its pcurves.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[out]out_has_same_rangeBorrows it. Set to 1 if same-range, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_has_same_range is NULL.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_edge_start_vertex()

occtl_status_t occtl_topo_edge_start_vertex ( const occtl_graph_t graph,
occtl_node_id_t  edge,
occtl_node_id_t out_vertex 
)

Returns the start vertex of an edge.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[out]out_vertexBorrows it. Receives the start vertex NodeId. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_vertex is NULL.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_edge_end_vertex

◆ occtl_topo_edge_tolerance()

occtl_status_t occtl_topo_edge_tolerance ( const occtl_graph_t graph,
occtl_node_id_t  edge,
double *  out_tolerance 
)

Returns the tolerance of an edge.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[out]out_toleranceBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_tolerance is NULL.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_edge_vertex_count()

occtl_status_t occtl_topo_edge_vertex_count ( const occtl_graph_t graph,
occtl_node_id_t  edge,
uint32_t *  out_count 
)

Returns the number of vertices on an edge.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[out]out_countBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_edge_view()

occtl_status_t occtl_topo_edge_view ( const occtl_graph_t graph,
occtl_node_id_t  edge,
occtl_edge_view_t view 
)

Fills view with the current scalar state of edge.

view's struct_version must match a known version constant; only fields up to that version are written. The fill is atomic with respect to the C-call boundary but races with concurrent graph mutation.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node id.
[out]viewBorrows it (caller-allocated). Must be non-NULL and initialised via occtl_edge_view_init or OCCTL_EDGE_VIEW_INIT.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or view is NULL, or view->p_next is non-NULL.
OCCTL_NOT_FOUNDedge is invalid or removed.
OCCTL_WRONG_KINDedge is not an edge.
OCCTL_VERSION_MISMATCHview's struct_version is not a supported value.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_face_view, occtl_topo_coedge_view

◆ occtl_topo_edges_of_wire_iter_create()

occtl_status_t occtl_topo_edges_of_wire_iter_create ( const occtl_graph_t graph,
occtl_node_id_t  wire,
occtl_node_iter_t **  out_iter 
)

Creates an iterator over the distinct edges referenced by a wire.

Yielded IDs are OCCTL_KIND_EDGE. Iteration order is implementation-defined.

Parameters
[in]graphMust be non-NULL.
[in]wireWire node ID.
[out]out_iterOwns it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL.
OCCTL_NOT_FOUNDwire is invalid or removed.
OCCTL_WRONG_KINDwire is not a wire.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_face_eval()

occtl_status_t occtl_topo_face_eval ( const occtl_graph_t graph,
occtl_node_id_t  face,
double  u,
double  v,
occtl_point3_t out_p 
)

Evaluates the 3D point on a face at UV parameters (u, v).

Parameters
[in]graphMust be non-NULL.
[in]faceFace node ID.
[in]uU parameter.
[in]vV parameter.
[out]out_pBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_p is NULL.
OCCTL_NOT_FOUNDface is invalid, removed, or not a face.
OCCTL_WRONG_KINDface is not a face.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_face_eval_dn, occtl_topo_face_eval_d1

◆ occtl_topo_face_eval_d1()

occtl_status_t occtl_topo_face_eval_d1 ( const occtl_graph_t graph,
occtl_node_id_t  face,
double  u,
double  v,
occtl_point3_t out_p,
occtl_vector3_t out_d1u,
occtl_vector3_t out_d1v 
)

Evaluates the 3D point and first partial derivatives (D1U, D1V) on a face at UV parameters (u, v).

The surface normal can be computed from the derivatives as cross(out_d1u, out_d1v).normalized().

Parameters
[in]graphMust be non-NULL.
[in]faceFace node ID.
[in]uU parameter.
[in]vV parameter.
[out]out_pBorrows it. Must be non-NULL.
[out]out_d1uBorrows it. Must be non-NULL.
[out]out_d1vBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or an out-param is NULL.
OCCTL_NOT_FOUNDface is invalid or removed.
OCCTL_WRONG_KINDface is not a face.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_face_eval, occtl_topo_face_eval_dn

◆ occtl_topo_face_eval_d2()

occtl_status_t occtl_topo_face_eval_d2 ( const occtl_graph_t graph,
occtl_node_id_t  face,
double  u,
double  v,
occtl_point3_t out_p,
occtl_vector3_t out_d1u,
occtl_vector3_t out_d1v,
occtl_vector3_t out_d2u,
occtl_vector3_t out_d2v,
occtl_vector3_t out_d2uv 
)

Evaluates the 3D point and first and second partial derivatives on a face at UV parameters (u, v).

Parameters
[in]graphMust be non-NULL.
[in]faceFace node ID.
[in]uU parameter.
[in]vV parameter.
[out]out_pBorrows it. Must be non-NULL.
[out]out_d1uBorrows it. Must be non-NULL.
[out]out_d1vBorrows it. Must be non-NULL.
[out]out_d2uBorrows it. Must be non-NULL.
[out]out_d2vBorrows it. Must be non-NULL.
[out]out_d2uvBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL or an out-param is NULL.
OCCTL_NOT_FOUNDface is invalid or removed.
OCCTL_WRONG_KINDface is not a face.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_face_eval_d1, occtl_topo_face_eval_d3

◆ occtl_topo_face_eval_d3()

occtl_status_t occtl_topo_face_eval_d3 ( const occtl_graph_t graph,
occtl_node_id_t  face,
double  u,
double  v,
occtl_point3_t out_p,
occtl_vector3_t out_d1u,
occtl_vector3_t out_d1v,
occtl_vector3_t out_d2u,
occtl_vector3_t out_d2v,
occtl_vector3_t out_d2uv,
occtl_vector3_t out_d3u,
occtl_vector3_t out_d3v,
occtl_vector3_t out_d3uuv,
occtl_vector3_t out_d3uvv 
)

Evaluates the 3D point and first, second, and third partial derivatives on a face at UV parameters (u, v).

Parameters
[in]graphMust be non-NULL.
[in]faceFace node ID.
[in]uU parameter.
[in]vV parameter.
[out]out_pBorrows it. Must be non-NULL.
[out]out_d1uBorrows it. Must be non-NULL.
[out]out_d1vBorrows it. Must be non-NULL.
[out]out_d2uBorrows it. Must be non-NULL.
[out]out_d2vBorrows it. Must be non-NULL.
[out]out_d2uvBorrows it. Must be non-NULL.
[out]out_d3uBorrows it. Must be non-NULL.
[out]out_d3vBorrows it. Must be non-NULL.
[out]out_d3uuvBorrows it. Must be non-NULL.
[out]out_d3uvvBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL or an out-param is NULL.
OCCTL_NOT_FOUNDface is invalid or removed.
OCCTL_WRONG_KINDface is not a face.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_face_eval_d2, occtl_topo_face_eval_dn

◆ occtl_topo_face_eval_dn()

occtl_status_t occtl_topo_face_eval_dn ( const occtl_graph_t graph,
occtl_node_id_t  face,
double  u,
double  v,
uint32_t  nu,
uint32_t  nv,
occtl_vector3_t out_dn 
)

Evaluates the (Nu,Nv)th cross derivative vector on a face at UV parameters (u, v).

Parameters
[in]graphMust be non-NULL.
[in]faceFace node ID.
[in]uU parameter.
[in]vV parameter.
[in]nuU derivative order.
[in]nvV derivative order.
[out]out_dnBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_dn is NULL.
OCCTL_NOT_FOUNDface is invalid or removed.
OCCTL_WRONG_KINDface is not a face.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_face_eval, occtl_topo_face_eval_d1

◆ occtl_topo_face_has_surface()

occtl_status_t occtl_topo_face_has_surface ( const occtl_graph_t graph,
occtl_node_id_t  face,
int32_t *  out_has_surface 
)

Returns whether a face has a surface.

Parameters
[in]graphMust be non-NULL.
[in]faceFace node ID.
[out]out_has_surfaceBorrows it. Set to 1 if the face has a surface, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_has_surface is NULL.
OCCTL_NOT_FOUNDface is invalid, removed, or not a face.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_face_has_triangulation()

occtl_status_t occtl_topo_face_has_triangulation ( const occtl_graph_t graph,
occtl_node_id_t  face,
int32_t *  out_has_triangulation 
)

Returns whether a face has a triangulation.

Parameters
[in]graphMust be non-NULL.
[in]faceFace node ID.
[out]out_has_triangulationBorrows it. Set to 1 if triangulation present, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_has_triangulation is NULL.
OCCTL_NOT_FOUNDface is invalid, removed, or not a face.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_face_natural_restriction

◆ occtl_topo_face_natural_restriction()

occtl_status_t occtl_topo_face_natural_restriction ( const occtl_graph_t graph,
occtl_node_id_t  face,
int32_t *  out_has_natural_restriction 
)

Returns whether a face has natural restriction (inherent bounds from its surface).

Parameters
[in]graphMust be non-NULL.
[in]faceFace node ID.
[out]out_has_natural_restrictionBorrows it. Set to 1 if natural restriction, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_has_natural_restriction is NULL.
OCCTL_NOT_FOUNDface is invalid, removed, or not a face.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_face_has_triangulation

◆ occtl_topo_face_outer_wire()

occtl_status_t occtl_topo_face_outer_wire ( const occtl_graph_t graph,
occtl_node_id_t  face,
occtl_node_id_t out_wire 
)

Returns the outer wire of a face.

Parameters
[in]graphMust be non-NULL.
[in]faceFace node ID.
[out]out_wireBorrows it. Receives the outer wire NodeId. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_wire is NULL.
OCCTL_NOT_FOUNDface is invalid, removed, or not a face, or the face has no outer wire.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_face_surface_kind()

occtl_status_t occtl_topo_face_surface_kind ( const occtl_graph_t graph,
occtl_node_id_t  face,
occtl_surface_kind_t out_kind 
)

Returns the OCCT surface kind carried by a face.

Faces without a surface return OCCTL_SURFACE_KIND_UNDEFINED.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]faceFace node ID.
[out]out_kindBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_kind is NULL.
OCCTL_NOT_FOUNDface is invalid or removed.
OCCTL_WRONG_KINDface is not a face.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_face_has_surface, occtl_select_iter_create

◆ occtl_topo_face_tolerance()

occtl_status_t occtl_topo_face_tolerance ( const occtl_graph_t graph,
occtl_node_id_t  face,
double *  out_tolerance 
)

Returns the tolerance of a face.

Parameters
[in]graphMust be non-NULL.
[in]faceFace node ID.
[out]out_toleranceBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_tolerance is NULL.
OCCTL_NOT_FOUNDface is invalid, removed, or not a face.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_face_uv_bounds()

occtl_status_t occtl_topo_face_uv_bounds ( const occtl_graph_t graph,
occtl_node_id_t  face,
double *  out_umin,
double *  out_umax,
double *  out_vmin,
double *  out_vmax 
)

Returns the UV parameter bounds of a face.

Parameters
[in]graphMust be non-NULL.
[in]faceFace node ID.
[out]out_uminBorrows it. Must be non-NULL.
[out]out_umaxBorrows it. Must be non-NULL.
[out]out_vminBorrows it. Must be non-NULL.
[out]out_vmaxBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or any out-param is NULL.
OCCTL_NOT_FOUNDface is invalid, removed, or not a face.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_face_view()

occtl_status_t occtl_topo_face_view ( const occtl_graph_t graph,
occtl_node_id_t  face,
occtl_face_view_t view 
)

Fills view with the current scalar state of face.

view's struct_version must match a known version constant; only fields up to that version are written.

Parameters
[in]graphMust be non-NULL.
[in]faceFace node id.
[out]viewBorrows it (caller-allocated). Must be non-NULL and initialised via occtl_face_view_init or OCCTL_FACE_VIEW_INIT.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or view is NULL, or view->p_next is non-NULL.
OCCTL_NOT_FOUNDface is invalid or removed.
OCCTL_WRONG_KINDface is not a face.
OCCTL_VERSION_MISMATCHview's struct_version is not a supported value.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_edge_view, occtl_topo_wire_view

◆ occtl_topo_face_wire_count()

occtl_status_t occtl_topo_face_wire_count ( const occtl_graph_t graph,
occtl_node_id_t  face,
uint32_t *  out_count 
)

Returns the number of wires on a face.

Parameters
[in]graphMust be non-NULL.
[in]faceFace node ID.
[out]out_countBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_NOT_FOUNDface is invalid, removed, or not a face.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_faces_of_shell_iter_create()

occtl_status_t occtl_topo_faces_of_shell_iter_create ( const occtl_graph_t graph,
occtl_node_id_t  shell,
occtl_node_iter_t **  out_iter 
)

Creates an iterator over the faces of a shell.

Yielded IDs are OCCTL_KIND_FACE. Iteration order is implementation-defined.

Parameters
[in]graphMust be non-NULL.
[in]shellShell node ID.
[out]out_iterOwns it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL.
OCCTL_NOT_FOUNDshell is invalid or removed.
OCCTL_WRONG_KINDshell is not a shell.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_for_each_related()

occtl_status_t occtl_topo_for_each_related ( const occtl_graph_t graph,
occtl_node_id_t  node,
occtl_node_visitor_t  visitor,
void *  user_data 
)

Iterates over nodes related to node and calls visitor for each.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]nodeRoot node.
[in]visitorCallback invoked for each related node.
[in,out]user_dataPassed through. May be NULL.
Return values
OCCTL_OKOn completion.
OCCTL_INVALID_ARGUMENTgraph or visitor is NULL.
OCCTL_NOT_FOUNDnode is invalid or removed. \par Thread Safety Yes (read-only, allocates internal iterator).
See also
occtl_topo_related_iter_create

◆ occtl_topo_link_product()

occtl_status_t occtl_topo_link_product ( occtl_graph_t graph,
occtl_node_id_t  product,
occtl_node_id_t  root,
occtl_transform_t  placement 
)

Links an existing product to a topology root with a placement.

Creates a new occurrence whose child is the topology root and adds it as the product's shape root. The product must have been created by occtl_topo_make_product.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]productProduct node ID. Must be valid and active.
[in]rootTopology root node ID. Must be valid and active.
[in]placementPlacement transform for the occurrence.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL, or placement contains non-finite values.
OCCTL_NOT_FOUNDproduct or root is invalid or removed.
OCCTL_WRONG_KINDproduct is not a product.

\par Thread Safety No (mutates graph).

See also
occtl_topo_make_product, occtl_topo_link_products

◆ occtl_topo_link_product_occurrence()

occtl_status_t occtl_topo_link_product_occurrence ( occtl_graph_t graph,
occtl_node_id_t  product,
occtl_node_id_t  root,
occtl_transform_t  placement,
occtl_node_id_t out_occurrence 
)

Links an existing product to a topology root and returns the new occurrence.

This is the binding-friendly variant of occtl_topo_link_product. It performs the same mutation but also reports the created occurrence node so callers do not need to scan the product's occurrence list to find it.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]productProduct node ID. Must be valid and active.
[in]rootTopology root node ID. Must be valid and active.
[in]placementPlacement transform for the occurrence.
[out]out_occurrenceBorrows it. Must be non-NULL. Receives the created occurrence node.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_occurrence is NULL, or placement contains non-finite values.
OCCTL_NOT_FOUNDproduct or root is invalid or removed.
OCCTL_WRONG_KINDproduct is not a product.
OCCTL_ERROROCCT failed to create the occurrence.

\par Thread Safety No (mutates graph).

See also
occtl_topo_link_product, occtl_topo_occurrence_transform

◆ occtl_topo_link_products()

occtl_status_t occtl_topo_link_products ( occtl_graph_t graph,
occtl_node_id_t  parentProduct,
occtl_node_id_t  childProduct,
occtl_transform_t  placement,
occtl_node_id_t  parentOccurrence 
)

Links two products via a parent-child occurrence.

The child product is instantiated as an occurrence within the parent product. The optional parentOccurrence parameter allows nesting the new child under an existing occurrence chain.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]parentProductParent product node ID. Must be valid and active.
[in]childProductChild product node ID. Must be valid and active.
[in]placementPlacement transform for the child occurrence.
[in]parentOccurrenceExisting parent occurrence, or all-zero for root-level placement.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDA product NodeId is invalid or removed.
OCCTL_WRONG_KINDA NodeId is not a product.

\par Thread Safety No (mutates graph).

See also
occtl_topo_make_product, occtl_topo_remove_occurrence

◆ occtl_topo_link_products_occurrence()

occtl_status_t occtl_topo_link_products_occurrence ( occtl_graph_t graph,
occtl_node_id_t  parentProduct,
occtl_node_id_t  childProduct,
occtl_transform_t  placement,
occtl_node_id_t  parentOccurrence,
occtl_node_id_t out_occurrence 
)

Links two products and returns the new occurrence node.

This is the binding-friendly variant of occtl_topo_link_products. It performs the same assembly mutation but also reports the created occurrence node for immediate naming, tagging, transforms, or joint creation.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]parentProductParent product node ID. Must be valid and active.
[in]childProductChild product node ID. Must be valid and active.
[in]placementPlacement transform for the child occurrence.
[in]parentOccurrenceExisting parent occurrence, or all-zero for root-level placement.
[out]out_occurrenceBorrows it. Must be non-NULL. Receives the created occurrence node.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_occurrence is NULL, or placement contains non-finite values.
OCCTL_NOT_FOUNDA product NodeId is invalid or removed.
OCCTL_WRONG_KINDA NodeId is not a product.
OCCTL_ERROROCCT failed to create the occurrence.

\par Thread Safety No (mutates graph).

See also
occtl_topo_link_products, occtl_topo_occurrence_transform

◆ occtl_topo_make_product()

occtl_status_t occtl_topo_make_product ( occtl_graph_t graph,
const occtl_topo_make_product_info_t info,
occtl_node_id_t out_product 
)

Creates a product in the graph.

The product is an assembly root. When info->root is a valid (non-zero) NodeId the product wraps that topology root via a placement; otherwise an empty product with no shape root is created.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL.
[out]out_productBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, info, or out_product is NULL; info->p_next is non-NULL; or info->placement contains non-finite values.
OCCTL_VERSION_MISMATCHinfo->struct_version is unsupported.
OCCTL_NOT_FOUNDinfo->root is non-zero and invalid or removed.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

See also
occtl_topo_link_product, occtl_topo_link_products

◆ occtl_topo_make_product_info_init()

void occtl_topo_make_product_info_init ( occtl_topo_make_product_info_t info)

Initialises info to default values via OCCTL_TOPO_MAKE_PRODUCT_INFO_INIT.

NULL-tolerant.

Parameters
[out]infoBorrows it. May be NULL (no-op).

\par Thread Safety Yes.

See also
occtl_topo_make_product

◆ occtl_topo_occurrence_set_transform()

occtl_status_t occtl_topo_occurrence_set_transform ( occtl_graph_t graph,
occtl_node_id_t  occurrence,
occtl_transform_t  transform 
)

Sets the local placement carried by an occurrence node.

The placement is graph-stored on the unique active occurrence reference that owns occurrence; the occurrence definition and child product/root are not copied. If the occurrence definition has more than one active reference, use the generic reference-location editor instead.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]occurrenceOccurrence node ID to modify.
[in]transformNew local placement.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL, or transform contains non-finite values, or occurrence has more than one active reference.
OCCTL_NOT_FOUNDoccurrence is invalid, removed, or has no active occurrence reference.
OCCTL_WRONG_KINDoccurrence is not an occurrence node.

\par Thread Safety No (mutates graph).

See also
occtl_topo_occurrence_transform, occtl_topo_set_ref_location

◆ occtl_topo_occurrence_transform()

occtl_status_t occtl_topo_occurrence_transform ( const occtl_graph_t graph,
occtl_node_id_t  occurrence,
occtl_transform_t out_transform 
)

Retrieves the local placement carried by an occurrence node.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]occurrenceOccurrence node ID to query.
[out]out_transformBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_transform is NULL.
OCCTL_NOT_FOUNDoccurrence is invalid, removed, or has no active occurrence reference.
OCCTL_WRONG_KINDoccurrence is not an occurrence node.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_occurrence_set_transform, occtl_topo_occurrence_world_transform

◆ occtl_topo_occurrence_world_transform()

occtl_status_t occtl_topo_occurrence_world_transform ( const occtl_graph_t graph,
occtl_node_id_t  root,
occtl_node_id_t  occurrence,
occtl_transform_t out_transform 
)

Retrieves an occurrence's accumulated transform from a traversal root.

The helper walks downward from root using BRepGraph's child explorer and returns the accumulated placement for the first path that reaches occurrence. Pass a root Product for assembly-world placement.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]rootTraversal root. Must be valid and active.
[in]occurrenceOccurrence node ID to locate below root.
[out]out_transformBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_transform is NULL.
OCCTL_NOT_FOUNDroot / occurrence is invalid or occurrence is not reachable from root.
OCCTL_WRONG_KINDoccurrence is not an occurrence node.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_child_explorer_create, occtl_topo_occurrence_transform

◆ occtl_topo_occurrences_of_product_iter_create()

occtl_status_t occtl_topo_occurrences_of_product_iter_create ( const occtl_graph_t graph,
occtl_node_id_t  product,
occtl_node_iter_t **  out_iter 
)

Creates an iterator over the occurrences of a product.

Yielded IDs are OCCTL_KIND_OCCURRENCE. Iteration order is implementation-defined.

Parameters
[in]graphMust be non-NULL.
[in]productProduct node ID.
[out]out_iterOwns it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL.
OCCTL_NOT_FOUNDproduct is invalid or removed.
OCCTL_WRONG_KINDproduct is not a product.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_product_occurrence_count()

occtl_status_t occtl_topo_product_occurrence_count ( const occtl_graph_t graph,
occtl_node_id_t  product,
uint32_t *  out_count 
)

Returns the number of occurrences of a product.

Parameters
[in]graphMust be non-NULL.
[in]productProduct node ID.
[out]out_countBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_NOT_FOUNDproduct is invalid, removed, or not a product.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_remove_occurrence()

occtl_status_t occtl_topo_remove_occurrence ( occtl_graph_t graph,
occtl_ref_id_t  occurrence_ref 
)

Removes an occurrence reference from the graph.

Detaches a child usage from its parent product. The referenced child definition (product or topology root) is not removed unless it has no other active usages.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]occurrence_refOccurrence reference to remove.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDoccurrence_ref is invalid or removed.

\par Thread Safety No (mutates graph).

See also
occtl_topo_link_products

◆ occtl_topo_shell_face_count()

occtl_status_t occtl_topo_shell_face_count ( const occtl_graph_t graph,
occtl_node_id_t  shell,
uint32_t *  out_count 
)

Returns the number of faces in a shell.

Parameters
[in]graphMust be non-NULL.
[in]shellShell node ID.
[out]out_countBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_NOT_FOUNDshell is invalid, removed, or not a shell.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_shell_is_closed()

occtl_status_t occtl_topo_shell_is_closed ( const occtl_graph_t graph,
occtl_node_id_t  shell,
int32_t *  out_is_closed 
)

Returns whether a shell is topologically closed (watertight).

Parameters
[in]graphMust be non-NULL.
[in]shellShell node ID.
[out]out_is_closedBorrows it. Set to 1 if closed, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_is_closed is NULL.
OCCTL_NOT_FOUNDshell is invalid, removed, or not a shell.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_shell_view()

occtl_status_t occtl_topo_shell_view ( const occtl_graph_t graph,
occtl_node_id_t  shell,
occtl_shell_view_t view 
)

Fills view with the current scalar state of shell.

view's struct_version must match a known version constant; only fields up to that version are written.

Parameters
[in]graphMust be non-NULL.
[in]shellShell node id.
[out]viewBorrows it (caller-allocated). Must be non-NULL and initialised via occtl_shell_view_init or OCCTL_SHELL_VIEW_INIT.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or view is NULL, or view->p_next is non-NULL.
OCCTL_NOT_FOUNDshell is invalid or removed.
OCCTL_WRONG_KINDshell is not a shell.
OCCTL_VERSION_MISMATCHview's struct_version is not a supported value.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_face_view, occtl_topo_solid_view

◆ occtl_topo_shells_of_solid_iter_create()

occtl_status_t occtl_topo_shells_of_solid_iter_create ( const occtl_graph_t graph,
occtl_node_id_t  solid,
occtl_node_iter_t **  out_iter 
)

Creates an iterator over the shells of a solid.

Yielded IDs are OCCTL_KIND_SHELL. Iteration order is implementation-defined.

Parameters
[in]graphMust be non-NULL.
[in]solidSolid node ID.
[out]out_iterOwns it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL.
OCCTL_NOT_FOUNDsolid is invalid or removed.
OCCTL_WRONG_KINDsolid is not a solid.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_solid_shell_count()

occtl_status_t occtl_topo_solid_shell_count ( const occtl_graph_t graph,
occtl_node_id_t  solid,
uint32_t *  out_count 
)

Returns the number of shells in a solid.

Parameters
[in]graphMust be non-NULL.
[in]solidSolid node ID.
[out]out_countBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_NOT_FOUNDsolid is invalid, removed, or not a solid.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_solid_view()

occtl_status_t occtl_topo_solid_view ( const occtl_graph_t graph,
occtl_node_id_t  solid,
occtl_solid_view_t view 
)

Fills view with the current scalar state of solid.

view's struct_version must match a known version constant; only fields up to that version are written.

Parameters
[in]graphMust be non-NULL.
[in]solidSolid node id.
[out]viewBorrows it (caller-allocated). Must be non-NULL and initialised via occtl_solid_view_init or OCCTL_SOLID_VIEW_INIT.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or view is NULL, or view->p_next is non-NULL.
OCCTL_NOT_FOUNDsolid is invalid or removed.
OCCTL_WRONG_KINDsolid is not a solid.
OCCTL_VERSION_MISMATCHview's struct_version is not a supported value.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_shell_view, occtl_topo_compound_view

◆ occtl_topo_vertex_edge_count()

occtl_status_t occtl_topo_vertex_edge_count ( const occtl_graph_t graph,
occtl_node_id_t  vertex,
uint32_t *  out_count 
)

Returns the number of edges that reference a vertex.

Parameters
[in]graphMust be non-NULL.
[in]vertexVertex node ID.
[out]out_countBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_NOT_FOUNDvertex is invalid, removed, or not a vertex.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_vertex_parameter()

occtl_status_t occtl_topo_vertex_parameter ( const occtl_graph_t graph,
occtl_node_id_t  vertex,
occtl_node_id_t  edge,
double *  out_parameter 
)

Parameter of a vertex on a given edge.

Parameters
[in]graphMust be non-NULL.
[in]vertexVertex node ID.
[in]edgeEdge node ID.
[out]out_parameterBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_parameter is NULL.
OCCTL_NOT_FOUNDvertex or edge is invalid or removed.
OCCTL_WRONG_KINDvertex is not a vertex or edge is not an edge.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_vertex_parameters

◆ occtl_topo_vertex_parameters()

occtl_status_t occtl_topo_vertex_parameters ( const occtl_graph_t graph,
occtl_node_id_t  vertex,
occtl_node_id_t  face,
occtl_point2_t out_uv 
)

UV parameters of a vertex on a given face.

Parameters
[in]graphMust be non-NULL.
[in]vertexVertex node ID.
[in]faceFace node ID.
[out]out_uvBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_uv is NULL.
OCCTL_NOT_FOUNDvertex or face is invalid or removed.
OCCTL_WRONG_KINDvertex is not a vertex or face is not a face.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_vertex_parameter

◆ occtl_topo_vertex_point()

occtl_status_t occtl_topo_vertex_point ( const occtl_graph_t graph,
occtl_node_id_t  vertex,
occtl_point3_t out_point 
)

Returns the 3D point of a vertex.

Parameters
[in]graphMust be non-NULL.
[in]vertexVertex node ID. Must be a valid, active vertex.
[out]out_pointBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_point is NULL.
OCCTL_NOT_FOUNDvertex is invalid, removed, or not a vertex.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_vertex_tolerance

◆ occtl_topo_vertex_tolerance()

occtl_status_t occtl_topo_vertex_tolerance ( const occtl_graph_t graph,
occtl_node_id_t  vertex,
double *  out_tolerance 
)

Returns the tolerance of a vertex.

Parameters
[in]graphMust be non-NULL.
[in]vertexVertex node ID.
[out]out_toleranceBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_tolerance is NULL.
OCCTL_NOT_FOUNDvertex is invalid, removed, or not a vertex.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_vertex_point

◆ occtl_topo_vertex_view()

occtl_status_t occtl_topo_vertex_view ( const occtl_graph_t graph,
occtl_node_id_t  vertex,
occtl_vertex_view_t view 
)

Fills view with the current scalar state of vertex.

view's struct_version must match a known version constant; only fields up to that version are written.

Parameters
[in]graphMust be non-NULL.
[in]vertexVertex node id.
[out]viewBorrows it (caller-allocated). Must be non-NULL and initialised via occtl_vertex_view_init or OCCTL_VERTEX_VIEW_INIT.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or view is NULL, or view->p_next is non-NULL.
OCCTL_NOT_FOUNDvertex is invalid or removed.
OCCTL_WRONG_KINDvertex is not a vertex.
OCCTL_VERSION_MISMATCHview's struct_version is not a supported value.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_edge_view

◆ occtl_topo_vertices_of_edge_iter_create()

occtl_status_t occtl_topo_vertices_of_edge_iter_create ( const occtl_graph_t graph,
occtl_node_id_t  edge,
occtl_node_iter_t **  out_iter 
)

Creates an iterator over the vertices of an edge.

Yielded order is: start vertex, end vertex, then internal vertex IDs in their stored order. This pinned order lets callers distinguish roles by position in the yield sequence.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[out]out_iterOwns it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL.
OCCTL_NOT_FOUNDedge is invalid or removed.
OCCTL_WRONG_KINDedge is not an edge.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_wire_coedge_count()

occtl_status_t occtl_topo_wire_coedge_count ( const occtl_graph_t graph,
occtl_node_id_t  wire,
uint32_t *  out_count 
)

Returns the number of coedges in a wire.

Parameters
[in]graphMust be non-NULL.
[in]wireWire node ID.
[out]out_countBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_NOT_FOUNDwire is invalid, removed, or not a wire.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_wire_distinct_edge_count()

occtl_status_t occtl_topo_wire_distinct_edge_count ( const occtl_graph_t graph,
occtl_node_id_t  wire,
uint32_t *  out_count 
)

Returns the number of distinct edges in a wire.

Parameters
[in]graphMust be non-NULL.
[in]wireWire node ID.
[out]out_countBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_NOT_FOUNDwire is invalid, removed, or not a wire.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_wire_edge_count()

occtl_status_t occtl_topo_wire_edge_count ( const occtl_graph_t graph,
occtl_node_id_t  wire,
uint32_t *  out_count 
)

Returns the number of edges in a wire.

Parameters
[in]graphMust be non-NULL.
[in]wireWire node ID.
[out]out_countBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_NOT_FOUNDwire is invalid, removed, or not a wire.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_wire_explorer_create()

occtl_status_t occtl_topo_wire_explorer_create ( const occtl_graph_t graph,
occtl_node_id_t  wire,
occtl_node_iter_t **  out_iter 
)

Creates an iterator over the coedges of a wire in geometric traversal order.

The wire explorer follows coedges in endpoint-chaining order, unlike occtl_topo_coedges_of_wire_iter_create which visits coedge definitions in stored order. The traversal auto-chains open endpoints and wraps around a closed wire.

Yielded IDs are OCCTL_KIND_COEDGE.

Parameters
[in]graphMust be non-NULL.
[in]wireWire node ID.
[out]out_iterOwns it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL.
OCCTL_NOT_FOUNDwire is invalid or removed.
OCCTL_WRONG_KINDwire is not a wire.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_coedges_of_wire_iter_create

◆ occtl_topo_wire_face_of()

occtl_status_t occtl_topo_wire_face_of ( const occtl_graph_t graph,
occtl_node_id_t  wire,
occtl_node_id_t out_face 
)

Returns the face a wire belongs to.

Parameters
[in]graphMust be non-NULL.
[in]wireWire node ID.
[out]out_faceBorrows it. Receives the parent face NodeId. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_face is NULL.
OCCTL_NOT_FOUNDwire is invalid, removed, or not a wire, or the wire is free (not owned by any face).

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_wire_is_outer

◆ occtl_topo_wire_is_closed()

occtl_status_t occtl_topo_wire_is_closed ( const occtl_graph_t graph,
occtl_node_id_t  wire,
int32_t *  out_is_closed 
)

Returns whether a wire is topologically closed.

Parameters
[in]graphMust be non-NULL.
[in]wireWire node ID.
[out]out_is_closedBorrows it. Set to 1 if closed, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_is_closed is NULL.
OCCTL_NOT_FOUNDwire is invalid, removed, or not a wire.

\par Thread Safety Yes (read-only on graph).

◆ occtl_topo_wire_is_outer()

occtl_status_t occtl_topo_wire_is_outer ( const occtl_graph_t graph,
occtl_node_id_t  wire,
int32_t *  out_is_outer 
)

Returns whether a wire is the outer wire of its parent face.

Parameters
[in]graphMust be non-NULL.
[in]wireWire node ID.
[out]out_is_outerBorrows it. Set to 1 if outer, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_is_outer is NULL.
OCCTL_NOT_FOUNDwire is invalid, removed, or not a wire.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_wire_face_of

◆ occtl_topo_wire_view()

occtl_status_t occtl_topo_wire_view ( const occtl_graph_t graph,
occtl_node_id_t  wire,
occtl_wire_view_t view 
)

Fills view with the current scalar state of wire.

view's struct_version must match a known version constant; only fields up to that version are written.

Parameters
[in]graphMust be non-NULL.
[in]wireWire node id.
[out]viewBorrows it (caller-allocated). Must be non-NULL and initialised via occtl_wire_view_init or OCCTL_WIRE_VIEW_INIT.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or view is NULL, or view->p_next is non-NULL.
OCCTL_NOT_FOUNDwire is invalid or removed.
OCCTL_WRONG_KINDwire is not a wire.
OCCTL_VERSION_MISMATCHview's struct_version is not a supported value.

\par Thread Safety Yes (read-only on graph).

See also
occtl_topo_face_view, occtl_topo_edge_view

◆ occtl_topo_wires_of_face_iter_create()

occtl_status_t occtl_topo_wires_of_face_iter_create ( const occtl_graph_t graph,
occtl_node_id_t  face,
occtl_node_iter_t **  out_iter 
)

Creates an iterator over the wires of a face.

Yielded IDs are OCCTL_KIND_WIRE. Iteration order is implementation-defined.

Parameters
[in]graphMust be non-NULL.
[in]faceFace node ID.
[out]out_iterOwns it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL.
OCCTL_NOT_FOUNDface is invalid or removed.
OCCTL_WRONG_KINDface is not a face.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes (read-only on graph).

◆ occtl_vertex_view_init()

void occtl_vertex_view_init ( occtl_vertex_view_t view)

Initialises view to default values matching OCCTL_EDGE_VIEW_INIT.

NULL-tolerant.

Parameters
[out]viewBorrows it. May be NULL (no-op).

\par Thread Safety Yes.

See also
occtl_topo_edge_view

◆ occtl_wire_view_init()

void occtl_wire_view_init ( occtl_wire_view_t view)

Initialises view to default values matching OCCTL_EDGE_VIEW_INIT.

NULL-tolerant.

Parameters
[out]viewBorrows it. May be NULL (no-op).

\par Thread Safety Yes.

See also
occtl_topo_edge_view