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

OCCT-Light: Topology builders, mutations, and property setters. More...

#include <stddef.h>
#include <stdint.h>
#include "occtl_core.h"
#include "occtl_curves.h"
#include "occtl_geom.h"
#include "occtl_surfaces.h"
#include "occtl_topo_relation.h"
#include "occtl_topo_types.h"
Include dependency graph for occtl_topo_build.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_vertex_info
 
struct  occtl_topo_make_edge_info
 
struct  occtl_topo_make_wire_info
 
struct  occtl_topo_edges_to_wires_options
 
struct  occtl_topo_wire_offset_2d_options
 
struct  occtl_topo_wire_fix_degenerate_edges_options
 
struct  occtl_topo_face_chamfer_2d_options
 
struct  occtl_topo_wire_chamfer_2d_options
 
struct  occtl_topo_make_face_info
 
struct  occtl_topo_make_face_from_wires_auto_options
 
struct  occtl_topo_make_shell_info
 
struct  occtl_topo_make_solid_info
 
struct  occtl_topo_make_compound_info
 
struct  occtl_topo_make_compsolid_info
 
struct  occtl_color_rgba
 
struct  occtl_material_info
 
struct  occtl_joint_info
 
struct  occtl_metadata_key_view
 
struct  occtl_tag_view
 
struct  occtl_select_bbox
 
struct  occtl_graph_obb
 
struct  occtl_graph_uv_bounds
 
struct  occtl_graph_mass_properties
 
struct  occtl_select_options
 
struct  occtl_select_metadata_filter
 
struct  occtl_select_distance_to_node_sort
 
struct  occtl_select_group_options
 
struct  occtl_select_group_view
 

Macros

#define OCCTL_TOPO_MAKE_VERTEX_INFO_VERSION_1   1u
 
#define OCCTL_TOPO_MAKE_VERTEX_INFO_INIT    {OCCTL_TOPO_MAKE_VERTEX_INFO_VERSION_1, NULL, {0.0, 0.0, 0.0}, 0.0}
 
#define OCCTL_TOPO_MAKE_EDGE_INFO_VERSION_1   1u
 
#define OCCTL_TOPO_MAKE_EDGE_INFO_INIT
 
#define OCCTL_TOPO_MAKE_WIRE_INFO_VERSION_1   1u
 
#define OCCTL_TOPO_MAKE_WIRE_INFO_INIT   {OCCTL_TOPO_MAKE_WIRE_INFO_VERSION_1, NULL, NULL, 0}
 
#define OCCTL_TOPO_EDGES_TO_WIRES_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_EDGES_TO_WIRES_OPTIONS_INIT    {OCCTL_TOPO_EDGES_TO_WIRES_OPTIONS_VERSION_1, NULL, NULL, 0, 0.0, 1}
 
#define OCCTL_TOPO_WIRE_OFFSET_2D_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_WIRE_OFFSET_2D_OPTIONS_INIT
 
#define OCCTL_TOPO_WIRE_FIX_DEGENERATE_EDGES_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_WIRE_FIX_DEGENERATE_EDGES_OPTIONS_INIT    {OCCTL_TOPO_WIRE_FIX_DEGENERATE_EDGES_OPTIONS_VERSION_1, NULL, OCCTL_NODE_ID_INVALID, 1.0e-9}
 
#define OCCTL_TOPO_FACE_CHAMFER_2D_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_FACE_CHAMFER_2D_OPTIONS_INIT    {OCCTL_TOPO_FACE_CHAMFER_2D_OPTIONS_VERSION_1, NULL, OCCTL_NODE_ID_INVALID, NULL, 0, 1.0, 1.0}
 
#define OCCTL_TOPO_WIRE_CHAMFER_2D_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_WIRE_CHAMFER_2D_OPTIONS_INIT    {OCCTL_TOPO_WIRE_CHAMFER_2D_OPTIONS_VERSION_1, NULL, OCCTL_NODE_ID_INVALID, NULL, 0, 1.0, 1.0}
 
#define OCCTL_TOPO_MAKE_FACE_INFO_VERSION_1   1u
 
#define OCCTL_TOPO_MAKE_FACE_INFO_INIT
 
#define OCCTL_TOPO_MAKE_FACE_FROM_WIRES_AUTO_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_MAKE_FACE_FROM_WIRES_AUTO_OPTIONS_INIT
 
#define OCCTL_TOPO_MAKE_SHELL_INFO_VERSION_1   1u
 
#define OCCTL_TOPO_MAKE_SHELL_INFO_INIT   {OCCTL_TOPO_MAKE_SHELL_INFO_VERSION_1, NULL, NULL, 0, 0}
 
#define OCCTL_TOPO_MAKE_SOLID_INFO_VERSION_1   1u
 
#define OCCTL_TOPO_MAKE_SOLID_INFO_INIT   {OCCTL_TOPO_MAKE_SOLID_INFO_VERSION_1, NULL, NULL, 0}
 
#define OCCTL_TOPO_MAKE_COMPOUND_INFO_VERSION_1   1u
 
#define OCCTL_TOPO_MAKE_COMPOUND_INFO_INIT   {OCCTL_TOPO_MAKE_COMPOUND_INFO_VERSION_1, NULL, NULL, 0}
 
#define OCCTL_TOPO_MAKE_COMPSOLID_INFO_VERSION_1   1u
 
#define OCCTL_TOPO_MAKE_COMPSOLID_INFO_INIT    {OCCTL_TOPO_MAKE_COMPSOLID_INFO_VERSION_1, NULL, NULL, 0}
 
#define OCCTL_MATERIAL_INFO_VERSION_1   1u
 
#define OCCTL_MATERIAL_INFO_INIT
 
#define OCCTL_JOINT_INFO_VERSION_1   1u
 
#define OCCTL_JOINT_INFO_INIT
 
#define OCCTL_SELECT_OPTIONS_VERSION_1   1u
 
#define OCCTL_SELECT_METADATA_FILTER_VERSION_1   1u
 
#define OCCTL_SELECT_DISTANCE_TO_NODE_SORT_VERSION_1   1u
 
#define OCCTL_SELECT_GROUP_OPTIONS_VERSION_1   1u
 
#define OCCTL_SELECT_GROUP_VIEW_VERSION_1   1u
 
#define OCCTL_SELECT_OPTIONS_INIT
 
#define OCCTL_SELECT_METADATA_FILTER_INIT    {OCCTL_SELECT_METADATA_FILTER_VERSION_1, NULL, NULL, 0u, NULL, 0u, 0}
 
#define OCCTL_SELECT_DISTANCE_TO_NODE_SORT_INIT    {OCCTL_SELECT_DISTANCE_TO_NODE_SORT_VERSION_1, NULL, OCCTL_NODE_ID_INVALID}
 
#define OCCTL_SELECT_GROUP_OPTIONS_INIT
 
#define OCCTL_SELECT_GROUP_VIEW_INIT
 

Typedefs

typedef struct occtl_topo_make_vertex_info occtl_topo_make_vertex_info_t
 
typedef struct occtl_topo_make_edge_info occtl_topo_make_edge_info_t
 
typedef struct occtl_topo_make_wire_info occtl_topo_make_wire_info_t
 
typedef struct occtl_topo_edges_to_wires_options occtl_topo_edges_to_wires_options_t
 
typedef enum occtl_topo_wire_offset_2d_join occtl_topo_wire_offset_2d_join_t
 
typedef enum occtl_offset_join_type occtl_offset_join_type_t
 
typedef struct occtl_topo_wire_offset_2d_options occtl_topo_wire_offset_2d_options_t
 
typedef struct occtl_topo_wire_fix_degenerate_edges_options occtl_topo_wire_fix_degenerate_edges_options_t
 
typedef struct occtl_topo_face_chamfer_2d_options occtl_topo_face_chamfer_2d_options_t
 
typedef struct occtl_topo_wire_chamfer_2d_options occtl_topo_wire_chamfer_2d_options_t
 
typedef struct occtl_topo_make_face_info occtl_topo_make_face_info_t
 
typedef struct occtl_topo_make_face_from_wires_auto_options occtl_topo_make_face_from_wires_auto_options_t
 
typedef struct occtl_topo_make_shell_info occtl_topo_make_shell_info_t
 
typedef struct occtl_topo_make_solid_info occtl_topo_make_solid_info_t
 
typedef struct occtl_topo_make_compound_info occtl_topo_make_compound_info_t
 
typedef struct occtl_topo_make_compsolid_info occtl_topo_make_compsolid_info_t
 
typedef struct occtl_batch occtl_batch_t
 
typedef struct occtl_color_rgba occtl_color_rgba_t
 
typedef struct occtl_material_info occtl_material_info_t
 
typedef enum occtl_joint_kind occtl_joint_kind_t
 
typedef struct occtl_joint_info occtl_joint_info_t
 
typedef struct occtl_metadata_key_view occtl_metadata_key_view_t
 
typedef struct occtl_tag_view occtl_tag_view_t
 
typedef struct occtl_select_iter occtl_select_iter_t
 
typedef struct occtl_select_group_iter occtl_select_group_iter_t
 
typedef struct occtl_select_bbox occtl_select_bbox_t
 
typedef struct occtl_graph_obb occtl_graph_obb_t
 
typedef struct occtl_graph_uv_bounds occtl_graph_uv_bounds_t
 
typedef struct occtl_graph_mass_properties occtl_graph_mass_properties_t
 
typedef enum occtl_select_bbox_mode occtl_select_bbox_mode_t
 
typedef enum occtl_select_axis occtl_select_axis_t
 
typedef enum occtl_select_axis_position occtl_select_axis_position_t
 
typedef enum occtl_select_normal_mode occtl_select_normal_mode_t
 
typedef enum occtl_select_measure_kind occtl_select_measure_kind_t
 
typedef enum occtl_select_sort_key occtl_select_sort_key_t
 
typedef enum occtl_select_sort_direction occtl_select_sort_direction_t
 
typedef enum occtl_select_group_key occtl_select_group_key_t
 
typedef struct occtl_select_options occtl_select_options_t
 
typedef struct occtl_select_metadata_filter occtl_select_metadata_filter_t
 
typedef struct occtl_select_distance_to_node_sort occtl_select_distance_to_node_sort_t
 
typedef struct occtl_select_group_options occtl_select_group_options_t
 
typedef struct occtl_select_group_view occtl_select_group_view_t
 

Enumerations

enum  occtl_topo_wire_offset_2d_join { OCCTL_TOPO_WIRE_OFFSET_2D_JOIN_ARC = 0 , OCCTL_TOPO_WIRE_OFFSET_2D_JOIN_TANGENT = 1 , OCCTL_TOPO_WIRE_OFFSET_2D_JOIN_INTERSECTION , OCCTL_TOPO_WIRE_OFFSET_2D_JOIN_RESERVED_FUTURE = 0x7fffffff }
 
enum  occtl_offset_join_type { OCCTL_OFFSET_JOIN_ARC = 0 , OCCTL_OFFSET_JOIN_TANGENT = 1 , OCCTL_OFFSET_JOIN_INTERSECTION = 2 , OCCTL_OFFSET_JOIN_RESERVED_FUTURE = 0x7fffffff }
 
enum  occtl_joint_kind {
  OCCTL_JOINT_RIGID = 0 , OCCTL_JOINT_REVOLUTE = 1 , OCCTL_JOINT_LINEAR = 2 , OCCTL_JOINT_CYLINDRICAL = 3 ,
  OCCTL_JOINT_BALL = 4 , OCCTL_JOINT_RESERVED_FUTURE = 0x7fffffff
}
 
enum  occtl_select_bbox_mode { OCCTL_SELECT_BBOX_INTERSECTS = 0 , OCCTL_SELECT_BBOX_INSIDE = 1 , OCCTL_SELECT_BBOX_CONTAINS_CENTER = 2 , OCCTL_SELECT_BBOX_MODE_RESERVED_FUTURE = 0x7fffffff }
 
enum  occtl_select_axis { OCCTL_SELECT_AXIS_X = 0 , OCCTL_SELECT_AXIS_Y = 1 , OCCTL_SELECT_AXIS_Z = 2 , OCCTL_SELECT_AXIS_RESERVED_FUTURE = 0x7fffffff }
 
enum  occtl_select_axis_position { OCCTL_SELECT_AXIS_POSITION_MIN = 0 , OCCTL_SELECT_AXIS_POSITION_MAX = 1 , OCCTL_SELECT_AXIS_POSITION_CENTER = 2 , OCCTL_SELECT_AXIS_POSITION_RESERVED_FUTURE = 0x7fffffff }
 
enum  occtl_select_normal_mode { OCCTL_SELECT_NORMAL_PARALLEL = 0 , OCCTL_SELECT_NORMAL_ANTIPARALLEL = 1 , OCCTL_SELECT_NORMAL_EITHER = 2 , OCCTL_SELECT_NORMAL_MODE_RESERVED_FUTURE = 0x7fffffff }
 
enum  occtl_select_measure_kind {
  OCCTL_SELECT_MEASURE_EDGE_LENGTH = 0 , OCCTL_SELECT_MEASURE_WIRE_LENGTH = 1 , OCCTL_SELECT_MEASURE_FACE_AREA = 2 , OCCTL_SELECT_MEASURE_SURFACE_AREA = 3 ,
  OCCTL_SELECT_MEASURE_VOLUME = 4 , OCCTL_SELECT_MEASURE_KIND_RESERVED_FUTURE = 0x7fffffff
}
 
enum  occtl_select_sort_key {
  OCCTL_SELECT_SORT_NONE = 0 , OCCTL_SELECT_SORT_AXIS_COORDINATE = 1 , OCCTL_SELECT_SORT_MEASURE = 2 , OCCTL_SELECT_SORT_DISTANCE_TO_POINT ,
  OCCTL_SELECT_SORT_NAME = 4 , OCCTL_SELECT_SORT_UID = 5 , OCCTL_SELECT_SORT_DISTANCE_TO_NODE = 6 , OCCTL_SELECT_SORT_KEY_RESERVED_FUTURE = 0x7fffffff
}
 
enum  occtl_select_sort_direction { OCCTL_SELECT_SORT_ASCENDING = 0 , OCCTL_SELECT_SORT_DESCENDING = 1 , OCCTL_SELECT_SORT_DIRECTION_RESERVED_FUTURE = 0x7fffffff }
 
enum  occtl_select_group_key {
  OCCTL_SELECT_GROUP_KIND = 0 , OCCTL_SELECT_GROUP_AXIS_COORDINATE = 1 , OCCTL_SELECT_GROUP_CURVE_KIND = 2 , OCCTL_SELECT_GROUP_SURFACE_KIND = 3 ,
  OCCTL_SELECT_GROUP_NAME = 4 , OCCTL_SELECT_GROUP_COLOR = 5 , OCCTL_SELECT_GROUP_KEY_RESERVED_FUTURE = 0x7fffffff
}
 

Functions

void occtl_topo_make_vertex_info_init (occtl_topo_make_vertex_info_t *info)
 
void occtl_topo_make_edge_info_init (occtl_topo_make_edge_info_t *info)
 
void occtl_topo_make_wire_info_init (occtl_topo_make_wire_info_t *info)
 
void occtl_topo_edges_to_wires_options_init (occtl_topo_edges_to_wires_options_t *options)
 
void occtl_topo_wire_offset_2d_options_init (occtl_topo_wire_offset_2d_options_t *options)
 
void occtl_topo_wire_fix_degenerate_options_init (occtl_topo_wire_fix_degenerate_edges_options_t *options)
 
void occtl_topo_face_chamfer_2d_options_init (occtl_topo_face_chamfer_2d_options_t *options)
 
void occtl_topo_wire_chamfer_2d_options_init (occtl_topo_wire_chamfer_2d_options_t *options)
 
void occtl_topo_make_face_info_init (occtl_topo_make_face_info_t *info)
 
void occtl_topo_make_face_from_wires_auto_options_init (occtl_topo_make_face_from_wires_auto_options_t *options)
 
void occtl_topo_make_shell_info_init (occtl_topo_make_shell_info_t *info)
 
void occtl_topo_make_solid_info_init (occtl_topo_make_solid_info_t *info)
 
void occtl_topo_make_compound_info_init (occtl_topo_make_compound_info_t *info)
 
occtl_status_t occtl_topo_make_vertex (occtl_graph_t *graph, const occtl_topo_make_vertex_info_t *info, occtl_node_id_t *out_vertex)
 
occtl_status_t occtl_topo_make_edge (occtl_graph_t *graph, const occtl_topo_make_edge_info_t *info, occtl_node_id_t *out_edge)
 
occtl_status_t occtl_topo_make_wire (occtl_graph_t *graph, const occtl_topo_make_wire_info_t *info, occtl_node_id_t *out_wire)
 
occtl_status_t occtl_topo_edges_to_wires (occtl_graph_t *graph, const occtl_topo_edges_to_wires_options_t *options, occtl_node_id_t *out_wires, size_t cap, size_t *out_count)
 
occtl_status_t occtl_topo_wire_offset_2d (occtl_graph_t *graph, const occtl_topo_wire_offset_2d_options_t *options, occtl_node_id_t *out_wire)
 
occtl_status_t occtl_topo_curves_to_wire (occtl_graph_t *graph, const occtl_rep_id_t *curve_ids, size_t count, occtl_node_id_t *out_wire)
 
occtl_status_t occtl_topo_wire_fix_degenerate (occtl_graph_t *graph, const occtl_topo_wire_fix_degenerate_edges_options_t *options, size_t *out_removed)
 
occtl_status_t occtl_topo_face_chamfer_2d (occtl_graph_t *graph, const occtl_topo_face_chamfer_2d_options_t *options, occtl_node_id_t *out_face)
 
occtl_status_t occtl_topo_wire_chamfer_2d (occtl_graph_t *graph, const occtl_topo_wire_chamfer_2d_options_t *options, occtl_node_id_t *out_wire)
 
occtl_status_t occtl_topo_make_face (occtl_graph_t *graph, const occtl_topo_make_face_info_t *info, occtl_node_id_t *out_face)
 
occtl_status_t occtl_topo_make_face_from_wires_auto (occtl_graph_t *graph, const occtl_topo_make_face_from_wires_auto_options_t *options, occtl_node_id_t *out_face)
 
occtl_status_t occtl_topo_make_shell (occtl_graph_t *graph, const occtl_topo_make_shell_info_t *info, occtl_node_id_t *out_shell)
 
occtl_status_t occtl_topo_make_solid (occtl_graph_t *graph, const occtl_topo_make_solid_info_t *info, occtl_node_id_t *out_solid)
 
occtl_status_t occtl_topo_make_compound (occtl_graph_t *graph, const occtl_topo_make_compound_info_t *info, occtl_node_id_t *out_compound)
 
void occtl_topo_make_compsolid_info_init (occtl_topo_make_compsolid_info_t *info)
 
occtl_status_t occtl_topo_make_compsolid (occtl_graph_t *graph, const occtl_topo_make_compsolid_info_t *info, occtl_node_id_t *out_compsolid)
 
occtl_status_t occtl_topo_remove (occtl_graph_t *graph, occtl_node_id_t id)
 
occtl_status_t occtl_topo_remove_subgraph (occtl_graph_t *graph, occtl_node_id_t id)
 
occtl_status_t occtl_graph_begin_batch (occtl_graph_t *graph, occtl_batch_t **out_batch)
 
occtl_status_t occtl_batch_commit (occtl_batch_t *batch)
 
occtl_status_t occtl_batch_abort (occtl_batch_t *batch)
 
occtl_status_t occtl_topo_replace_edge_curve (occtl_graph_t *graph, occtl_node_id_t edge, occtl_rep_id_t curve_id)
 
occtl_status_t occtl_topo_replace_face_surface (occtl_graph_t *graph, occtl_node_id_t face, occtl_rep_id_t surface_id)
 
occtl_status_t occtl_topo_replace_coedge_pcurve (occtl_graph_t *graph, occtl_node_id_t coedge, occtl_rep_id_t pcurve_id)
 
occtl_status_t occtl_topo_add_pcurve (occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_id_t face, occtl_rep_id_t pcurve_id, double first, double last, occtl_orientation_t orientation)
 
occtl_status_t occtl_topo_shell_add_face (occtl_graph_t *graph, occtl_node_id_t shell, occtl_node_id_t face, occtl_orientation_t orientation)
 
occtl_status_t occtl_topo_shell_remove_face (occtl_graph_t *graph, occtl_node_id_t shell, occtl_node_id_t face)
 
occtl_status_t occtl_topo_face_add_holes (occtl_graph_t *graph, occtl_node_id_t face, const occtl_node_id_t *holes, size_t hole_count)
 
occtl_status_t occtl_topo_face_remove_holes (occtl_graph_t *graph, occtl_node_id_t face, const occtl_node_id_t *holes, size_t hole_count)
 
occtl_status_t occtl_topo_solid_add_shell (occtl_graph_t *graph, occtl_node_id_t solid, occtl_node_id_t shell, occtl_orientation_t orientation)
 
occtl_status_t occtl_topo_solid_remove_shell (occtl_graph_t *graph, occtl_node_id_t solid, occtl_node_id_t shell)
 
occtl_status_t occtl_topo_compound_add_child (occtl_graph_t *graph, occtl_node_id_t compound, occtl_node_id_t child, occtl_orientation_t orientation)
 
occtl_status_t occtl_topo_compound_remove_child (occtl_graph_t *graph, occtl_node_id_t compound, occtl_node_id_t child)
 
occtl_status_t occtl_topo_edge_split (occtl_graph_t *graph, occtl_node_id_t edge, double parameter, occtl_node_id_t *out_edge1, occtl_node_id_t *out_edge2)
 
occtl_status_t occtl_topo_edge_add_internal_vertex (occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_id_t vertex)
 
occtl_status_t occtl_topo_edge_remove_vertex (occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_id_t vertex)
 
occtl_status_t occtl_topo_edge_continuity (const occtl_graph_t *const graph, occtl_node_id_t edge, occtl_node_id_t faceA, occtl_node_id_t faceB, occtl_shape_continuity_t *const out_continuity)
 
occtl_status_t occtl_topo_edge_has_continuity (const occtl_graph_t *const graph, occtl_node_id_t edge, occtl_node_id_t faceA, occtl_node_id_t faceB, int32_t *const out_has_continuity)
 
occtl_status_t occtl_topo_edge_max_continuity (const occtl_graph_t *const graph, occtl_node_id_t edge, occtl_shape_continuity_t *const out_continuity)
 
occtl_status_t occtl_topo_coedge_orientation (const occtl_graph_t *const graph, occtl_node_id_t coedge, occtl_orientation_t *const out_orientation)
 
occtl_status_t occtl_topo_edge_find_coedge_on_face (const occtl_graph_t *const graph, occtl_node_id_t edge, occtl_node_id_t face, occtl_node_id_t *const out_coedge)
 
occtl_status_t occtl_topo_edge_find_coedge_on_face_oriented (const occtl_graph_t *const graph, occtl_node_id_t edge, occtl_node_id_t face, occtl_orientation_t orientation, occtl_node_id_t *const out_coedge)
 
occtl_status_t occtl_topo_vertex_point_in_usage (const occtl_graph_t *const graph, occtl_node_id_t vertex, occtl_node_id_t parent, occtl_point3_t *const out_point)
 
occtl_status_t occtl_topo_vertex_pcurve_parameter (const occtl_graph_t *const graph, occtl_node_id_t vertex, occtl_node_id_t coedge, double *const out_u)
 
occtl_status_t occtl_topo_edge_has_polygon3d (const occtl_graph_t *const graph, occtl_node_id_t edge, int32_t *const out_has_polygon3d)
 
occtl_status_t occtl_topo_coedge_has_polygon_on_surface (const occtl_graph_t *const graph, occtl_node_id_t coedge, int32_t *const out_has_polygon_on_surface)
 
occtl_status_t occtl_topo_face_uv_bounds_restricted (const occtl_graph_t *const graph, occtl_node_id_t face, double umin, double umax, double vmin, double vmax, double u, double v, occtl_point3_t *const out_point, occtl_vector3_t *const out_d1u, occtl_vector3_t *const out_d1v)
 
occtl_status_t occtl_topo_set_vertex_point (occtl_graph_t *graph, occtl_node_id_t vertex, occtl_point3_t point)
 
occtl_status_t occtl_topo_set_vertex_tolerance (occtl_graph_t *graph, occtl_node_id_t vertex, double tol)
 
occtl_status_t occtl_topo_set_edge_tolerance (occtl_graph_t *graph, occtl_node_id_t edge, double tol)
 
occtl_status_t occtl_topo_set_face_tolerance (occtl_graph_t *graph, occtl_node_id_t face, double tol)
 
occtl_status_t occtl_topo_set_edge_param_range (occtl_graph_t *graph, occtl_node_id_t edge, double first, double last)
 
occtl_status_t occtl_topo_set_edge_same_parameter (occtl_graph_t *graph, occtl_node_id_t edge, int32_t flag)
 
occtl_status_t occtl_topo_set_edge_same_range (occtl_graph_t *graph, occtl_node_id_t edge, int32_t flag)
 
occtl_status_t occtl_topo_set_edge_is_degenerate (occtl_graph_t *graph, occtl_node_id_t edge, int32_t flag)
 
occtl_status_t occtl_topo_set_edge_is_closed (occtl_graph_t *graph, occtl_node_id_t edge, int32_t flag)
 
occtl_status_t occtl_topo_set_wire_is_closed (occtl_graph_t *graph, occtl_node_id_t wire, int32_t flag)
 
occtl_status_t occtl_topo_set_shell_is_closed (occtl_graph_t *graph, occtl_node_id_t shell, int32_t flag)
 
occtl_status_t occtl_topo_set_face_natural_restriction (occtl_graph_t *graph, occtl_node_id_t face, int32_t flag)
 
occtl_status_t occtl_topo_set_coedge_param_range (occtl_graph_t *graph, occtl_node_id_t coedge, double first, double last)
 
occtl_status_t occtl_topo_set_coedge_uv_box (occtl_graph_t *graph, occtl_node_id_t coedge, occtl_point2_t uv_lo, occtl_point2_t uv_hi)
 
occtl_status_t occtl_graph_clear_cached (occtl_graph_t *graph, occtl_node_id_t node, occtl_ref_id_t ref)
 
void occtl_select_options_init (occtl_select_options_t *options)
 
void occtl_select_group_options_init (occtl_select_group_options_t *options)
 
void occtl_select_group_view_init (occtl_select_group_view_t *view)
 
occtl_status_t occtl_graph_bbox_get (occtl_graph_t *graph, occtl_node_id_t node, occtl_select_bbox_t *out_bbox)
 
occtl_status_t occtl_graph_obb_get (occtl_graph_t *graph, occtl_node_id_t node, occtl_graph_obb_t *out_obb)
 
occtl_status_t occtl_graph_face_uv_bounds_get (occtl_graph_t *graph, occtl_node_id_t face, occtl_graph_uv_bounds_t *out_uv_bounds)
 
occtl_status_t occtl_graph_measure_get (occtl_graph_t *graph, occtl_node_id_t node, occtl_select_measure_kind_t kind, double *out_value)
 
occtl_status_t occtl_graph_mass_properties_get (occtl_graph_t *graph, occtl_node_id_t node, occtl_graph_mass_properties_t *out_properties)
 
occtl_status_t occtl_graph_edge_curve_kind_get (occtl_graph_t *graph, occtl_node_id_t edge, occtl_curve_kind_t *out_kind)
 
occtl_status_t occtl_graph_face_surface_kind_get (occtl_graph_t *graph, occtl_node_id_t face, occtl_surface_kind_t *out_kind)
 
occtl_status_t occtl_graph_descendant_vertices_get (occtl_graph_t *graph, occtl_node_id_t node, occtl_node_id_t *out_buf, size_t cap, size_t *out_count)
 
occtl_status_t occtl_graph_descendant_edges_get (occtl_graph_t *graph, occtl_node_id_t node, occtl_node_id_t *out_buf, size_t cap, size_t *out_count)
 
occtl_status_t occtl_graph_descendant_faces_get (occtl_graph_t *graph, occtl_node_id_t node, occtl_node_id_t *out_buf, size_t cap, size_t *out_count)
 
occtl_status_t occtl_graph_descendants_get (occtl_graph_t *graph, occtl_node_id_t node, occtl_node_kind_t descendant_kind, occtl_node_id_t *out_buf, size_t cap, size_t *out_count)
 
occtl_status_t occtl_graph_adjacent_faces_get (occtl_graph_t *graph, occtl_node_id_t face, occtl_node_id_t *out_buf, size_t cap, size_t *out_count)
 
occtl_status_t occtl_graph_adjacent_edges_get (occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_id_t *out_buf, size_t cap, size_t *out_count)
 
occtl_status_t occtl_graph_pair_distance_get (occtl_graph_t *graph, occtl_node_id_t first, occtl_node_id_t second, double *out_distance)
 
occtl_status_t occtl_select_iter_create (occtl_graph_t *graph, const occtl_select_options_t *options, occtl_select_iter_t **out_iter)
 
occtl_status_t occtl_select_tagged_iter_create (occtl_graph_t *graph, const occtl_select_options_t *options, const char *tag, size_t tagLen, occtl_select_iter_t **out_iter)
 
occtl_status_t occtl_select_iter_next (occtl_select_iter_t *iter, occtl_node_id_t *out_node)
 
void occtl_select_iter_free (occtl_select_iter_t *iter)
 
occtl_status_t occtl_select_group_iter_create (occtl_graph_t *graph, const occtl_select_options_t *select_options, const occtl_select_group_options_t *group_options, occtl_select_group_iter_t **out_iter)
 
occtl_status_t occtl_select_group_iter_next (occtl_select_group_iter_t *iter, occtl_select_group_view_t *out_view)
 
void occtl_select_group_iter_free (occtl_select_group_iter_t *iter)
 
occtl_status_t occtl_graph_clone (const occtl_graph_t *source, occtl_graph_t **out_graph)
 
occtl_status_t occtl_graph_compact (occtl_graph_t *graph)
 
occtl_status_t occtl_topo_remove_with_replacement (occtl_graph_t *graph, occtl_node_id_t node, occtl_node_id_t replacement)
 
occtl_status_t occtl_topo_remove_ref (occtl_graph_t *graph, occtl_ref_id_t ref_id)
 
occtl_status_t occtl_topo_remove_rep (occtl_graph_t *graph, occtl_rep_id_t rep_id)
 
occtl_status_t occtl_topo_cleanup_removed_refs (occtl_graph_t *graph)
 
occtl_status_t occtl_topo_set_edge_start_vertex (occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_id_t vertex)
 
occtl_status_t occtl_topo_set_edge_end_vertex (occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_id_t vertex)
 
occtl_status_t occtl_topo_set_ref_orientation (occtl_graph_t *graph, occtl_ref_id_t ref_id, occtl_orientation_t orientation)
 
occtl_status_t occtl_topo_set_ref_location (occtl_graph_t *graph, occtl_ref_id_t ref_id, occtl_transform_t transform)
 
occtl_status_t occtl_topo_set_wire_ref_is_outer (occtl_graph_t *graph, occtl_ref_id_t ref_id, int32_t flag)
 

Detailed Description

OCCT-Light: Topology builders, mutations, and property setters.

Covers low-level element construction (make_vertex, make_edge, make_wire, make_face, make_shell, make_solid, make_compound, make_compsolid), wire/edge operations (edges_to_wires, wire_offset_2d, curves_to_wire, wire_fix_degenerate, face_chamfer_2d, wire_chamfer_2d), in-place mutations (remove, replace, add/remove from parent, edge_split), and property setters.

Macro Definition Documentation

◆ OCCTL_JOINT_INFO_INIT

#define OCCTL_JOINT_INFO_INIT
Value:
{OCCTL_JOINT_INFO_VERSION_1, \
NULL, \
OCCTL_JOINT_ID_INVALID, \
{{1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0}}, \
{{1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0}}, \
0, \
0.0, \
0, \
0.0, \
#define OCCTL_UID_INVALID
Definition occtl_core.h:286
@ OCCTL_JOINT_RIGID
Definition occtl_topo_build.h:2146
#define OCCTL_NODE_ID_INVALID
Definition occtl_topo_types.h:138

◆ OCCTL_MATERIAL_INFO_INIT

#define OCCTL_MATERIAL_INFO_INIT
Value:
{OCCTL_MATERIAL_INFO_VERSION_1, \
NULL, \
NULL, \
0, \
0, \
0.0, \
0, \
{1.0f, 1.0f, 1.0f, 1.0f}, \

◆ OCCTL_SELECT_GROUP_OPTIONS_INIT

#define OCCTL_SELECT_GROUP_OPTIONS_INIT
Value:
{OCCTL_SELECT_GROUP_OPTIONS_VERSION_1, \
NULL, \
1.0e-7, \
0.0f, \
0}
@ OCCTL_SELECT_AXIS_Z
Definition occtl_topo_build.h:2342
@ OCCTL_SELECT_GROUP_KIND
Definition occtl_topo_build.h:2417

◆ OCCTL_SELECT_GROUP_VIEW_INIT

#define OCCTL_SELECT_GROUP_VIEW_INIT
Value:
{OCCTL_SELECT_GROUP_VIEW_VERSION_1, \
NULL, \
0.0, \
NULL, \
0, \
0, \
{0.0f, 0.0f, 0.0f, 0.0f}, \
NULL, \
0}
@ OCCTL_KIND_INVALID
Definition occtl_core.h:189
@ OCCTL_CURVE_KIND_UNDEFINED
Definition occtl_curves_common.h:55
@ OCCTL_SURFACE_KIND_UNDEFINED
Definition occtl_surfaces.h:65

◆ OCCTL_TOPO_MAKE_EDGE_INFO_INIT

#define OCCTL_TOPO_MAKE_EDGE_INFO_INIT
Value:
{OCCTL_TOPO_MAKE_EDGE_INFO_VERSION_1, \
NULL, \
OCCTL_REP_ID_INVALID, \
0.0, \
0.0, \
0.0}

◆ OCCTL_TOPO_MAKE_FACE_FROM_WIRES_AUTO_OPTIONS_INIT

#define OCCTL_TOPO_MAKE_FACE_FROM_WIRES_AUTO_OPTIONS_INIT
Value:
{OCCTL_TOPO_MAKE_FACE_FROM_WIRES_AUTO_OPTIONS_VERSION_1, \
NULL, \
OCCTL_REP_ID_INVALID, \
NULL, \
0, \
0.0, \
1.0e-9}

◆ OCCTL_TOPO_MAKE_FACE_INFO_INIT

#define OCCTL_TOPO_MAKE_FACE_INFO_INIT
Value:
{OCCTL_TOPO_MAKE_FACE_INFO_VERSION_1, \
NULL, \
OCCTL_REP_ID_INVALID, \
NULL, \
0, \
0.0}

◆ OCCTL_TOPO_WIRE_OFFSET_2D_OPTIONS_INIT

#define OCCTL_TOPO_WIRE_OFFSET_2D_OPTIONS_INIT
Value:
{OCCTL_TOPO_WIRE_OFFSET_2D_OPTIONS_VERSION_1, \
NULL, \
1.0, \
0, \
0}
@ OCCTL_TOPO_WIRE_OFFSET_2D_JOIN_ARC
Definition occtl_topo_build.h:194

Typedef Documentation

◆ occtl_batch_t

typedef struct occtl_batch occtl_batch_t

Opaque handle for a batched graph mutation scope.

Created by occtl_graph_begin_batch. Mutations performed on graph while a batch is open are deferred; occtl_batch_commit applies them all at once. occtl_batch_abort discards uncommitted changes.

Outside a batch, every mutation is its own implicit scope.

See also
occtl_graph_begin_batch, occtl_batch_commit, occtl_batch_abort

◆ occtl_color_rgba_t

RGBA colour value for use with graph annotation functions.

Each channel is in the range [0.0f, 1.0f]. The alpha channel follows the OpenGL convention: 1.0f is opaque, 0.0f is fully transparent.

This is a plain-data struct; no struct_version is needed.

◆ occtl_graph_mass_properties_t

Combined OCCT mass-property value computed for a graph node.

linear_length is the total curve length of edges in the shape, surface_area is the total face area, and volume is the signed solid volume. mass uses unit density and follows the highest non-zero dimensional property: volume, then area, then length. The inertia matrix is row-major, about centre_of_mass, in the global XYZ frame.

◆ occtl_graph_obb_t

Oriented box value computed for a graph node.

The three direction vectors form the local box axes. Half sizes are non-negative distances from center along the matching axis.

◆ occtl_graph_uv_bounds_t

Face UV bounds value computed for a graph node.

◆ occtl_joint_info_t

Assembly joint record stored in graph-owned metadata.

The endpoint nodes may be products, occurrences, or topology nodes. Frames are local joint frames on the respective endpoints. Limits are optional and are interpreted in radians for rotational joints and graph length units for translational joints.

◆ occtl_joint_kind_t

Assembly joint kind.

These values describe the intended relative motion between two graph nodes. The library stores the declaration as graph metadata; constraint solving is layered separately.

◆ occtl_material_info_t

Material-lite record for graph material layers.

name is a borrowed UTF-8 byte span when setting material data. For occtl_graph_material_get, name points at the caller-provided output buffer when a buffer was supplied, otherwise it is NULL and name_len is the stored byte length. A zero name_len is allowed.

◆ occtl_metadata_key_view_t

Borrowed view of a metadata key stored on a graph node.

Pointer lifetime is tied to the owning graph metadata. The view is invalidated by metadata mutation on the graph, graph mutation that remaps/removes the target node, graph clone/free, or graph compaction.

◆ occtl_offset_join_type_t

Edge-join style for 3D offset, thicken, and hollow operations.

Shared by occtl_prim_make_offset_shape, occtl_prim_make_thick_solid, and #occtl_topo_offset_features.

◆ occtl_select_axis_position_t

Axis-position predicate for occtl_select_options_t.

Position is measured from each candidate bounding-box centre along occtl_select_options_t::axis. MIN / MAX select candidates on the lowest / highest centre plane. CENTER selects candidates on the mid-plane between the lowest and highest candidate centres.

◆ occtl_select_axis_t

Principal axis used by selector position filters.

◆ occtl_select_bbox_mode_t

◆ occtl_select_bbox_t

Axis-aligned box used by selector filters.

◆ occtl_select_distance_to_node_sort_t

Distance-to-node sort extension for occtl_select_options_t.

Chain one instance through occtl_select_options_t::p_next when occtl_select_options_t::sort_key is OCCTL_SELECT_SORT_DISTANCE_TO_NODE. The selector computes OCCT minimum distances from each candidate node to target.

To combine this with a metadata filter, set this struct as the first occtl_select_options_t::p_next entry and chain occtl_select_metadata_filter_t from this struct's p_next.

◆ occtl_select_group_iter_t

typedef struct occtl_select_group_iter occtl_select_group_iter_t

Opaque iterator over grouped selector results.

Created by occtl_select_group_iter_create and released with occtl_select_group_iter_free.

\par Thread Safety No — single-owner; concurrent reads on distinct iterators are safe when the owning graph is not mutated.

◆ occtl_select_group_key_t

Grouping key for selector results.

◆ occtl_select_group_options_t

◆ occtl_select_group_view_t

Immutable view of one selected-node group.

Pointer fields borrow from the owning occtl_select_group_iter_t and remain valid until the iterator is advanced or freed.

◆ occtl_select_iter_t

typedef struct occtl_select_iter occtl_select_iter_t

Opaque iterator over selected graph nodes.

Created by occtl_select_iter_create and released with occtl_select_iter_free.

\par Thread Safety No — single-owner; concurrent reads on distinct iterators are safe when the owning graph is not mutated.

◆ occtl_select_measure_kind_t

OCCT mass-property predicate for occtl_select_options_t.

◆ occtl_select_metadata_filter_t

Metadata predicate extension for occtl_select_options_t.

Chain one instance through occtl_select_options_t::p_next. Set key_len to a non-zero value to match key presence. Also set match_value to 1 to require an exact value match.

◆ occtl_select_normal_mode_t

◆ occtl_select_options_t

Selection options for occtl_select_iter_create.

kind_mask uses (1ull << OCCTL_KIND_*) bits. A zero mask means all node kinds. When root is invalid, selection scans the whole graph; otherwise it walks descendants from root. Set include_root to 1 to test root itself before its descendants.

Metadata filters are supplied through occtl_select_metadata_filter_t chained from p_next.

◆ occtl_select_sort_direction_t

Sort direction for selected-node output.

◆ occtl_select_sort_key_t

Sort key for selected-node output.

◆ occtl_tag_view_t

Borrowed view of a tag stored on a graph node.

Pointer lifetime is tied to the owning graph metadata. The view is invalidated by tag mutation on the graph, graph mutation that remaps/removes the target node, graph clone/free, or graph compaction.

◆ occtl_topo_edges_to_wires_options_t

Options for occtl_topo_edges_to_wires.

edges is a borrowed span of Edge node IDs. The graph copies only the resulting Wire topology; the input span need not remain valid after the call returns.

◆ occtl_topo_face_chamfer_2d_options_t

Options for occtl_topo_face_chamfer_2d.

vertices is a borrowed optional span of Vertex node IDs. When vertices is NULL and vertex_count is 0, OCCT attempts to chamfer every vertex of face. The result is inserted into the same graph as a new Face node; the source face is not modified.

◆ occtl_topo_make_compound_info_t

◆ occtl_topo_make_compsolid_info_t

◆ occtl_topo_make_edge_info_t

Info for occtl_topo_make_edge.

curve is a rep ID referencing a 3D curve node in the graph. Use OCCTL_REP_ID_INVALID for a degenerate edge (no 3D curve).

◆ occtl_topo_make_face_from_wires_auto_options_t

Options for occtl_topo_make_face_from_wires_auto.

surface is a rep ID referencing a surface node in the graph. Must be valid (not OCCTL_REP_ID_INVALID). wires is a borrowed span of Wire node IDs.

◆ occtl_topo_make_face_info_t

Info for occtl_topo_make_face.

surface is a rep ID referencing a surface node in the graph. Must be valid (not OCCTL_REP_ID_INVALID). inner_wires is a borrowed span of wire NodeIds; NULL when inner_wire_count is 0.

◆ occtl_topo_make_shell_info_t

◆ occtl_topo_make_solid_info_t

◆ occtl_topo_make_vertex_info_t

◆ occtl_topo_make_wire_info_t

Info for occtl_topo_make_wire.

edges is a borrowed span of (edge, orientation) pairs; the graph copies during construction. NULL is valid only when edge_count is 0.

◆ occtl_topo_wire_chamfer_2d_options_t

Options for occtl_topo_wire_chamfer_2d.

The source Wire must be planar. The resulting outer Wire is inserted into the same graph as a new Wire node; the source wire is not modified.

◆ occtl_topo_wire_fix_degenerate_edges_options_t

Options for occtl_topo_wire_fix_degenerate.

The operation detaches coedge usages whose underlying Edge has OCCT length less than or equal to min_length. The Edge and Vertex definitions remain in the graph for other users.

◆ occtl_topo_wire_offset_2d_join_t

Join style for planar wire offsets.

◆ occtl_topo_wire_offset_2d_options_t

Options for occtl_topo_wire_offset_2d.

distance is signed; its side follows OCCT's planar-wire offset convention for the wire orientation. The result is inserted into the same graph as a new topology root.

Enumeration Type Documentation

◆ occtl_joint_kind

Assembly joint kind.

These values describe the intended relative motion between two graph nodes. The library stores the declaration as graph metadata; constraint solving is layered separately.

Enumerator
OCCTL_JOINT_RIGID 

Fixed relative transform.

OCCTL_JOINT_REVOLUTE 

One rotational degree of freedom.

OCCTL_JOINT_LINEAR 

One translational degree of freedom.

OCCTL_JOINT_CYLINDRICAL 

Coaxial rotation plus translation.

OCCTL_JOINT_BALL 

Spherical orientation freedom.

◆ occtl_offset_join_type

Edge-join style for 3D offset, thicken, and hollow operations.

Shared by occtl_prim_make_offset_shape, occtl_prim_make_thick_solid, and #occtl_topo_offset_features.

Enumerator
OCCTL_OFFSET_JOIN_ARC 

Insert rolling arcs across sharp edges.

OCCTL_OFFSET_JOIN_TANGENT 

Insert tangent-continuous patches.

OCCTL_OFFSET_JOIN_INTERSECTION 

Extend adjacent faces until they intersect.

◆ occtl_select_axis

Principal axis used by selector position filters.

Enumerator
OCCTL_SELECT_AXIS_X 

X coordinate.

OCCTL_SELECT_AXIS_Y 

Y coordinate.

OCCTL_SELECT_AXIS_Z 

Z coordinate.

◆ occtl_select_axis_position

Axis-position predicate for occtl_select_options_t.

Position is measured from each candidate bounding-box centre along occtl_select_options_t::axis. MIN / MAX select candidates on the lowest / highest centre plane. CENTER selects candidates on the mid-plane between the lowest and highest candidate centres.

Enumerator
OCCTL_SELECT_AXIS_POSITION_MIN 

Lowest candidate centre coordinate.

OCCTL_SELECT_AXIS_POSITION_MAX 

Highest candidate centre coordinate.

OCCTL_SELECT_AXIS_POSITION_CENTER 

Mid-plane between lowest and highest centres.

◆ occtl_select_bbox_mode

Bounding-box predicate for occtl_select_options_t.

Enumerator
OCCTL_SELECT_BBOX_INTERSECTS 

Candidate box intersects bbox.

OCCTL_SELECT_BBOX_INSIDE 

Candidate box is fully inside bbox.

OCCTL_SELECT_BBOX_CONTAINS_CENTER 

Candidate box centre is inside bbox.

◆ occtl_select_group_key

Grouping key for selector results.

Enumerator
OCCTL_SELECT_GROUP_KIND 

Group by occtl_node_kind_t.

OCCTL_SELECT_GROUP_AXIS_COORDINATE 

Group by approximate bbox-centre coordinate.

OCCTL_SELECT_GROUP_CURVE_KIND 

Group Edge nodes by occtl_curve_kind_t.

OCCTL_SELECT_GROUP_SURFACE_KIND 

Group Face nodes by occtl_surface_kind_t.

OCCTL_SELECT_GROUP_NAME 

Group by metadata-backed name.

OCCTL_SELECT_GROUP_COLOR 

Group by metadata-backed colour.

◆ occtl_select_measure_kind

OCCT mass-property predicate for occtl_select_options_t.

Enumerator
OCCTL_SELECT_MEASURE_EDGE_LENGTH 

Linear mass of Edge nodes.

OCCTL_SELECT_MEASURE_WIRE_LENGTH 

Linear mass of Wire nodes.

OCCTL_SELECT_MEASURE_FACE_AREA 

Surface mass of Face nodes.

OCCTL_SELECT_MEASURE_SURFACE_AREA 

Surface mass of any candidate node shape.

OCCTL_SELECT_MEASURE_VOLUME 

Volume mass of any candidate node shape.

◆ occtl_select_normal_mode

Face-normal predicate for occtl_select_options_t.

Enumerator
OCCTL_SELECT_NORMAL_PARALLEL 

Normal points with normal.

OCCTL_SELECT_NORMAL_ANTIPARALLEL 

Normal points opposite normal.

OCCTL_SELECT_NORMAL_EITHER 

Normal is parallel or antiparallel.

◆ occtl_select_sort_direction

Sort direction for selected-node output.

Enumerator
OCCTL_SELECT_SORT_ASCENDING 

Smallest key first.

OCCTL_SELECT_SORT_DESCENDING 

Largest key first.

◆ occtl_select_sort_key

Sort key for selected-node output.

Enumerator
OCCTL_SELECT_SORT_NONE 

Preserve traversal order.

OCCTL_SELECT_SORT_AXIS_COORDINATE 

Sort by computed bbox-centre coordinate.

OCCTL_SELECT_SORT_MEASURE 

Sort by OCCT mass property.

OCCTL_SELECT_SORT_DISTANCE_TO_POINT 

Sort by computed bbox-centre distance to sort_point.

OCCTL_SELECT_SORT_NAME 

Sort by metadata-backed name.

OCCTL_SELECT_SORT_UID 

Sort by persistent UID bits.

OCCTL_SELECT_SORT_DISTANCE_TO_NODE 

Sort by computed OCCT distance to a target node.

◆ occtl_topo_wire_offset_2d_join

Join style for planar wire offsets.

Enumerator
OCCTL_TOPO_WIRE_OFFSET_2D_JOIN_ARC 

Insert circular arcs at sharp corners.

OCCTL_TOPO_WIRE_OFFSET_2D_JOIN_TANGENT 

Use tangent-continuous joins.

OCCTL_TOPO_WIRE_OFFSET_2D_JOIN_INTERSECTION 

Extend adjacent edges until they intersect.

Function Documentation

◆ occtl_batch_abort()

occtl_status_t occtl_batch_abort ( occtl_batch_t batch)

Aborts the batch, discarding all deferred mutations.

After this call batch is freed and must not be reused. NULL-tolerant (no-op).

Parameters
[in]batchOwning pointer. May be NULL.
Return values
OCCTL_OKOn success.

\par Thread Safety No (mutates graph).

See also
occtl_graph_begin_batch, occtl_batch_commit

◆ occtl_batch_commit()

occtl_status_t occtl_batch_commit ( occtl_batch_t batch)

Commits all deferred mutations in the batch to the graph.

After this call batch is freed and must not be reused. NULL-tolerant (no-op).

Parameters
[in]batchOwning pointer. May be NULL.
Return values
OCCTL_OKOn success.

\par Thread Safety No (mutates graph).

See also
occtl_graph_begin_batch, occtl_batch_abort

◆ occtl_graph_adjacent_edges_get()

occtl_status_t occtl_graph_adjacent_edges_get ( occtl_graph_t graph,
occtl_node_id_t  edge,
occtl_node_id_t out_buf,
size_t  cap,
size_t *  out_count 
)

Returns computed adjacent Edge nodes for one Edge node.

The list is computed through BRepGraph shared-Vertex incidence from current graph state. Duplicate Edge definitions are collapsed and edge itself is not returned. This is a reusable graph-owned adjacency primitive for connected-edge walks, wire grouping, selector-style relation predicates, and future sketch cleanup helpers.

Two-call buffer (§10.1): pass out_buf as NULL with cap = 0 to learn the required count in out_count, then reissue with a buffer of at least that many occtl_node_id_t entries.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]edgeEdge node ID to query. Must be valid and active.
[out]out_bufBorrows it. May be NULL on the sizing call.
[in]capCapacity of out_buf in entries.
[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 or removed.
OCCTL_WRONG_KINDedge is not an Edge node.
OCCTL_BUFFER_TOO_SMALLout_buf is non-NULL and cap is too small.

\par Thread Safety No (may update OCCT internal caches).

See also
occtl_topo_connected_edges

◆ occtl_graph_adjacent_faces_get()

occtl_status_t occtl_graph_adjacent_faces_get ( occtl_graph_t graph,
occtl_node_id_t  face,
occtl_node_id_t out_buf,
size_t  cap,
size_t *  out_count 
)

Returns computed adjacent Face nodes for one Face node.

The list is computed through BRepGraph face-adjacency relations from current graph state. Duplicate Face definitions are collapsed. This is a reusable graph-owned adjacency primitive for connected-face walks, selector-style relation predicates, and future reverse-engineering patch traversal.

Two-call buffer (§10.1): pass out_buf as NULL with cap = 0 to learn the required count in out_count, then reissue with a buffer of at least that many occtl_node_id_t entries.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]faceFace node ID to query. Must be valid and active.
[out]out_bufBorrows it. May be NULL on the sizing call.
[in]capCapacity of out_buf in entries.
[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 or removed.
OCCTL_WRONG_KINDface is not a Face node.
OCCTL_BUFFER_TOO_SMALLout_buf is non-NULL and cap is too small.

\par Thread Safety No (may update OCCT internal caches).

See also
occtl_topo_connected_faces

◆ occtl_graph_bbox_get()

occtl_status_t occtl_graph_bbox_get ( occtl_graph_t graph,
occtl_node_id_t  node,
occtl_select_bbox_t out_bbox 
)

Returns a computed axis-aligned bounding box for a node.

The value is computed from current graph state. OCCT may use internal transient caches, but OCCT-Light exposes only the computed POD result.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]nodeNode ID to query. Must be valid and active.
[out]out_bboxBorrows it. Must be non-NULL. Receives the box.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_bbox is NULL.
OCCTL_NOT_FOUNDnode is invalid or removed.
OCCTL_GEOMETRY_INVALIDOCCT could not compute a finite box.

\par Thread Safety No (may update OCCT internal caches).

See also
occtl_graph_obb_get, occtl_graph_measure_get

◆ occtl_graph_begin_batch()

occtl_status_t occtl_graph_begin_batch ( occtl_graph_t graph,
occtl_batch_t **  out_batch 
)

Opens a batched mutation scope on graph.

Subsequent mutations on graph are deferred until occtl_batch_commit is called on the returned handle. Release with occtl_batch_commit (apply) or occtl_batch_abort (discard).

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[out]out_batchOwns it. Must be non-NULL. The caller is responsible for calling commit or abort.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_batch is NULL.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph batch state).

See also
occtl_batch_commit, occtl_batch_abort

◆ occtl_graph_clear_cached()

occtl_status_t occtl_graph_clear_cached ( occtl_graph_t graph,
occtl_node_id_t  node,
occtl_ref_id_t  ref 
)

Clears graph-owned computed data related to one node or one reference.

Exactly one of node or ref must be valid. The implementation removes graph-owned computed data attached to the selected target; callers must treat cached calculation results as an optimization only.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]nodeNode ID to clear, or OCCTL_NODE_ID_INVALID.
[in]refRef ID to clear, or OCCTL_REF_ID_INVALID.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL, or both/neither IDs are valid.
OCCTL_NOT_FOUNDThe selected node or reference is invalid or removed.

\par Thread Safety No (mutates internal computed-data state).

See also
occtl_graph_bbox_get, occtl_graph_pair_distance_get

◆ occtl_graph_clone()

occtl_status_t occtl_graph_clone ( const occtl_graph_t source,
occtl_graph_t **  out_graph 
)

Deep-clones a topology graph.

Copies all active nodes, references, representations, and registered layers. Geometry handles are deep-copied so the new graph is fully independent. The caller owns the returned graph and must release it with occtl_graph_free.

Parameters
[in]sourceBorrows it. Must be non-NULL.
[out]out_graphOwns it. Must be non-NULL. On success receives a valid handle; on failure set to NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTsource or out_graph is NULL.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (reads source, but source must not be concurrently mutated).

See also
occtl_graph_create, occtl_graph_free

◆ occtl_graph_compact()

occtl_status_t occtl_graph_compact ( occtl_graph_t graph)

Compacts the graph by reclaiming slots from removed nodes.

After compaction all occtl_node_id_t and occtl_ref_id_t values are invalidated (they are session-local indices that may be renumbered). Persistent occtl_uid_t values survive compaction and can be resolved back to new NodeIds via occtl_graph_node_id_from_uid.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
Note
After this call, all previously obtained NodeId and RefId values are invalid. Resolve UIDs to obtain fresh NodeId values.

\par Thread Safety No (mutates graph).

See also
occtl_graph_node_id_from_uid

◆ occtl_graph_descendant_edges_get()

occtl_status_t occtl_graph_descendant_edges_get ( occtl_graph_t graph,
occtl_node_id_t  node,
occtl_node_id_t out_buf,
size_t  cap,
size_t *  out_count 
)

Returns computed descendant Edge nodes for a graph root.

The list is computed through BRepGraph child traversal from current graph state. Duplicate Edge definitions are collapsed. If node is itself an Edge, the returned list contains that Edge.

Two-call buffer (§10.1): pass out_buf as NULL with cap = 0 to learn the required count in out_count, then reissue with a buffer of at least that many occtl_node_id_t entries.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]nodeRoot node ID to query. Must be valid and active.
[out]out_bufBorrows it. May be NULL on the sizing call.
[in]capCapacity of out_buf in entries.
[out]out_countBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_NOT_FOUNDnode is invalid or removed.
OCCTL_BUFFER_TOO_SMALLout_buf is non-NULL and cap is too small.

\par Thread Safety No (may update OCCT internal caches).

See also
occtl_topo_connected_edges

◆ occtl_graph_descendant_faces_get()

occtl_status_t occtl_graph_descendant_faces_get ( occtl_graph_t graph,
occtl_node_id_t  node,
occtl_node_id_t out_buf,
size_t  cap,
size_t *  out_count 
)

Returns computed descendant Face nodes for a graph root.

The list is computed through BRepGraph child traversal from current graph state. Duplicate Face definitions are collapsed. If node is itself a Face, the returned list contains that Face.

Two-call buffer (§10.1): pass out_buf as NULL with cap = 0 to learn the required count in out_count, then reissue with a buffer of at least that many occtl_node_id_t entries.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]nodeRoot node ID to query. Must be valid and active.
[out]out_bufBorrows it. May be NULL on the sizing call.
[in]capCapacity of out_buf in entries.
[out]out_countBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_NOT_FOUNDnode is invalid or removed.
OCCTL_BUFFER_TOO_SMALLout_buf is non-NULL and cap is too small.

\par Thread Safety No (may update OCCT internal caches).

See also
occtl_topo_connected_faces

◆ occtl_graph_descendant_vertices_get()

occtl_status_t occtl_graph_descendant_vertices_get ( occtl_graph_t graph,
occtl_node_id_t  node,
occtl_node_id_t out_buf,
size_t  cap,
size_t *  out_count 
)

Returns computed descendant Vertex nodes for a graph root.

The list is computed through BRepGraph child traversal from current graph state. Duplicate Vertex definitions are collapsed. If node is itself a Vertex, the returned list contains that Vertex.

Two-call buffer (§10.1): pass out_buf as NULL with cap = 0 to learn the required count in out_count, then reissue with a buffer of at least that many occtl_node_id_t entries.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]nodeRoot node ID to query. Must be valid and active.
[out]out_bufBorrows it. May be NULL on the sizing call.
[in]capCapacity of out_buf in entries.
[out]out_countBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_NOT_FOUNDnode is invalid or removed.
OCCTL_BUFFER_TOO_SMALLout_buf is non-NULL and cap is too small.

\par Thread Safety No (may update OCCT internal caches).

See also
occtl_topo_common_vertices

◆ occtl_graph_descendants_get()

occtl_status_t occtl_graph_descendants_get ( occtl_graph_t graph,
occtl_node_id_t  node,
occtl_node_kind_t  descendant_kind,
occtl_node_id_t out_buf,
size_t  cap,
size_t *  out_count 
)

Returns computed descendant nodes of one requested kind for a graph root.

The list is computed through BRepGraph child traversal from current graph state and keyed by descendant_kind. Duplicate definitions are collapsed. If node itself has descendant_kind, the returned list includes node.

This is the broad descendant query surface for root-scoped scans. Use the narrower Vertex / Edge / Face functions only when a binding wants a more explicitly named convenience wrapper.

Two-call buffer (§10.1): pass out_buf as NULL with cap = 0 to learn the required count in out_count, then reissue with a buffer of at least that many occtl_node_id_t entries.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]nodeRoot node ID to query. Must be valid and active.
[in]descendant_kindRequested node kind. Must not be OCCTL_KIND_INVALID.
[out]out_bufBorrows it. May be NULL on the sizing call.
[in]capCapacity of out_buf in entries.
[out]out_countBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL, or descendant_kind is invalid.
OCCTL_NOT_FOUNDnode is invalid or removed.
OCCTL_BUFFER_TOO_SMALLout_buf is non-NULL and cap is too small.

\par Thread Safety No (may update OCCT internal caches).

See also
occtl_graph_descendant_vertices_get

◆ occtl_graph_edge_curve_kind_get()

occtl_status_t occtl_graph_edge_curve_kind_get ( occtl_graph_t graph,
occtl_node_id_t  edge,
occtl_curve_kind_t out_kind 
)

Returns a computed curve-kind classification for an Edge node.

The classification delegates to OCCT edge adaptors. Callers receive a POD enum copy.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]edgeEdge node ID to classify. Must be valid and active.
[out]out_kindBorrows it. Must be non-NULL. Receives the curve kind.
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 node.
OCCTL_GEOMETRY_INVALIDOCCT could not classify the edge geometry.

\par Thread Safety No (may update OCCT internal caches).

See also
occtl_topo_edge_curve_kind

◆ occtl_graph_face_surface_kind_get()

occtl_status_t occtl_graph_face_surface_kind_get ( occtl_graph_t graph,
occtl_node_id_t  face,
occtl_surface_kind_t out_kind 
)

Returns a computed surface-kind classification for a Face node.

The classification delegates to OCCT surface adaptors. Callers receive a POD enum copy.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]faceFace node ID to classify. Must be valid and active.
[out]out_kindBorrows it. Must be non-NULL. Receives the surface kind.
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 node.
OCCTL_GEOMETRY_INVALIDOCCT could not classify the face geometry.

\par Thread Safety No (may update OCCT internal caches).

See also
occtl_topo_face_surface_kind

◆ occtl_graph_face_uv_bounds_get()

occtl_status_t occtl_graph_face_uv_bounds_get ( occtl_graph_t graph,
occtl_node_id_t  face,
occtl_graph_uv_bounds_t out_uv_bounds 
)

Returns computed UV parameter bounds for a Face node.

The value is computed through BRepGraph UV-bounds algorithms from current graph state. OCCT may use internal transient caches; callers receive a POD copy.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]faceFace node ID to query. Must be valid and active.
[out]out_uv_boundsBorrows it. Must be non-NULL. Receives bounds.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_uv_bounds is NULL.
OCCTL_NOT_FOUNDface is invalid or removed.
OCCTL_WRONG_KINDface is not a Face node.
OCCTL_GEOMETRY_INVALIDOCCT could not compute valid UV bounds.

\par Thread Safety No (may update OCCT internal caches).

See also
occtl_topo_face_uv_bounds

◆ occtl_graph_mass_properties_get()

occtl_status_t occtl_graph_mass_properties_get ( occtl_graph_t graph,
occtl_node_id_t  node,
occtl_graph_mass_properties_t out_properties 
)

Returns computed combined OCCT mass properties for a node.

The value is computed through OCCT mass-property algorithms from current graph state. Callers receive a POD copy.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]nodeNode ID to query. Must be valid and active.
[out]out_propertiesBorrows it. Must be non-NULL. Receives the mass-property summary.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_properties is NULL.
OCCTL_NOT_FOUNDnode is invalid or removed.
OCCTL_GEOMETRY_INVALIDOCCT could not compute finite properties.

\par Thread Safety No (may update OCCT internal caches).

See also
occtl_graph_measure_get

◆ occtl_graph_measure_get()

occtl_status_t occtl_graph_measure_get ( occtl_graph_t graph,
occtl_node_id_t  node,
occtl_select_measure_kind_t  kind,
double *  out_value 
)

Returns a computed OCCT mass-property scalar for a node.

The value is computed through OCCT mass-property algorithms from current graph state.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]nodeNode ID to query. Must be valid and active.
[in]kindMeasure scalar to compute.
[out]out_valueBorrows it. Must be non-NULL. Receives the value.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_value is NULL, or kind is unsupported.
OCCTL_NOT_FOUNDnode is invalid or removed.
OCCTL_WRONG_KINDkind is not applicable to node.
OCCTL_GEOMETRY_INVALIDOCCT could not compute the requested value.

\par Thread Safety No (may update OCCT internal caches).

See also
occtl_graph_bbox_get

◆ occtl_graph_obb_get()

occtl_status_t occtl_graph_obb_get ( occtl_graph_t graph,
occtl_node_id_t  node,
occtl_graph_obb_t out_obb 
)

Returns a computed oriented bounding box for a node.

The value is computed through OCCT from current graph state. Callers receive a POD copy.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]nodeNode ID to query. Must be valid and active.
[out]out_obbBorrows it. Must be non-NULL. Receives the box.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_obb is NULL.
OCCTL_NOT_FOUNDnode is invalid or removed.
OCCTL_GEOMETRY_INVALIDOCCT could not compute an oriented box.

\par Thread Safety No (may update OCCT internal caches).

See also
occtl_graph_bbox_get

◆ occtl_graph_pair_distance_get()

occtl_status_t occtl_graph_pair_distance_get ( occtl_graph_t graph,
occtl_node_id_t  first,
occtl_node_id_t  second,
double *  out_distance 
)

Returns a computed OCCT minimum distance between two graph nodes.

The value is computed through OCCT from current graph state. Callers receive a POD scalar copy.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]firstFirst node ID. Must be valid and active.
[in]secondSecond node ID. Must be valid and active.
[out]out_distanceBorrows it. Must be non-NULL. Receives the minimum distance.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_distance is NULL.
OCCTL_NOT_FOUNDfirst or second is invalid or removed.
OCCTL_GEOMETRY_INVALIDOCCT could not compute a finite distance.

\par Thread Safety No (may update OCCT internal caches).

See also
occtl_topo_distance_pair

◆ occtl_select_group_iter_create()

occtl_status_t occtl_select_group_iter_create ( occtl_graph_t graph,
const occtl_select_options_t select_options,
const occtl_select_group_options_t group_options,
occtl_select_group_iter_t **  out_iter 
)

Creates an iterator over grouped selector results.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]select_optionsBorrows it. May be NULL for defaults.
[in]group_optionsBorrows it. May be NULL for defaults.
[out]out_iterOwns it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL, or an option value is invalid.
OCCTL_NOT_FOUNDselect_options->root is invalid or removed.
OCCTL_VERSION_MISMATCHAn options struct version is unsupported.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (may update OCCT internal caches).

See also
occtl_select_group_iter_next, occtl_select_group_iter_free

◆ occtl_select_group_iter_free()

void occtl_select_group_iter_free ( occtl_select_group_iter_t iter)

Releases a grouped-selection iterator.

Parameters
[in]iterOwns it. May be NULL.

\par Thread Safety Yes.

See also
occtl_select_group_iter_create

◆ occtl_select_group_iter_next()

occtl_status_t occtl_select_group_iter_next ( occtl_select_group_iter_t iter,
occtl_select_group_view_t out_view 
)

Advances a grouped-selection iterator.

Parameters
[in,out]iterBorrows it. Must be non-NULL.
[out]out_viewBorrows it. Must be non-NULL.
Return values
OCCTL_OKNext group view written.
OCCTL_NOT_FOUNDIterator exhausted.
OCCTL_INVALID_ARGUMENTiter or out_view is NULL.

\par Thread Safety No (mutates iterator).

See also
occtl_select_group_iter_create, occtl_select_group_iter_free

◆ occtl_select_group_options_init()

void occtl_select_group_options_init ( occtl_select_group_options_t options)

Initialises options to OCCTL_SELECT_GROUP_OPTIONS_INIT.

Parameters
[out]optionsBorrows it. May be NULL.

\par Thread Safety Yes.

See also
occtl_select_group_iter_create

◆ occtl_select_group_view_init()

void occtl_select_group_view_init ( occtl_select_group_view_t view)

Initialises view to OCCTL_SELECT_GROUP_VIEW_INIT.

Parameters
[out]viewBorrows it. May be NULL.

\par Thread Safety Yes.

See also
occtl_select_group_iter_next

◆ occtl_select_iter_create()

occtl_status_t occtl_select_iter_create ( occtl_graph_t graph,
const occtl_select_options_t options,
occtl_select_iter_t **  out_iter 
)

Creates an iterator over nodes matching options.

The selector computes derived data such as node bounding boxes; pass a mutable graph handle because OCCT algorithms may update internal graph state.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. May be NULL for defaults.
[out]out_iterOwns it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL, or an optional pointer field is inconsistent.
OCCTL_NOT_FOUNDoptions->root is invalid or removed.
OCCTL_VERSION_MISMATCHoptions->struct_version unsupported.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (may update OCCT internal caches).

See also
occtl_select_iter_next, occtl_select_iter_free

◆ occtl_select_iter_free()

void occtl_select_iter_free ( occtl_select_iter_t iter)

Releases a selection iterator.

Parameters
[in]iterOwns it. May be NULL.

\par Thread Safety Yes.

See also
occtl_select_iter_next

◆ occtl_select_iter_next()

occtl_status_t occtl_select_iter_next ( occtl_select_iter_t iter,
occtl_node_id_t out_node 
)

Advances a selection iterator.

Parameters
[in,out]iterBorrows it. Must be non-NULL.
[out]out_nodeBorrows it. Must be non-NULL.
Return values
OCCTL_OKNext selected node written.
OCCTL_NOT_FOUNDIterator exhausted; out_node is invalid.
OCCTL_INVALID_ARGUMENTiter or out_node is NULL.

\par Thread Safety No (mutates iterator).

See also
occtl_select_iter_create, occtl_select_iter_free

◆ occtl_select_options_init()

void occtl_select_options_init ( occtl_select_options_t options)

Initialises options to OCCTL_SELECT_OPTIONS_INIT.

Parameters
[out]optionsBorrows it. May be NULL.

\par Thread Safety Yes.

See also
occtl_select_iter_create

◆ occtl_select_tagged_iter_create()

occtl_status_t occtl_select_tagged_iter_create ( occtl_graph_t graph,
const occtl_select_options_t options,
const char *  tag,
size_t  tagLen,
occtl_select_iter_t **  out_iter 
)

Creates an iterator over tagged nodes matching options.

This is equivalent to occtl_select_iter_create followed by an exact graph tag predicate, but filtering is performed during selector traversal. The selector may populate BRepGraph transient caches for expensive derived data such as node bounding boxes; pass a mutable graph handle.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. May be NULL for defaults.
[in]tagTag bytes. Borrowed; must be non-NULL and non-empty.
[in]tagLenLength of tag in bytes.
[out]out_iterOwns it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_iter is NULL, tag is NULL/empty, or an optional pointer field is inconsistent.
OCCTL_NOT_FOUNDoptions->root is invalid or removed.
OCCTL_VERSION_MISMATCHoptions->struct_version unsupported.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (may update OCCT internal caches).

See also
occtl_graph_tag_add, occtl_select_iter_next, occtl_select_iter_free

◆ occtl_topo_add_pcurve()

occtl_status_t occtl_topo_add_pcurve ( occtl_graph_t graph,
occtl_node_id_t  edge,
occtl_node_id_t  face,
occtl_rep_id_t  pcurve_id,
double  first,
double  last,
occtl_orientation_t  orientation 
)

Adds a PCurve binding between an edge and a face.

Creates a new CoEdge entity with a Curve2DRep for the given edge-face pair. This is the canonical repair operation when an edge lacks a pcurve on a face it bounds.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]edgeEdge node ID. Must be a valid, active edge.
[in]faceFace node ID. Must be a valid, active face.
[in]pcurve_idRep ID of the 2D parametric curve node. Must be valid (not OCCTL_REP_ID_INVALID).
[in]firstFirst parameter on the PCurve.
[in]lastLast parameter on the PCurve.
[in]orientationEdge orientation on the face.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL or pcurve_id is invalid.
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 No (mutates graph).

See also
occtl_topo_replace_coedge_pcurve

◆ occtl_topo_cleanup_removed_refs()

occtl_status_t occtl_topo_cleanup_removed_refs ( occtl_graph_t graph)

Cleans up stale references after removal operations.

Forces the graph to finalise deferred invalidation and validate internal consistency. Idempotent — calling multiple times is safe and has no additional side effects.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.

\par Thread Safety No (mutates graph).

◆ occtl_topo_coedge_has_polygon_on_surface()

occtl_status_t occtl_topo_coedge_has_polygon_on_surface ( const occtl_graph_t *const  graph,
occtl_node_id_t  coedge,
int32_t *const  out_has_polygon_on_surface 
)

Returns whether a coedge has a polygon-on-surface discretization.

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

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

See also
occtl_topo_edge_has_polygon3d

◆ occtl_topo_coedge_orientation()

occtl_status_t occtl_topo_coedge_orientation ( const occtl_graph_t *const  graph,
occtl_node_id_t  coedge,
occtl_orientation_t *const  out_orientation 
)

Returns the full orientation (FORWARD/REVERSED/INTERNAL/EXTERNAL) of a coedge.

Unlike occtl_topo_coedge_is_reversed, which only tests the REVERSED flag, this returns the complete TopAbs_Orientation.

Parameters
[in]graphMust be non-NULL.
[in]coedgeCoEdge node ID.
[out]out_orientationBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_orientation 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_is_reversed

◆ occtl_topo_compound_add_child()

occtl_status_t occtl_topo_compound_add_child ( occtl_graph_t graph,
occtl_node_id_t  compound,
occtl_node_id_t  child,
occtl_orientation_t  orientation 
)

Adds a child entity to an existing compound.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]compoundCompound node ID. Must be a valid, active compound.
[in]childChild node ID of any topology kind.
[in]orientationOrientation of the child in the compound.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDcompound or child is invalid or removed.
OCCTL_WRONG_KINDcompound is not a compound.
OCCTL_ERRORthe operation was rejected.

\par Thread Safety No (mutates graph).

See also
occtl_topo_compound_remove_child, occtl_topo_make_compound

◆ occtl_topo_compound_remove_child()

occtl_status_t occtl_topo_compound_remove_child ( occtl_graph_t graph,
occtl_node_id_t  compound,
occtl_node_id_t  child 
)

Removes a child from a compound without deleting the child definition.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]compoundCompound node ID. Must be a valid, active compound.
[in]childChild node ID. Must be the definition ID of a child referenced by the compound.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDcompound or child is invalid, removed, has wrong kind, or the child is not in the compound.
OCCTL_WRONG_KINDcompound is not a compound.

\par Thread Safety No (mutates graph).

See also
occtl_topo_compound_add_child

◆ occtl_topo_curves_to_wire()

occtl_status_t occtl_topo_curves_to_wire ( occtl_graph_t graph,
const occtl_rep_id_t curve_ids,
size_t  count,
occtl_node_id_t out_wire 
)

Creates a wire from an ordered array of curve rep IDs.

For each curve the function evaluates the start and end point, creates vertices (sharing vertices between consecutive curves whose endpoints match within tolerance), creates a single-edge wire per curve, then joins all edges into one wire.

A single closed curve (e.g. a circle) produces one vertex used as both start and end of a single edge.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]curve_idsBorrows it. Array of count curve rep IDs. Must be non-NULL when count > 0.
[in]countNumber of curves. Must be >= 1.
[out]out_wireOwns it. Receives the wire node ID. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny required pointer is NULL, count == 0, or a curve rep ID in the array is invalid.
OCCTL_NOT_FOUNDA curve evaluation failed.
OCCTL_GEOMETRY_INVALIDCould not create geometry.

\par Thread Safety No (mutates graph).

See also
occtl_topo_edges_to_wires, occtl_topo_make_edge, occtl_curve_eval_d0

◆ occtl_topo_edge_add_internal_vertex()

occtl_status_t occtl_topo_edge_add_internal_vertex ( occtl_graph_t graph,
occtl_node_id_t  edge,
occtl_node_id_t  vertex 
)

Adds an internal vertex to an edge.

The vertex is recorded on the edge with INTERNAL orientation. This does not split the edge; for splitting see occtl_topo_edge_split.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]edgeEdge node ID. Must be a valid, active edge.
[in]vertexVertex node ID. Must be a valid, active vertex.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDedge or vertex is invalid or removed.
OCCTL_WRONG_KINDedge is not an edge or vertex is not a vertex.
OCCTL_ERRORthe operation was rejected.

\par Thread Safety No (mutates graph).

See also
occtl_topo_edge_remove_vertex, occtl_topo_edge_split

◆ occtl_topo_edge_continuity()

occtl_status_t occtl_topo_edge_continuity ( const occtl_graph_t *const  graph,
occtl_node_id_t  edge,
occtl_node_id_t  faceA,
occtl_node_id_t  faceB,
occtl_shape_continuity_t *const  out_continuity 
)

Returns the geometric continuity between two faces at their shared edge.

The continuity describes how smoothly the surfaces of faceA and faceB meet along edge.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID shared by both faces.
[in]faceAFirst face node ID.
[in]faceBSecond face node ID.
[out]out_continuityBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_continuity is NULL.
OCCTL_NOT_FOUNDedge, faceA, or faceB is invalid or removed.
OCCTL_WRONG_KINDA NodeId has the wrong kind.

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

See also
occtl_topo_edge_has_continuity, occtl_topo_edge_max_continuity

◆ occtl_topo_edge_find_coedge_on_face()

occtl_status_t occtl_topo_edge_find_coedge_on_face ( const occtl_graph_t *const  graph,
occtl_node_id_t  edge,
occtl_node_id_t  face,
occtl_node_id_t *const  out_coedge 
)

Finds the coedge belonging to the given (edge, face) pair.

O(1) lookup through the edge's coedge reverse-index. Returns OCCTL_NOT_FOUND when edge is not incident to face.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[in]faceFace node ID.
[out]out_coedgeBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_coedge is NULL.
OCCTL_NOT_FOUNDedge or face is invalid/removed, or no coedge binds this edge-face pair.
OCCTL_WRONG_KINDedge is not an edge or face is not a face.

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

See also
occtl_topo_edge_find_coedge_on_face_oriented

◆ occtl_topo_edge_find_coedge_on_face_oriented()

occtl_status_t occtl_topo_edge_find_coedge_on_face_oriented ( const occtl_graph_t *const  graph,
occtl_node_id_t  edge,
occtl_node_id_t  face,
occtl_orientation_t  orientation,
occtl_node_id_t *const  out_coedge 
)

Finds the coedge for an (edge, face, orientation) triple.

On seam edges two coedges share the same face with opposite orientations; this overload disambiguates by the requested orientation.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[in]faceFace node ID.
[in]orientationOrientation filter (by value).
[out]out_coedgeBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_coedge is NULL.
OCCTL_NOT_FOUNDedge or face is invalid/removed, or no coedge matches the triple.
OCCTL_WRONG_KINDedge is not an edge or face is not a face.

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

See also
occtl_topo_edge_find_coedge_on_face

◆ occtl_topo_edge_has_continuity()

occtl_status_t occtl_topo_edge_has_continuity ( const occtl_graph_t *const  graph,
occtl_node_id_t  edge,
occtl_node_id_t  faceA,
occtl_node_id_t  faceB,
int32_t *const  out_has_continuity 
)

Returns whether continuity information is recorded between two faces at a shared edge.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID shared by both faces.
[in]faceAFirst face node ID.
[in]faceBSecond face node ID.
[out]out_has_continuityBorrows it. Set to 1 if continuity is recorded, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_has_continuity is NULL.
OCCTL_NOT_FOUNDedge, faceA, or faceB is invalid or removed.
OCCTL_WRONG_KINDA NodeId has the wrong kind.

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

See also
occtl_topo_edge_continuity, occtl_topo_edge_max_continuity

◆ occtl_topo_edge_has_polygon3d()

occtl_status_t occtl_topo_edge_has_polygon3d ( const occtl_graph_t *const  graph,
occtl_node_id_t  edge,
int32_t *const  out_has_polygon3d 
)

Returns whether an edge has a 3D polygon discretization.

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

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

See also
occtl_topo_coedge_has_polygon_on_surface

◆ occtl_topo_edge_max_continuity()

occtl_status_t occtl_topo_edge_max_continuity ( const occtl_graph_t *const  graph,
occtl_node_id_t  edge,
occtl_shape_continuity_t *const  out_continuity 
)

Returns the maximum continuity across all incident faces at an edge.

This is the highest continuity value across every face pair that shares edge.

Parameters
[in]graphMust be non-NULL.
[in]edgeEdge node ID.
[out]out_continuityBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_continuity 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_continuity, occtl_topo_edge_has_continuity

◆ occtl_topo_edge_remove_vertex()

occtl_status_t occtl_topo_edge_remove_vertex ( occtl_graph_t graph,
occtl_node_id_t  edge,
occtl_node_id_t  vertex 
)

Removes a vertex from an edge.

Supports both boundary vertices (start/end) and internal vertices. The vertex definition is not deleted.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]edgeEdge node ID. Must be a valid, active edge.
[in]vertexVertex node ID. Must be the definition ID of a vertex referenced by the edge.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDedge or vertex is invalid, removed, has wrong kind, or the vertex is not on the edge.
OCCTL_WRONG_KINDedge is not an edge.

\par Thread Safety No (mutates graph).

See also
occtl_topo_edge_add_internal_vertex

◆ occtl_topo_edge_split()

occtl_status_t occtl_topo_edge_split ( occtl_graph_t graph,
occtl_node_id_t  edge,
double  parameter,
occtl_node_id_t out_edge1,
occtl_node_id_t out_edge2 
)

Splits an edge at the given parameter on its 3D curve.

Creates a new vertex at the split point and produces two sub-edges. The original edge is soft-removed; all wires containing it are updated to reference the two new edges.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]edgeEdge node ID. Must be a valid, active edge with a 3D curve.
[in]parameterParameter on the edge's 3D curve at which to split.
[out]out_edge1Borrows it. Receives the first sub-edge NodeId (start → split).
[out]out_edge2Borrows it. Receives the second sub-edge NodeId (split → end).
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or an out-param is NULL.
OCCTL_NOT_FOUNDedge is invalid, removed, not an edge, or the edge has no 3D curve.
OCCTL_WRONG_KINDedge is not an edge.
OCCTL_ERRORthe operation was rejected.

\par Thread Safety No (mutates graph).

See also
occtl_topo_edge_add_internal_vertex, occtl_topo_make_edge

◆ occtl_topo_edges_to_wires()

occtl_status_t occtl_topo_edges_to_wires ( occtl_graph_t graph,
const occtl_topo_edges_to_wires_options_t options,
occtl_node_id_t out_wires,
size_t  cap,
size_t *  out_count 
)

Connects unordered Edge nodes into one or more Wire nodes.

On a sizing call, pass out_wires as NULL with cap = 0; the function writes the number of wires that would be created into out_count without mutating graph. Reissue with a buffer of at least that many occtl_node_id_t entries to create the wires and receive their IDs.

Endpoint matching prefers shared BRepGraph vertex IDs and falls back to endpoint point distance when options->tolerance > 0. Created wires reference the original Edge nodes; no Edge or Vertex nodes are duplicated.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL.
[out]out_wiresBorrows it. May be NULL on the sizing call.
[in]capCapacity of out_wires in entries.
[out]out_countBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, options, or out_count is NULL; an options field is malformed; or open wires are produced while options->allow_open is 0.
OCCTL_VERSION_MISMATCHoptions->struct_version unsupported.
OCCTL_NOT_FOUNDAn Edge node ID is invalid or removed.
OCCTL_WRONG_KINDAn input node is not an Edge.
OCCTL_BUFFER_TOO_SMALLout_wires is non-NULL and cap is too small.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph when out_wires is non-NULL and large enough).

See also
occtl_topo_make_wire, occtl_topo_wire_order_edges

◆ occtl_topo_edges_to_wires_options_init()

void occtl_topo_edges_to_wires_options_init ( occtl_topo_edges_to_wires_options_t options)

Initialises options to default values via OCCTL_TOPO_EDGES_TO_WIRES_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_edges_to_wires

◆ occtl_topo_face_add_holes()

occtl_status_t occtl_topo_face_add_holes ( occtl_graph_t graph,
occtl_node_id_t  face,
const occtl_node_id_t holes,
size_t  hole_count 
)

Adds inner wire references to a face without duplicating wire definitions.

Each entry in holes must name an active Wire definition. The function attaches each wire as a non-outer wire reference owned by face. Wires already referenced by face are rejected to avoid duplicate hole usages.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]faceFace node ID. Must be a valid, active face.
[in]holesBorrowed span of Wire node IDs to add as holes. Must be non-NULL.
[in]hole_countNumber of entries in holes. Must be greater than zero.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or holes is NULL; hole_count is zero; a hole ID appears more than once; or a wire is already referenced by face.
OCCTL_NOT_FOUNDface or a requested hole is invalid or removed.
OCCTL_WRONG_KINDface is not a face, or a requested hole node is not a wire.
OCCTL_ERRORThe graph editor rejected the wire usage.

\par Thread Safety No (mutates graph).

See also
occtl_topo_face_remove_holes, occtl_topo_make_face_from_wires_auto

◆ occtl_topo_face_chamfer_2d()

occtl_status_t occtl_topo_face_chamfer_2d ( occtl_graph_t graph,
const occtl_topo_face_chamfer_2d_options_t options,
occtl_node_id_t out_face 
)

Chamfers corners of a planar Face and inserts the result into the graph.

The source face must be planar. The chamfered Face is inserted into graph as a new Face node. The source face is not modified.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL.
[out]out_faceBorrows it. Must be non-NULL. Receives the new Face node ID.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, options, or out_face is NULL; an options field is malformed; or a distance is non-positive / non-finite.
OCCTL_VERSION_MISMATCHoptions->struct_version unsupported.
OCCTL_NOT_FOUNDoptions->face is invalid or removed; or a selected vertex is invalid / removed.
OCCTL_WRONG_KINDoptions->face is not a Face node, or a selected node is not a Vertex.
OCCTL_GEOMETRY_INVALIDOCCT could not create a valid chamfered face.
OCCTL_TOPOLOGY_INVALIDThe chamfer result could not be ingested as a graph Face.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

See also
occtl_topo_face_chamfer_2d_options_init, occtl_topo_wire_offset_2d

◆ occtl_topo_face_chamfer_2d_options_init()

void occtl_topo_face_chamfer_2d_options_init ( occtl_topo_face_chamfer_2d_options_t options)

Initialises options to default values via OCCTL_TOPO_FACE_CHAMFER_2D_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_face_chamfer_2d

◆ occtl_topo_face_remove_holes()

occtl_status_t occtl_topo_face_remove_holes ( occtl_graph_t graph,
occtl_node_id_t  face,
const occtl_node_id_t holes,
size_t  hole_count 
)

Removes inner wire references from a face without deleting wire definitions.

When holes is NULL and hole_count is 0, all non-outer wire references are removed from face. Otherwise, holes must name inner Wire definition IDs referenced by face; each matching wire reference is detached. The outer wire is never removed by this function.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]faceFace node ID. Must be a valid, active face.
[in]holesBorrowed span of inner Wire node IDs, or NULL to remove all inner wires.
[in]hole_countNumber of entries in holes.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL; holes is NULL while hole_count > 0; or holes is non-NULL while hole_count == 0.
OCCTL_NOT_FOUNDface or a requested hole is invalid, removed, not referenced by face, or is the outer wire.
OCCTL_WRONG_KINDface is not a face, or a requested hole node is not a wire.

\par Thread Safety No (mutates graph).

See also
occtl_topo_make_face_from_wires_auto, occtl_topo_make_face

◆ occtl_topo_face_uv_bounds_restricted()

occtl_status_t occtl_topo_face_uv_bounds_restricted ( const occtl_graph_t *const  graph,
occtl_node_id_t  face,
double  umin,
double  umax,
double  vmin,
double  vmax,
double  u,
double  v,
occtl_point3_t *const  out_point,
occtl_vector3_t *const  out_d1u,
occtl_vector3_t *const  out_d1v 
)

Evaluates a face surface and its first partial derivatives inside a restricted UV box.

The surface is evaluated at (u, v). The adaptor is clamped to [umin, umax] x [vmin, vmax], which binds the evaluation range separately from the surface's natural bounds.

Parameters
[in]graphMust be non-NULL.
[in]faceFace node ID.
[in]uminLower U bound.
[in]umaxUpper U bound.
[in]vminLower V bound.
[in]vmaxUpper V bound.
[in]uU evaluation parameter.
[in]vV evaluation parameter.
[out]out_pointBorrows 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, removed, or not a face.

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

See also
occtl_topo_face_eval_d1, occtl_topo_face_uv_bounds

◆ occtl_topo_make_compound()

occtl_status_t occtl_topo_make_compound ( occtl_graph_t graph,
const occtl_topo_make_compound_info_t info,
occtl_node_id_t out_compound 
)

Creates a compound in the graph from a span of mixed-kind (child, orientation) pairs.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL. The children span is borrowed; it need not remain valid after the call returns.
[out]out_compoundBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, info, or out_compound is NULL; or children is NULL when child_count > 0; or children is non-NULL when child_count == 0.
OCCTL_VERSION_MISMATCHinfo->struct_version unsupported.
OCCTL_NOT_FOUNDA child NodeId is invalid or removed.
OCCTL_WRONG_KINDA child NodeId does not have the expected kind.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

See also
occtl_topo_make_compound_info_init

◆ occtl_topo_make_compound_info_init()

void occtl_topo_make_compound_info_init ( occtl_topo_make_compound_info_t info)

Initialises info to default values via OCCTL_TOPO_MAKE_COMPOUND_INFO_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_make_compound

◆ occtl_topo_make_compsolid()

occtl_status_t occtl_topo_make_compsolid ( occtl_graph_t graph,
const occtl_topo_make_compsolid_info_t info,
occtl_node_id_t out_compsolid 
)

Creates a compsolid in the graph from a span of (solid, orientation) pairs.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL. The solids span is borrowed; it need not remain valid after the call returns.
[out]out_compsolidBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, info, or out_compsolid is NULL; or solids is NULL when solid_count > 0; or solids is non-NULL when solid_count == 0.
OCCTL_VERSION_MISMATCHinfo->struct_version unsupported.
OCCTL_NOT_FOUNDA child NodeId is invalid or removed.
OCCTL_WRONG_KINDA child NodeId does not have the expected kind.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

See also
occtl_topo_make_compsolid_info_init

◆ occtl_topo_make_compsolid_info_init()

void occtl_topo_make_compsolid_info_init ( occtl_topo_make_compsolid_info_t info)

Initialises info to default values via OCCTL_TOPO_MAKE_COMPSOLID_INFO_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_make_compsolid

◆ occtl_topo_make_edge()

occtl_status_t occtl_topo_make_edge ( occtl_graph_t graph,
const occtl_topo_make_edge_info_t info,
occtl_node_id_t out_edge 
)

Creates an edge in the graph.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL. start_vertex and end_vertex must be valid, active vertex NodeIds. curve may be NULL for a degenerate edge.
[out]out_edgeBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, info, or out_edge is NULL.
OCCTL_VERSION_MISMATCHinfo->struct_version unsupported.
OCCTL_NOT_FOUNDA vertex NodeId is invalid or removed.
OCCTL_WRONG_KINDA vertex NodeId is not a vertex.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

◆ occtl_topo_make_edge_info_init()

void occtl_topo_make_edge_info_init ( occtl_topo_make_edge_info_t info)

Initialises info to default values via OCCTL_TOPO_MAKE_EDGE_INFO_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_make_edge

◆ occtl_topo_make_face()

occtl_status_t occtl_topo_make_face ( occtl_graph_t graph,
const occtl_topo_make_face_info_t info,
occtl_node_id_t out_face 
)

Creates a face in the graph from a surface, outer wire, and optional inner wires.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL. surface must be non-NULL. The inner-wires span is borrowed; it need not remain valid after the call returns.
[out]out_faceBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, info, out_face, or info->surface is NULL.
OCCTL_VERSION_MISMATCHinfo->struct_version unsupported.
OCCTL_NOT_FOUNDA wire NodeId is invalid or removed.
OCCTL_WRONG_KINDA wire NodeId is not a wire.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

◆ occtl_topo_make_face_from_wires_auto()

occtl_status_t occtl_topo_make_face_from_wires_auto ( occtl_graph_t graph,
const occtl_topo_make_face_from_wires_auto_options_t options,
occtl_node_id_t out_face 
)

Creates a face by classifying candidate wires into outer and inner loops.

The function classifies the candidate Wires by planar enclosed area and uses the largest unambiguous loop as the outer wire. All other input wires become inner wires in their input order. The stored graph Face references the original Wire nodes; no boundary topology is duplicated.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL.
[out]out_faceBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, options, out_face, options->surface, or options->wires is NULL; wire_count is 0; an option value is malformed; or the outer wire is ambiguous.
OCCTL_VERSION_MISMATCHoptions->struct_version unsupported.
OCCTL_NOT_FOUNDA Wire node ID is invalid or removed.
OCCTL_WRONG_KINDAn input node is not a Wire.
OCCTL_ERRORThe candidate wires could not be classified.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

See also
occtl_topo_make_face, occtl_topo_edges_to_wires

◆ occtl_topo_make_face_from_wires_auto_options_init()

void occtl_topo_make_face_from_wires_auto_options_init ( occtl_topo_make_face_from_wires_auto_options_t options)

Initialises options to default values via OCCTL_TOPO_MAKE_FACE_FROM_WIRES_AUTO_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_make_face_from_wires_auto

◆ occtl_topo_make_face_info_init()

void occtl_topo_make_face_info_init ( occtl_topo_make_face_info_t info)

Initialises info to default values via OCCTL_TOPO_MAKE_FACE_INFO_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_make_face

◆ occtl_topo_make_shell()

occtl_status_t occtl_topo_make_shell ( occtl_graph_t graph,
const occtl_topo_make_shell_info_t info,
occtl_node_id_t out_shell 
)

Creates a shell in the graph from a span of (face, orientation) pairs.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL. The faces span is borrowed; it need not remain valid after the call returns.
[out]out_shellBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, info, or out_shell is NULL; or faces is NULL when face_count > 0; or faces is non-NULL when face_count == 0.
OCCTL_VERSION_MISMATCHinfo->struct_version unsupported.
OCCTL_NOT_FOUNDA child NodeId is invalid or removed.
OCCTL_WRONG_KINDA child NodeId does not have the expected kind.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

See also
occtl_topo_make_shell_info_init

◆ occtl_topo_make_shell_info_init()

void occtl_topo_make_shell_info_init ( occtl_topo_make_shell_info_t info)

Initialises info to default values via OCCTL_TOPO_MAKE_SHELL_INFO_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_make_shell

◆ occtl_topo_make_solid()

occtl_status_t occtl_topo_make_solid ( occtl_graph_t graph,
const occtl_topo_make_solid_info_t info,
occtl_node_id_t out_solid 
)

Creates a solid in the graph from a span of (shell, orientation) pairs.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL. The shells span is borrowed; it need not remain valid after the call returns.
[out]out_solidBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, info, or out_solid is NULL; or shells is NULL when shell_count > 0; or shells is non-NULL when shell_count == 0.
OCCTL_VERSION_MISMATCHinfo->struct_version unsupported.
OCCTL_NOT_FOUNDA child NodeId is invalid or removed.
OCCTL_WRONG_KINDA child NodeId does not have the expected kind.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

See also
occtl_topo_make_solid_info_init

◆ occtl_topo_make_solid_info_init()

void occtl_topo_make_solid_info_init ( occtl_topo_make_solid_info_t info)

Initialises info to default values via OCCTL_TOPO_MAKE_SOLID_INFO_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_make_solid

◆ occtl_topo_make_vertex()

occtl_status_t occtl_topo_make_vertex ( occtl_graph_t graph,
const occtl_topo_make_vertex_info_t info,
occtl_node_id_t out_vertex 
)

Creates a vertex in the graph.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL.
[out]out_vertexBorrows it. Must be non-NULL. Receives the new vertex NodeId on success.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, info, or out_vertex is NULL.
OCCTL_VERSION_MISMATCHinfo->struct_version is unsupported.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

◆ occtl_topo_make_vertex_info_init()

void occtl_topo_make_vertex_info_init ( occtl_topo_make_vertex_info_t info)

Initialises info to default values via OCCTL_TOPO_MAKE_VERTEX_INFO_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_make_vertex

◆ occtl_topo_make_wire()

occtl_status_t occtl_topo_make_wire ( occtl_graph_t graph,
const occtl_topo_make_wire_info_t info,
occtl_node_id_t out_wire 
)

Creates a wire in the graph from an ordered span of (edge, orientation) pairs.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL. The edges span is borrowed; it need not remain valid after the call returns.
[out]out_wireBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, info, or out_wire is NULL; or edges is NULL when edge_count > 0; or edges is non-NULL when edge_count == 0.
OCCTL_VERSION_MISMATCHinfo->struct_version unsupported.
OCCTL_NOT_FOUNDA child NodeId is invalid or removed.
OCCTL_WRONG_KINDA child NodeId does not have the expected kind.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

◆ occtl_topo_make_wire_info_init()

void occtl_topo_make_wire_info_init ( occtl_topo_make_wire_info_t info)

Initialises info to default values via OCCTL_TOPO_MAKE_WIRE_INFO_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_make_wire

◆ occtl_topo_remove()

occtl_status_t occtl_topo_remove ( occtl_graph_t graph,
occtl_node_id_t  id 
)

Removes a node from the graph.

The node's children (direct references) are also removed. Removing a node that is referenced by other active nodes is valid: those references become dangling and will resolve to invalid on subsequent refinement.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]idNodeId of the entity to remove. All-zero value returns OCCTL_NOT_FOUND.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL, or first/last are non-finite, or last is less than first.
OCCTL_NOT_FOUNDid is invalid or already removed.

\par Thread Safety No (mutates graph).

See also
occtl_topo_remove_subgraph

◆ occtl_topo_remove_ref()

occtl_status_t occtl_topo_remove_ref ( occtl_graph_t graph,
occtl_ref_id_t  ref_id 
)

Removes a reference entry by its RefId.

This is the builder-level API for detaching a child usage from its parent without removing the referenced definition itself.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]ref_idReference entry to remove.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDref_id is invalid or already removed.

\par Thread Safety No (mutates graph).

See also
occtl_topo_remove_rep

◆ occtl_topo_remove_rep()

occtl_status_t occtl_topo_remove_rep ( occtl_graph_t graph,
occtl_rep_id_t  rep_id 
)

Removes a representation entry by its RepId.

Owning topology entities are marked modified so generation-based caches observe the representation as absent.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]rep_idRepresentation entry to remove.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDrep_id is invalid or already removed.

\par Thread Safety No (mutates graph).

See also
occtl_topo_remove_ref

◆ occtl_topo_remove_subgraph()

occtl_status_t occtl_topo_remove_subgraph ( occtl_graph_t graph,
occtl_node_id_t  id 
)

Recursively removes a node and its entire subgraph.

All descendants reachable through reference edges are removed.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]idNodeId of the root to remove.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDid is invalid or already removed.

\par Thread Safety No (mutates graph).

See also
occtl_topo_remove

◆ occtl_topo_remove_with_replacement()

occtl_status_t occtl_topo_remove_with_replacement ( occtl_graph_t graph,
occtl_node_id_t  node,
occtl_node_id_t  replacement 
)

Removes a node and reparents its children to a replacement node.

For edge nodes: all CoEdges referencing the removed edge are reparented to the replacement edge. Metadata observers are notified with both old and replacement NodeIds for data migration.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]nodeNodeId of the entity to remove.
[in]replacementNodeId of the replacement entity.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDnode or replacement is invalid or removed.

\par Thread Safety No (mutates graph).

See also
occtl_topo_remove

◆ occtl_topo_replace_coedge_pcurve()

occtl_status_t occtl_topo_replace_coedge_pcurve ( occtl_graph_t graph,
occtl_node_id_t  coedge,
occtl_rep_id_t  pcurve_id 
)

Replaces the PCurve of a coedge.

Pass pcurve_id == OCCTL_REP_ID_INVALID to clear the PCurve binding.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]coedgeCoEdge node ID. Must be a valid, active coedge.
[in]pcurve_idRep ID of the 2D curve node to bind, or OCCTL_REP_ID_INVALID to clear.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDcoedge is invalid, removed, or not a coedge.
OCCTL_WRONG_KINDcoedge is not a coedge.

\par Thread Safety No (mutates graph).

See also
occtl_topo_replace_edge_curve, occtl_topo_add_pcurve

◆ occtl_topo_replace_edge_curve()

occtl_status_t occtl_topo_replace_edge_curve ( occtl_graph_t graph,
occtl_node_id_t  edge,
occtl_rep_id_t  curve_id 
)

Replaces the 3D curve of an edge.

Replaces the underlying Curve3DRep geometry without rebuilding the edge topology. Callers can later query the new extent through occtl_topo_edge_range or evaluate via occtl_topo_edge_eval.

Passing curve_id == OCCTL_REP_ID_INVALID clears the curve binding, making the edge degenerate.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]edgeEdge node ID. Must be a valid, active edge.
[in]curve_idRep ID of the 3D curve node to bind, or OCCTL_REP_ID_INVALID to clear.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.
OCCTL_WRONG_KINDedge is not an edge.

\par Thread Safety No (mutates graph).

See also
occtl_topo_replace_face_surface, occtl_topo_replace_coedge_pcurve, occtl_topo_make_edge

◆ occtl_topo_replace_face_surface()

occtl_status_t occtl_topo_replace_face_surface ( occtl_graph_t graph,
occtl_node_id_t  face,
occtl_rep_id_t  surface_id 
)

Replaces the surface of a face.

Replaces the underlying SurfaceRep geometry without rebuilding the face topology. Passing surface_id == OCCTL_REP_ID_INVALID clears the surface binding.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]faceFace node ID. Must be a valid, active face.
[in]surface_idRep ID of the surface node to bind, or OCCTL_REP_ID_INVALID to clear.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDface is invalid, removed, or not a face.
OCCTL_WRONG_KINDface is not a face.

\par Thread Safety No (mutates graph).

See also
occtl_topo_replace_edge_curve, occtl_topo_replace_coedge_pcurve, occtl_topo_make_face

◆ occtl_topo_set_coedge_param_range()

occtl_status_t occtl_topo_set_coedge_param_range ( occtl_graph_t graph,
occtl_node_id_t  coedge,
double  first,
double  last 
)

Sets the parametric range of a coedge.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]coedgeCoEdge node ID.
[in]firstFirst parameter (lower bound).
[in]lastLast parameter (upper bound).
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL, or first/last are non-finite, or last is less than first.
OCCTL_NOT_FOUNDcoedge is invalid, removed, or not a coedge.

\par Thread Safety No (mutates graph).

See also
occtl_topo_set_edge_param_range, occtl_topo_set_coedge_uv_box

◆ occtl_topo_set_coedge_uv_box()

occtl_status_t occtl_topo_set_coedge_uv_box ( occtl_graph_t graph,
occtl_node_id_t  coedge,
occtl_point2_t  uv_lo,
occtl_point2_t  uv_hi 
)

Sets the UV box (start UV, end UV) of a coedge.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]coedgeCoEdge node ID.
[in]uv_loUV point at parameter first (by value).
[in]uv_hiUV point at parameter last (by value).
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDcoedge is invalid, removed, or not a coedge.

\par Thread Safety No (mutates graph).

See also
occtl_topo_set_coedge_param_range

◆ occtl_topo_set_edge_end_vertex()

occtl_status_t occtl_topo_set_edge_end_vertex ( occtl_graph_t graph,
occtl_node_id_t  edge,
occtl_node_id_t  vertex 
)

Rebinds an edge's end vertex to a different vertex definition.

Rebinds an edge's start vertex to a different vertex definition.

Rewires the existing start-vertex reference to point to vertex. The previous vertex definition is no longer referenced by this edge.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]edgeEdge node ID. Must be a valid, active edge.
[in]vertexVertex node ID. Must be a valid, active vertex.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDedge or vertex is invalid or removed.
OCCTL_WRONG_KINDedge is not an edge or vertex is not a vertex.

\par Thread Safety No (mutates graph).

See also
occtl_topo_set_edge_end_vertex
occtl_topo_set_edge_start_vertex

◆ occtl_topo_set_edge_is_closed()

occtl_status_t occtl_topo_set_edge_is_closed ( occtl_graph_t graph,
occtl_node_id_t  edge,
int32_t  flag 
)

Sets the is-closed flag on an edge (start vertex == end vertex).

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]edgeEdge node ID.
[in]flag1 to mark closed, 0 otherwise.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.

\par Thread Safety No (mutates graph).

See also
occtl_topo_set_edge_is_degenerate, occtl_topo_set_wire_is_closed

◆ occtl_topo_set_edge_is_degenerate()

occtl_status_t occtl_topo_set_edge_is_degenerate ( occtl_graph_t graph,
occtl_node_id_t  edge,
int32_t  flag 
)

Sets the is-degenerate flag on an edge.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]edgeEdge node ID.
[in]flag1 to mark degenerate, 0 otherwise.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.

\par Thread Safety No (mutates graph).

See also
occtl_topo_set_edge_is_closed, occtl_topo_edge_is_degenerated

◆ occtl_topo_set_edge_param_range()

occtl_status_t occtl_topo_set_edge_param_range ( occtl_graph_t graph,
occtl_node_id_t  edge,
double  first,
double  last 
)

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

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]edgeEdge node ID.
[in]firstFirst parameter (lower bound).
[in]lastLast parameter (upper bound).
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL, or first/last are non-finite, or last is less than first.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.

\par Thread Safety No (mutates graph).

See also
occtl_topo_set_edge_same_parameter, occtl_topo_set_coedge_param_range

◆ occtl_topo_set_edge_same_parameter()

occtl_status_t occtl_topo_set_edge_same_parameter ( occtl_graph_t graph,
occtl_node_id_t  edge,
int32_t  flag 
)

Sets the same-parameter flag on an edge.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]edgeEdge node ID.
[in]flag1 to set, 0 to clear.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL, or first/last are non-finite, or last is less than first.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.

\par Thread Safety No (mutates graph).

See also
occtl_topo_set_edge_same_range

◆ occtl_topo_set_edge_same_range()

occtl_status_t occtl_topo_set_edge_same_range ( occtl_graph_t graph,
occtl_node_id_t  edge,
int32_t  flag 
)

Sets the same-range flag on an edge.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]edgeEdge node ID.
[in]flag1 to set, 0 to clear.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.

\par Thread Safety No (mutates graph).

See also
occtl_topo_set_edge_same_parameter

◆ occtl_topo_set_edge_start_vertex()

occtl_status_t occtl_topo_set_edge_start_vertex ( occtl_graph_t graph,
occtl_node_id_t  edge,
occtl_node_id_t  vertex 
)

Rebinds an edge's start vertex to a different vertex definition.

Rewires the existing start-vertex reference to point to vertex. The previous vertex definition is no longer referenced by this edge.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]edgeEdge node ID. Must be a valid, active edge.
[in]vertexVertex node ID. Must be a valid, active vertex.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDedge or vertex is invalid or removed.
OCCTL_WRONG_KINDedge is not an edge or vertex is not a vertex.

\par Thread Safety No (mutates graph).

See also
occtl_topo_set_edge_end_vertex

◆ occtl_topo_set_edge_tolerance()

occtl_status_t occtl_topo_set_edge_tolerance ( occtl_graph_t graph,
occtl_node_id_t  edge,
double  tol 
)

Sets the tolerance of an edge.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]edgeEdge node ID.
[in]tolNew tolerance value.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL, or tol is negative or non-finite.
OCCTL_NOT_FOUNDedge is invalid, removed, or not an edge.

\par Thread Safety No (mutates graph).

See also
occtl_topo_set_face_tolerance

◆ occtl_topo_set_face_natural_restriction()

occtl_status_t occtl_topo_set_face_natural_restriction ( occtl_graph_t graph,
occtl_node_id_t  face,
int32_t  flag 
)

Sets the natural-restriction flag on a face.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]faceFace node ID.
[in]flag1 to set natural restriction, 0 to clear.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDface is invalid, removed, or not a face.

\par Thread Safety No (mutates graph).

See also
occtl_topo_set_coedge_param_range

◆ occtl_topo_set_face_tolerance()

occtl_status_t occtl_topo_set_face_tolerance ( occtl_graph_t graph,
occtl_node_id_t  face,
double  tol 
)

Sets the tolerance of a face.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]faceFace node ID.
[in]tolNew tolerance value.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL, or tol is negative or non-finite.
OCCTL_NOT_FOUNDface is invalid, removed, or not a face.

\par Thread Safety No (mutates graph).

See also
occtl_topo_set_edge_tolerance

◆ occtl_topo_set_ref_location()

occtl_status_t occtl_topo_set_ref_location ( occtl_graph_t graph,
occtl_ref_id_t  ref_id,
occtl_transform_t  transform 
)

Sets the local location of a reference entry.

Dispatches internally by RefId kind. Supported ref kinds: Shell, Face, Wire, CoEdge, Vertex, Solid, Child, Occurrence.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]ref_idReference entry to modify.
[in]transformNew local location as an affine transform.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDref_id is invalid or removed.

\par Thread Safety No (mutates graph).

See also
occtl_topo_set_ref_orientation

◆ occtl_topo_set_ref_orientation()

occtl_status_t occtl_topo_set_ref_orientation ( occtl_graph_t graph,
occtl_ref_id_t  ref_id,
occtl_orientation_t  orientation 
)

Sets the orientation of a reference entry.

Dispatches internally by RefId kind. Supported ref kinds: Shell, Face, Wire, CoEdge, Vertex, Solid, Child.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]ref_idReference entry to modify.
[in]orientationNew orientation value.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDref_id is invalid or removed.

\par Thread Safety No (mutates graph).

See also
occtl_topo_set_ref_location

◆ occtl_topo_set_shell_is_closed()

occtl_status_t occtl_topo_set_shell_is_closed ( occtl_graph_t graph,
occtl_node_id_t  shell,
int32_t  flag 
)

Sets the is-closed flag on a shell (watertightness).

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]shellShell node ID.
[in]flag1 to mark closed, 0 otherwise.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDshell is invalid, removed, or not a shell.

\par Thread Safety No (mutates graph).

See also
occtl_topo_set_wire_is_closed

◆ occtl_topo_set_vertex_point()

occtl_status_t occtl_topo_set_vertex_point ( occtl_graph_t graph,
occtl_node_id_t  vertex,
occtl_point3_t  point 
)

Sets the 3D point of a vertex.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]vertexVertex node ID.
[in]pointNew point coordinates (by value).
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL, or tol is negative or non-finite.
OCCTL_NOT_FOUNDvertex is invalid, removed, or not a vertex.

\par Thread Safety No (mutates graph).

See also
occtl_topo_set_vertex_tolerance

◆ occtl_topo_set_vertex_tolerance()

occtl_status_t occtl_topo_set_vertex_tolerance ( occtl_graph_t graph,
occtl_node_id_t  vertex,
double  tol 
)

Sets the tolerance of a vertex.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]vertexVertex node ID.
[in]tolNew tolerance value.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL, or tol is negative or non-finite.
OCCTL_NOT_FOUNDvertex is invalid, removed, or not a vertex.

\par Thread Safety No (mutates graph).

See also
occtl_topo_set_vertex_point

◆ occtl_topo_set_wire_is_closed()

occtl_status_t occtl_topo_set_wire_is_closed ( occtl_graph_t graph,
occtl_node_id_t  wire,
int32_t  flag 
)

Sets the is-closed flag on a wire.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]wireWire node ID.
[in]flag1 to mark closed, 0 otherwise.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDwire is invalid, removed, or not a wire.

\par Thread Safety No (mutates graph).

See also
occtl_topo_set_shell_is_closed

◆ occtl_topo_set_wire_ref_is_outer()

occtl_status_t occtl_topo_set_wire_ref_is_outer ( occtl_graph_t graph,
occtl_ref_id_t  ref_id,
int32_t  flag 
)

Sets the IsOuter flag on a wire reference (marks it as the outer wire on a face).

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]ref_idWire reference entry to modify.
[in]flag1 to mark as outer wire, 0 to clear.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDref_id is invalid, removed, or not a wire ref.

\par Thread Safety No (mutates graph).

See also
occtl_topo_set_ref_orientation

◆ occtl_topo_shell_add_face()

occtl_status_t occtl_topo_shell_add_face ( occtl_graph_t graph,
occtl_node_id_t  shell,
occtl_node_id_t  face,
occtl_orientation_t  orientation 
)

Adds a face to an existing shell.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]shellShell node ID. Must be a valid, active shell.
[in]faceFace node ID. Must be a valid, active face.
[in]orientationOrientation of the face inside the shell.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDshell or face is invalid or removed.
OCCTL_WRONG_KINDshell is not a shell or face is not a face.
OCCTL_ERRORthe operation was rejected.

\par Thread Safety No (mutates graph).

See also
occtl_topo_shell_remove_face, occtl_topo_make_shell

◆ occtl_topo_shell_remove_face()

occtl_status_t occtl_topo_shell_remove_face ( occtl_graph_t graph,
occtl_node_id_t  shell,
occtl_node_id_t  face 
)

Removes a face from a shell without deleting the face definition.

The face remains in the graph for use by other shells or compounds.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]shellShell node ID. Must be a valid, active shell.
[in]faceFace node ID. Must be the definition ID of a face referenced by the shell.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDshell or face is invalid, removed, has wrong kind, or the face is not in the shell.
OCCTL_WRONG_KINDshell is not a shell.

\par Thread Safety No (mutates graph).

See also
occtl_topo_shell_add_face

◆ occtl_topo_solid_add_shell()

occtl_status_t occtl_topo_solid_add_shell ( occtl_graph_t graph,
occtl_node_id_t  solid,
occtl_node_id_t  shell,
occtl_orientation_t  orientation 
)

Adds a shell to an existing solid.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]solidSolid node ID. Must be a valid, active solid.
[in]shellShell node ID. Must be a valid, active shell.
[in]orientationOrientation of the shell inside the solid.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDsolid or shell is invalid or removed.
OCCTL_WRONG_KINDsolid is not a solid or shell is not a shell.
OCCTL_ERRORthe operation was rejected.

\par Thread Safety No (mutates graph).

See also
occtl_topo_solid_remove_shell, occtl_topo_make_solid

◆ occtl_topo_solid_remove_shell()

occtl_status_t occtl_topo_solid_remove_shell ( occtl_graph_t graph,
occtl_node_id_t  solid,
occtl_node_id_t  shell 
)

Removes a shell from a solid without deleting the shell definition.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]solidSolid node ID. Must be a valid, active solid.
[in]shellShell node ID. Must be the definition ID of a shell referenced by the solid.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_NOT_FOUNDsolid or shell is invalid, removed, has wrong kind, or the shell is not in the solid.
OCCTL_WRONG_KINDsolid is not a solid.

\par Thread Safety No (mutates graph).

See also
occtl_topo_solid_add_shell

◆ occtl_topo_vertex_pcurve_parameter()

occtl_status_t occtl_topo_vertex_pcurve_parameter ( const occtl_graph_t *const  graph,
occtl_node_id_t  vertex,
occtl_node_id_t  coedge,
double *const  out_u 
)

Returns the 2D parameter of a vertex on a coedge's pcurve.

Parameters
[in]graphMust be non-NULL.
[in]vertexVertex node ID.
[in]coedgeCoEdge node ID.
[out]out_uBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_u is NULL.
OCCTL_NOT_FOUNDvertex or coedge is invalid or removed.
OCCTL_WRONG_KINDvertex is not a vertex or coedge is not a coedge.

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

See also
occtl_topo_vertex_parameter, occtl_topo_coedge_pcurve_parameter

◆ occtl_topo_vertex_point_in_usage()

occtl_status_t occtl_topo_vertex_point_in_usage ( const occtl_graph_t *const  graph,
occtl_node_id_t  vertex,
occtl_node_id_t  parent,
occtl_point3_t *const  out_point 
)

Returns the 3D point of a vertex with the parent's Location applied.

The parent can be any node that references the vertex (edge, face, compound, occurrence, etc.). The returned point incorporates the Location from the parent's reference chain.

Parameters
[in]graphMust be non-NULL.
[in]vertexVertex node ID.
[in]parentParent node ID whose Location is applied.
[out]out_pointBorrows it. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_point is NULL.
OCCTL_NOT_FOUNDvertex or parent is invalid or removed, or parent does not reference vertex.
OCCTL_WRONG_KINDvertex is not a vertex.

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

See also
occtl_topo_vertex_point

◆ occtl_topo_wire_chamfer_2d()

occtl_status_t occtl_topo_wire_chamfer_2d ( occtl_graph_t graph,
const occtl_topo_wire_chamfer_2d_options_t options,
occtl_node_id_t out_wire 
)

Chamfers corners of a planar Wire and inserts the result into the graph.

The source wire must be planar. The resulting outer Wire is inserted into graph as a new Wire node. The source wire is not modified.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL.
[out]out_wireBorrows it. Must be non-NULL. Receives the new Wire node ID.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, options, or out_wire is NULL; an options field is malformed; or a distance is non-positive / non-finite.
OCCTL_VERSION_MISMATCHoptions->struct_version unsupported.
OCCTL_NOT_FOUNDoptions->wire is invalid or removed; or a selected vertex is invalid / removed.
OCCTL_WRONG_KINDoptions->wire is not a Wire node, or a selected node is not a Vertex.
OCCTL_GEOMETRY_INVALIDOCCT could not create a valid chamfered wire.
OCCTL_TOPOLOGY_INVALIDThe chamfer result could not be ingested as a graph Wire.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

See also
occtl_topo_wire_chamfer_2d_options_init, occtl_topo_face_chamfer_2d

◆ occtl_topo_wire_chamfer_2d_options_init()

void occtl_topo_wire_chamfer_2d_options_init ( occtl_topo_wire_chamfer_2d_options_t options)

Initialises options to default values via OCCTL_TOPO_WIRE_CHAMFER_2D_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_wire_chamfer_2d

◆ occtl_topo_wire_fix_degenerate()

occtl_status_t occtl_topo_wire_fix_degenerate ( occtl_graph_t graph,
const occtl_topo_wire_fix_degenerate_edges_options_t options,
size_t *  out_removed 
)

Removes degenerate edge usages from a Wire in place.

The function scans the Wire's coedge usages, measures each underlying Edge with OCCT linear properties when possible, and detaches every usage whose length is less than or equal to options->min_length. The underlying Edge definitions are not deleted; only their usage in options->wire is removed. This makes the operation safe for shared graph topology.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL.
[out]out_removedBorrows it. Must be non-NULL. Receives the number of detached coedge usages.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, options, or out_removed is NULL; p_next is non-NULL; or min_length is negative / non-finite.
OCCTL_VERSION_MISMATCHoptions->struct_version unsupported.
OCCTL_NOT_FOUNDoptions->wire is invalid or removed.
OCCTL_WRONG_KINDoptions->wire is not a Wire node.

\par Thread Safety No (mutates graph).

See also
occtl_topo_wire_fix_degenerate_options_init, occtl_topo_wire_order_edges

◆ occtl_topo_wire_fix_degenerate_options_init()

void occtl_topo_wire_fix_degenerate_options_init ( occtl_topo_wire_fix_degenerate_edges_options_t options)

Initialises options to default values via OCCTL_TOPO_WIRE_FIX_DEGENERATE_EDGES_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_wire_fix_degenerate

◆ occtl_topo_wire_offset_2d()

occtl_status_t occtl_topo_wire_offset_2d ( occtl_graph_t graph,
const occtl_topo_wire_offset_2d_options_t options,
occtl_node_id_t out_wire 
)

Creates a planar 2D offset of a Wire node and inserts it into the graph.

The source wire must be planar. The resulting offset Wire is inserted into graph as a new Wire node. The source wire is not modified.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL.
[out]out_wireBorrows it. Must be non-NULL. Receives the new Wire node ID.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, options, or out_wire is NULL; an options field is malformed; or distance is zero / non-finite.
OCCTL_VERSION_MISMATCHoptions->struct_version unsupported.
OCCTL_NOT_FOUNDoptions->wire is invalid or removed.
OCCTL_WRONG_KINDoptions->wire is not a Wire node.
OCCTL_GEOMETRY_INVALIDOCCT could not create a valid offset wire.
OCCTL_TOPOLOGY_INVALIDThe offset result could not be ingested as a graph Wire.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

See also
occtl_topo_edges_to_wires, occtl_topo_make_face_from_wires_auto

◆ occtl_topo_wire_offset_2d_options_init()

void occtl_topo_wire_offset_2d_options_init ( occtl_topo_wire_offset_2d_options_t options)

Initialises options to default values via OCCTL_TOPO_WIRE_OFFSET_2D_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_wire_offset_2d