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

OCCT-Light: graph-native algorithms — sewing, same-parameter recompute, validation. More...

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

Go to the source code of this file.

Classes

struct  occtl_topo_sew_options
 
struct  occtl_topo_sew_result
 
struct  occtl_topo_same_parameter_options
 
struct  occtl_topo_check_issue
 
struct  occtl_topo_fillet_options
 
struct  occtl_topo_edge_blend_options
 
struct  occtl_topo_max_fillet_radius_options
 
struct  occtl_topo_project_on_face_options
 
struct  occtl_topo_wrap_on_face_options
 
struct  occtl_topo_project_face_direction_options
 
struct  occtl_topo_face_to_arcs_options
 
struct  occtl_topo_hlr_options
 
struct  occtl_topo_hlr_result
 
struct  occtl_topo_draft_faces_options
 
struct  occtl_topo_defeature_options
 
struct  occtl_topo_offset_features_options
 
struct  occtl_topo_filling_options
 
struct  occtl_topo_filling_patch_edge
 
struct  occtl_topo_filling_patch_options
 
struct  occtl_topo_split_by_plane_options
 
struct  occtl_topo_section_plane
 
struct  occtl_topo_section_by_planes_options
 
struct  occtl_topo_extrude_faces_options
 
struct  occtl_topo_linear_pattern_options
 
struct  occtl_topo_circular_pattern_options
 

Macros

#define OCCTL_TOPO_SEW_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_SEW_OPTIONS_INIT    {OCCTL_TOPO_SEW_OPTIONS_VERSION_1, NULL, 1.0e-6, 0.0, 0.0, 1, 1, 0, 0, 1, 1, 0, 0}
 
#define OCCTL_TOPO_SEW_RESULT_VERSION_1   1u
 
#define OCCTL_TOPO_SEW_RESULT_INIT    {OCCTL_TOPO_SEW_RESULT_VERSION_1, NULL, 0, 0u, 0u, 0u, 0u, 0u, 0u, 0u}
 
#define OCCTL_TOPO_SAME_PARAMETER_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_SAME_PARAMETER_OPTIONS_INIT    {OCCTL_TOPO_SAME_PARAMETER_OPTIONS_VERSION_1, NULL, 0.0, 0}
 
#define OCCTL_TOPO_FILLET_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_FILLET_OPTIONS_INIT   {OCCTL_TOPO_FILLET_OPTIONS_VERSION_1, NULL, 1.0, 0, 0.0, 0.0}
 
#define OCCTL_TOPO_EDGE_BLEND_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_EDGE_BLEND_OPTIONS_INIT    {OCCTL_TOPO_EDGE_BLEND_OPTIONS_VERSION_1, NULL, OCCTL_NODE_ID_INVALID, NULL, 0, 1.0, 0, 0.0, 0.0}
 
#define OCCTL_TOPO_MAX_FILLET_RADIUS_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_MAX_FILLET_RADIUS_OPTIONS_INIT
 
#define OCCTL_TOPO_PROJECT_ON_FACE_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_PROJECT_ON_FACE_OPTIONS_INIT
 
#define OCCTL_TOPO_WRAP_ON_FACE_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_WRAP_ON_FACE_OPTIONS_INIT
 
#define OCCTL_TOPO_PROJECT_FACE_DIRECTION_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_PROJECT_FACE_DIRECTION_OPTIONS_INIT
 
#define OCCTL_TOPO_FACE_TO_ARCS_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_FACE_TO_ARCS_OPTIONS_INIT    {OCCTL_TOPO_FACE_TO_ARCS_OPTIONS_VERSION_1, NULL, OCCTL_NODE_ID_INVALID, 1.0e-3}
 
#define OCCTL_TOPO_HLR_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_HLR_OPTIONS_INIT
 
#define OCCTL_TOPO_HLR_RESULT_VERSION_1   1u
 
#define OCCTL_TOPO_HLR_RESULT_INIT
 
#define OCCTL_TOPO_DRAFT_FACES_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_DRAFT_FACES_OPTIONS_INIT
 
#define OCCTL_TOPO_DEFEATURE_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_DEFEATURE_OPTIONS_INIT    {OCCTL_TOPO_DEFEATURE_OPTIONS_VERSION_1, NULL, OCCTL_NODE_ID_INVALID, NULL, 0, 0}
 
#define OCCTL_TOPO_OFFSET_FEATURES_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_OFFSET_FEATURES_OPTIONS_INIT
 
#define OCCTL_TOPO_FILLING_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_FILLING_OPTIONS_INIT
 
#define OCCTL_TOPO_FILLING_PATCH_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_FILLING_PATCH_OPTIONS_INIT
 
#define OCCTL_TOPO_SPLIT_BY_PLANE_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_SPLIT_BY_PLANE_OPTIONS_INIT
 
#define OCCTL_TOPO_SECTION_BY_PLANES_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_SECTION_BY_PLANES_OPTIONS_INIT    {OCCTL_TOPO_SECTION_BY_PLANES_OPTIONS_VERSION_1, NULL, OCCTL_NODE_ID_INVALID, NULL, 0, 1, 0, 0}
 
#define OCCTL_TOPO_EXTRUDE_FACES_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_EXTRUDE_FACES_OPTIONS_INIT    {OCCTL_TOPO_EXTRUDE_FACES_OPTIONS_VERSION_1, NULL, NULL, 0, 1.0, 0, 0, {0.0, 0.0, 1.0}, 1, 1}
 
#define OCCTL_TOPO_LINEAR_PATTERN_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_LINEAR_PATTERN_OPTIONS_INIT    {OCCTL_TOPO_LINEAR_PATTERN_OPTIONS_VERSION_1, NULL, {0, 0, 1}, 2, 10.0}
 
#define OCCTL_TOPO_CIRCULAR_PATTERN_OPTIONS_VERSION_1   1u
 
#define OCCTL_TOPO_CIRCULAR_PATTERN_OPTIONS_INIT
 

Typedefs

typedef struct occtl_topo_sew_options occtl_topo_sew_options_t
 
typedef struct occtl_topo_sew_result occtl_topo_sew_result_t
 
typedef struct occtl_topo_same_parameter_options occtl_topo_same_parameter_options_t
 
typedef enum occtl_topo_check_severity occtl_topo_check_severity_t
 
typedef struct occtl_topo_check_issue occtl_topo_check_issue_t
 
typedef struct occtl_topo_fillet_options occtl_topo_fillet_options_t
 
typedef struct occtl_topo_edge_blend_options occtl_topo_edge_blend_options_t
 
typedef struct occtl_topo_max_fillet_radius_options occtl_topo_max_fillet_radius_options_t
 
typedef struct occtl_topo_project_on_face_options occtl_topo_project_on_face_options_t
 
typedef struct occtl_topo_wrap_on_face_options occtl_topo_wrap_on_face_options_t
 
typedef struct occtl_topo_project_face_direction_options occtl_topo_project_face_direction_options_t
 
typedef struct occtl_topo_face_to_arcs_options occtl_topo_face_to_arcs_options_t
 
typedef enum occtl_topo_hlr_mode occtl_topo_hlr_mode_t
 
typedef struct occtl_topo_hlr_options occtl_topo_hlr_options_t
 
typedef struct occtl_topo_hlr_result occtl_topo_hlr_result_t
 
typedef struct occtl_topo_draft_faces_options occtl_topo_draft_faces_options_t
 
typedef struct occtl_topo_defeature_options occtl_topo_defeature_options_t
 
typedef struct occtl_topo_offset_features_options occtl_topo_offset_features_options_t
 
typedef enum occtl_topo_filling_continuity occtl_topo_filling_continuity_t
 
typedef struct occtl_topo_filling_options occtl_topo_filling_options_t
 
typedef struct occtl_topo_filling_patch_edge occtl_topo_filling_patch_edge_t
 
typedef struct occtl_topo_filling_patch_options occtl_topo_filling_patch_options_t
 
typedef enum occtl_topo_split_keep occtl_topo_split_keep_t
 
typedef struct occtl_topo_split_by_plane_options occtl_topo_split_by_plane_options_t
 
typedef struct occtl_topo_section_plane occtl_topo_section_plane_t
 
typedef struct occtl_topo_section_by_planes_options occtl_topo_section_by_planes_options_t
 
typedef struct occtl_topo_extrude_faces_options occtl_topo_extrude_faces_options_t
 
typedef struct occtl_topo_linear_pattern_options occtl_topo_linear_pattern_options_t
 
typedef struct occtl_topo_circular_pattern_options occtl_topo_circular_pattern_options_t
 

Enumerations

enum  occtl_topo_check_severity { OCCTL_TOPO_CHECK_WARNING = 0 , OCCTL_TOPO_CHECK_ERROR = 1 , OCCTL_TOPO_CHECK_FATAL = 2 , OCCTL_TOPO_CHECK_SEVERITY_RESERVED_FUTURE = 0x7fffffff }
 
enum  occtl_topo_hlr_mode { OCCTL_TOPO_HLR_BREP = 0 , OCCTL_TOPO_HLR_POLY = 1 , OCCTL_TOPO_HLR_MODE_RESERVED_FUTURE = 0x7fffffff }
 
enum  occtl_topo_filling_continuity { OCCTL_TOPO_FILLING_C0 = 0 , OCCTL_TOPO_FILLING_G1 = 1 , OCCTL_TOPO_FILLING_G2 = 2 , OCCTL_TOPO_FILLING_CONTINUITY_RESERVED_FUTURE = 0x7fffffff }
 
enum  occtl_topo_split_keep { OCCTL_TOPO_SPLIT_KEEP_ALL = 0 , OCCTL_TOPO_SPLIT_KEEP_POSITIVE = 1 , OCCTL_TOPO_SPLIT_KEEP_NEGATIVE = 2 , OCCTL_TOPO_SPLIT_KEEP_RESERVED_FUTURE = 0x7fffffff }
 

Functions

void occtl_topo_sew_options_init (occtl_topo_sew_options_t *options)
 
void occtl_topo_sew_result_init (occtl_topo_sew_result_t *result)
 
occtl_status_t occtl_topo_sew (occtl_graph_t *graph, const occtl_topo_sew_options_t *options, occtl_topo_sew_result_t *out_result)
 
void occtl_topo_same_parameter_options_init (occtl_topo_same_parameter_options_t *options)
 
occtl_status_t occtl_topo_recompute_same_parameter (occtl_graph_t *graph, const occtl_topo_same_parameter_options_t *options, uint32_t *out_c0_fallback_count, uint32_t *out_approx_fallback_count)
 
occtl_status_t occtl_topo_check (const occtl_graph_t *graph, occtl_topo_check_issue_t *out_issues, size_t cap, size_t *out_count)
 
void occtl_topo_fillet_options_init (occtl_topo_fillet_options_t *opts)
 
occtl_status_t occtl_topo_fillet (occtl_graph_t *graph, const occtl_topo_fillet_options_t *opts, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
 
void occtl_topo_edge_blend_options_init (occtl_topo_edge_blend_options_t *opts)
 
occtl_status_t occtl_topo_blend_edges (const occtl_graph_t *graph, const occtl_topo_edge_blend_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
 
void occtl_topo_max_fillet_radius_options_init (occtl_topo_max_fillet_radius_options_t *opts)
 
occtl_status_t occtl_topo_max_fillet_radius (const occtl_graph_t *graph, const occtl_topo_max_fillet_radius_options_t *options, double *out_radius)
 
occtl_status_t occtl_topo_transformed (const occtl_graph_t *graph, occtl_node_id_t root, occtl_transform_t transform, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
 
void occtl_topo_project_on_face_options_init (occtl_topo_project_on_face_options_t *opts)
 
occtl_status_t occtl_topo_project_on_face (const occtl_graph_t *graph, const occtl_topo_project_on_face_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
 
void occtl_topo_wrap_on_face_options_init (occtl_topo_wrap_on_face_options_t *opts)
 
occtl_status_t occtl_topo_wrap_on_face (const occtl_graph_t *graph, const occtl_topo_wrap_on_face_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
 
void occtl_topo_project_face_direction_options_init (occtl_topo_project_face_direction_options_t *opts)
 
occtl_status_t occtl_topo_project_face_along_direction (const occtl_graph_t *graph, const occtl_topo_project_face_direction_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
 
void occtl_topo_face_to_arcs_options_init (occtl_topo_face_to_arcs_options_t *opts)
 
occtl_status_t occtl_topo_face_to_arcs (const occtl_graph_t *graph, const occtl_topo_face_to_arcs_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
 
void occtl_topo_hlr_result_init (occtl_topo_hlr_result_t *result)
 
void occtl_topo_hlr_options_init (occtl_topo_hlr_options_t *options)
 
occtl_status_t occtl_topo_make_hlr_projection (const occtl_graph_t *graph, const occtl_topo_hlr_options_t *options, occtl_topo_hlr_result_t *out_result)
 
void occtl_topo_draft_faces_options_init (occtl_topo_draft_faces_options_t *opts)
 
occtl_status_t occtl_topo_draft_faces (const occtl_graph_t *graph, const occtl_topo_draft_faces_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
 
void occtl_topo_defeature_options_init (occtl_topo_defeature_options_t *opts)
 
occtl_status_t occtl_topo_defeature (const occtl_graph_t *graph, const occtl_topo_defeature_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
 
void occtl_topo_offset_features_options_init (occtl_topo_offset_features_options_t *opts)
 
occtl_status_t occtl_topo_make_offset_features (const occtl_graph_t *graph, const occtl_topo_offset_features_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
 
void occtl_topo_filling_options_init (occtl_topo_filling_options_t *opts)
 
occtl_status_t occtl_topo_make_filling (const occtl_graph_t *graph, const occtl_topo_filling_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
 
void occtl_topo_filling_patch_options_init (occtl_topo_filling_patch_options_t *opts)
 
occtl_status_t occtl_topo_make_filling_patch (const occtl_graph_t *graph, const occtl_topo_filling_patch_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
 
void occtl_topo_split_by_plane_options_init (occtl_topo_split_by_plane_options_t *opts)
 
occtl_status_t occtl_topo_make_split_by_plane (const occtl_graph_t *graph, const occtl_topo_split_by_plane_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
 
void occtl_topo_section_by_planes_options_init (occtl_topo_section_by_planes_options_t *opts)
 
occtl_status_t occtl_topo_make_sections_by_planes (const occtl_graph_t *graph, const occtl_topo_section_by_planes_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
 
void occtl_topo_extrude_faces_options_init (occtl_topo_extrude_faces_options_t *opts)
 
occtl_status_t occtl_topo_make_face_extrusion (const occtl_graph_t *graph, const occtl_topo_extrude_faces_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
 
occtl_status_t occtl_topo_mirrored (const occtl_graph_t *graph, occtl_node_id_t root, occtl_point3_t point, occtl_direction3_t normal, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
 
void occtl_topo_linear_pattern_options_init (occtl_topo_linear_pattern_options_t *opts)
 
occtl_status_t occtl_topo_make_linear_pattern (const occtl_graph_t *graph, occtl_node_id_t root, const occtl_topo_linear_pattern_options_t *opts, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
 
void occtl_topo_circular_pattern_options_init (occtl_topo_circular_pattern_options_t *opts)
 
occtl_status_t occtl_topo_make_circular_pattern (const occtl_graph_t *graph, occtl_node_id_t root, const occtl_topo_circular_pattern_options_t *opts, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
 

Detailed Description

OCCT-Light: graph-native algorithms — sewing, same-parameter recompute, validation.

These wrap the BRepGraphAlgo and BRepGraphCheck families in OCCT. They are part of the topo module; this header is gated by OCCTL_HAS_TOPO in the umbrella include.

Macro Definition Documentation

◆ OCCTL_TOPO_CIRCULAR_PATTERN_OPTIONS_INIT

#define OCCTL_TOPO_CIRCULAR_PATTERN_OPTIONS_INIT
Value:
{OCCTL_TOPO_CIRCULAR_PATTERN_OPTIONS_VERSION_1, \
NULL, \
{{0, 0, 0}, {0, 0, 1}}, \
4, \
#define OCCTL_ANGLE_90_DEG_RAD
Definition occtl_core.h:63

Default-value initialiser for occtl_topo_circular_pattern_options_t.

◆ OCCTL_TOPO_DRAFT_FACES_OPTIONS_INIT

#define OCCTL_TOPO_DRAFT_FACES_OPTIONS_INIT
Value:
{OCCTL_TOPO_DRAFT_FACES_OPTIONS_VERSION_1, \
NULL, \
NULL, \
0, \
{0.0, 0.0, 1.0}, \
{0.0, 0.0, 0.0}, \
{0.0, 0.0, 1.0}, \
1}
#define OCCTL_ANGLE_5_DEG_RAD
Definition occtl_core.h:54
#define OCCTL_NODE_ID_INVALID
Definition occtl_topo_types.h:138

◆ OCCTL_TOPO_FILLET_OPTIONS_INIT

#define OCCTL_TOPO_FILLET_OPTIONS_INIT   {OCCTL_TOPO_FILLET_OPTIONS_VERSION_1, NULL, 1.0, 0, 0.0, 0.0}

Default-value initialiser for occtl_topo_fillet_options_t.

◆ OCCTL_TOPO_FILLING_OPTIONS_INIT

#define OCCTL_TOPO_FILLING_OPTIONS_INIT
Value:
{OCCTL_TOPO_FILLING_OPTIONS_VERSION_1, \
NULL, \
NULL, \
0, \
3, \
15, \
2, \
0, \
1.0e-5, \
1.0e-4, \
1.0e-2, \
1.0e-1, \
8, \
9}
@ OCCTL_TOPO_FILLING_C0
Definition occtl_topo_algo.h:1166

◆ OCCTL_TOPO_FILLING_PATCH_OPTIONS_INIT

#define OCCTL_TOPO_FILLING_PATCH_OPTIONS_INIT
Value:
{OCCTL_TOPO_FILLING_PATCH_OPTIONS_VERSION_1, \
NULL, \
NULL, \
0, \
NULL, \
0, \
3, \
15, \
2, \
0, \
1.0e-5, \
1.0e-4, \
1.0e-2, \
1.0e-1, \
8, \
9}

◆ OCCTL_TOPO_HLR_OPTIONS_INIT

#define OCCTL_TOPO_HLR_OPTIONS_INIT
Value:
{OCCTL_TOPO_HLR_OPTIONS_VERSION_1, \
NULL, \
{{0.0, 0.0, 0.0}, {1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}}, \
0.0, \
1, \
1, \
1, \
@ OCCTL_TOPO_HLR_BREP
Definition occtl_topo_algo.h:798

◆ OCCTL_TOPO_HLR_RESULT_INIT

#define OCCTL_TOPO_HLR_RESULT_INIT

◆ OCCTL_TOPO_LINEAR_PATTERN_OPTIONS_INIT

#define OCCTL_TOPO_LINEAR_PATTERN_OPTIONS_INIT    {OCCTL_TOPO_LINEAR_PATTERN_OPTIONS_VERSION_1, NULL, {0, 0, 1}, 2, 10.0}

Default-value initialiser for occtl_topo_linear_pattern_options_t.

◆ OCCTL_TOPO_MAX_FILLET_RADIUS_OPTIONS_INIT

#define OCCTL_TOPO_MAX_FILLET_RADIUS_OPTIONS_INIT
Value:
{OCCTL_TOPO_MAX_FILLET_RADIUS_OPTIONS_VERSION_1, \
NULL, \
NULL, \
0, \
1.0e-6, \
0.0, \
1.0e-4, \
24}

◆ OCCTL_TOPO_OFFSET_FEATURES_OPTIONS_INIT

#define OCCTL_TOPO_OFFSET_FEATURES_OPTIONS_INIT
Value:
{OCCTL_TOPO_OFFSET_FEATURES_OPTIONS_VERSION_1, \
NULL, \
NULL, \
0, \
0.0, \
1.0, \
1.0e-3, \
0, \
0, \
0}
@ OCCTL_OFFSET_JOIN_ARC
Definition occtl_topo_build.h:209

◆ OCCTL_TOPO_PROJECT_FACE_DIRECTION_OPTIONS_INIT

#define OCCTL_TOPO_PROJECT_FACE_DIRECTION_OPTIONS_INIT
Value:
{OCCTL_TOPO_PROJECT_FACE_DIRECTION_OPTIONS_VERSION_1, \
NULL, \
{0.0, 0.0, -1.0}, \
-1.0, \
1}

◆ OCCTL_TOPO_PROJECT_ON_FACE_OPTIONS_INIT

#define OCCTL_TOPO_PROJECT_ON_FACE_OPTIONS_INIT
Value:
{OCCTL_TOPO_PROJECT_ON_FACE_OPTIONS_VERSION_1, \
NULL, \
1.0e-4, \
1.0e-8, \
14, \
16, \
-1.0, \
1, \
1}

◆ OCCTL_TOPO_SEW_OPTIONS_INIT

#define OCCTL_TOPO_SEW_OPTIONS_INIT    {OCCTL_TOPO_SEW_OPTIONS_VERSION_1, NULL, 1.0e-6, 0.0, 0.0, 1, 1, 0, 0, 1, 1, 0, 0}

Default-value initialiser for occtl_topo_sew_options_t.

◆ OCCTL_TOPO_SEW_RESULT_INIT

#define OCCTL_TOPO_SEW_RESULT_INIT    {OCCTL_TOPO_SEW_RESULT_VERSION_1, NULL, 0, 0u, 0u, 0u, 0u, 0u, 0u, 0u}

Default-value initialiser for occtl_topo_sew_result_t.

◆ OCCTL_TOPO_SPLIT_BY_PLANE_OPTIONS_INIT

#define OCCTL_TOPO_SPLIT_BY_PLANE_OPTIONS_INIT
Value:
{OCCTL_TOPO_SPLIT_BY_PLANE_OPTIONS_VERSION_1, \
NULL, \
{0.0, 0.0, 0.0}, \
{0.0, 0.0, 1.0}, \
@ OCCTL_TOPO_SPLIT_KEEP_ALL
Definition occtl_topo_algo.h:1364

◆ OCCTL_TOPO_WRAP_ON_FACE_OPTIONS_INIT

#define OCCTL_TOPO_WRAP_ON_FACE_OPTIONS_INIT
Value:
{OCCTL_TOPO_WRAP_ON_FACE_OPTIONS_VERSION_1, \
NULL, \
{{0.0, 0.0, 0.0}, {1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}}, \
1.0e-3, \
4, \
8, \
0.0, \
0.0}

Typedef Documentation

◆ occtl_topo_check_issue_t

Structured diagnostic record produced by occtl_topo_check.

Mirrors BRepGraphCheck_Issue. status_bit is a single power-of-2 value from one of OCCT's per-topology-level status enums (the caller's responsibility to map by NodeId kind via occtl_graph_node_kind).

◆ occtl_topo_check_severity_t

◆ occtl_topo_circular_pattern_options_t

◆ occtl_topo_defeature_options_t

◆ occtl_topo_draft_faces_options_t

◆ occtl_topo_edge_blend_options_t

Configuration for occtl_topo_blend_edges.

When chamfer_mode is 0, every selected edge receives a constant-radius fillet using radius. When chamfer_mode is 1, every selected edge receives a chamfer using chamfer_dist1 and chamfer_dist2.

◆ occtl_topo_extrude_faces_options_t

◆ occtl_topo_face_to_arcs_options_t

◆ occtl_topo_fillet_options_t

Configuration for occtl_topo_fillet.

When chamfer_mode is 0, a constant-radius fillet is applied using radius. When chamfer_mode is 1, a chamfer is applied using chamfer_dist1 and chamfer_dist2.

◆ occtl_topo_filling_options_t

◆ occtl_topo_filling_patch_edge_t

◆ occtl_topo_filling_patch_options_t

◆ occtl_topo_hlr_mode_t

Hidden-line removal algorithm used by occtl_topo_make_hlr_projection.

◆ occtl_topo_hlr_options_t

Configuration for occtl_topo_make_hlr_projection.

Projects a graph root through OCCT hidden-line removal. The frame follows OCCT HLR convention: projection_frame.location is the projection target, projection_frame.z_dir is the viewing direction, and projection_frame.x_dir is the horizontal direction of the drawing plane. Set focus <= 0.0 for parallel projection, or a positive focal distance for perspective projection.

◆ occtl_topo_hlr_result_t

Result roots produced by occtl_topo_make_hlr_projection.

struct_version is INPUT — the caller declares which version they understand. graph owns all non-invalid category roots and must be released with occtl_graph_free. Categories that OCCT did not produce, or that were disabled in occtl_topo_hlr_options_t, are set to OCCTL_NODE_ID_INVALID.

◆ occtl_topo_linear_pattern_options_t

◆ occtl_topo_max_fillet_radius_options_t

Configuration for occtl_topo_max_fillet_radius.

The operation estimates a conservative maximum constant fillet radius for a selected edge set by repeatedly running OCCT's 3D fillet builder.

◆ occtl_topo_offset_features_options_t

◆ occtl_topo_project_face_direction_options_t

◆ occtl_topo_project_on_face_options_t

◆ occtl_topo_same_parameter_options_t

◆ occtl_topo_section_by_planes_options_t

◆ occtl_topo_section_plane_t

◆ occtl_topo_sew_options_t

Configuration for occtl_topo_sew.

Mirrors BRepGraphAlgo_Sewing::Options. All fields after p_next are inputs. Pass NULL as options to occtl_topo_sew to accept the defaults baked into OCCTL_TOPO_SEW_OPTIONS_INIT.

◆ occtl_topo_sew_result_t

Diagnostic snapshot produced by occtl_topo_sew.

◆ occtl_topo_split_by_plane_options_t

◆ occtl_topo_wrap_on_face_options_t

Configuration for occtl_topo_wrap_on_face.

Wraps a planar Edge, Wire, or Face onto target_face, starting from a surface placement. The placement origin must lie on or near the target face. Its X axis defines the local planar +X direction on the surface; its Z axis defines the starting surface normal. The algorithm samples the planar source, follows the target surface through OCCT face intersections, interpolates wrapped B-spline edges, fixes wires, and builds a filling face when source is a Face.

Enumeration Type Documentation

◆ occtl_topo_check_severity

Severity classification for occtl_topo_check_issue_t.

Enumerator
OCCTL_TOPO_CHECK_WARNING 

Non-critical; may be acceptable.

OCCTL_TOPO_CHECK_ERROR 

Invalid topology/geometry; should be fixed.

OCCTL_TOPO_CHECK_FATAL 

Severe corruption; further processing blocked.

◆ occtl_topo_filling_continuity

Enumerator
OCCTL_TOPO_FILLING_C0 

Position continuity.

OCCTL_TOPO_FILLING_G1 

Tangency continuity.

OCCTL_TOPO_FILLING_G2 

Curvature continuity.

◆ occtl_topo_hlr_mode

Hidden-line removal algorithm used by occtl_topo_make_hlr_projection.

Enumerator
OCCTL_TOPO_HLR_BREP 

Exact BRep HLR via OCCT HLRBRep_Algo.

OCCTL_TOPO_HLR_POLY 

Poly HLR via OCCT HLRBRep_PolyAlgo.

◆ occtl_topo_split_keep

Enumerator
OCCTL_TOPO_SPLIT_KEEP_ALL 

Return all pieces produced by the split.

OCCTL_TOPO_SPLIT_KEEP_POSITIVE 

Keep the side in the normal direction.

OCCTL_TOPO_SPLIT_KEEP_NEGATIVE 

Keep the side opposite the normal direction.

Function Documentation

◆ occtl_topo_blend_edges()

occtl_status_t occtl_topo_blend_edges ( const occtl_graph_t graph,
const occtl_topo_edge_blend_options_t options,
occtl_graph_t **  out_graph,
occtl_node_id_t out_root 
)

Applies a selected-edge 3D fillet or chamfer to options->root.

Output is a new graph; the input graph is not modified. Unlike occtl_topo_fillet, this operation is scoped to the selected edge set in options.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_graphOwns it. Receives a new graph on success.
[out]out_rootBorrows it. Receives the modified root NodeId.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny required pointer is NULL, edge_count is zero, or a distance/radius is invalid.
OCCTL_VERSION_MISMATCHoptions has an unsupported struct_version.
OCCTL_NOT_FOUNDroot or a selected edge is invalid, removed, or cannot be resolved.
OCCTL_WRONG_KINDA selected NodeId is not an Edge.
OCCTL_GEOMETRY_INVALIDThe algorithm failed to produce a valid result.
OCCTL_TOPOLOGY_INVALIDThe result could not be ingested into BRepGraph.

\par Thread Safety No — allocates a new graph.

See also
occtl_topo_transformed

◆ occtl_topo_check()

occtl_status_t occtl_topo_check ( const occtl_graph_t graph,
occtl_topo_check_issue_t out_issues,
size_t  cap,
size_t *  out_count 
)

Runs the full validation suite on graph and reports diagnostic issues.

Two-call buffer (§10.1 of ABI_PATTERNS.md): pass out_issues as NULL with cap=0 to size; reissue with a buffer of length at least the returned out_count.

Parameters
[in]graphMust be non-NULL.
[out]out_issuesBorrows it. Length cap. May be NULL on the sizing call.
[in]capCapacity of out_issues.
[out]out_countBorrows it. Receives the total issue count.
Return values
OCCTL_OKSuccess — either sizing or full fill.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL.
OCCTL_BUFFER_TOO_SMALLcap < total issue count and out_issues is non-NULL.

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

See also
occtl_topo_sew

◆ occtl_topo_circular_pattern_options_init()

void occtl_topo_circular_pattern_options_init ( occtl_topo_circular_pattern_options_t opts)

Initialises opts to default values matching OCCTL_TOPO_CIRCULAR_PATTERN_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_make_circular_pattern

◆ occtl_topo_defeature()

occtl_status_t occtl_topo_defeature ( const occtl_graph_t graph,
const occtl_topo_defeature_options_t options,
occtl_graph_t **  out_graph,
occtl_node_id_t out_root 
)

Removes selected features from options->root.

Output is a new graph; the input graph is not modified. Each selected node may be a Face, Shell, Solid, CompSolid, or Compound. Non-face selections are expanded to their contained faces before calling OCCT's defeaturing kernel. This covers feature selections at several topology levels while preserving OCCT's face-based removal semantics internally.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_graphOwns it. Receives a new graph on success.
[out]out_rootBorrows it. Receives the defeatured root NodeId.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny required pointer is NULL, or selection_count is zero.
OCCTL_VERSION_MISMATCHoptions has an unsupported struct_version.
OCCTL_NOT_FOUNDroot or a selected node is invalid, removed, or cannot be resolved.
OCCTL_WRONG_KINDA selected NodeId cannot be expanded to faces.
OCCTL_GEOMETRY_INVALIDDefeaturing failed to produce a valid result.
OCCTL_TOPOLOGY_INVALIDThe result could not be ingested into BRepGraph.

\par Thread Safety No. Allocates a new graph.

See also
occtl_topo_draft_faces

◆ occtl_topo_defeature_options_init()

void occtl_topo_defeature_options_init ( occtl_topo_defeature_options_t opts)

Initialises opts to default values matching OCCTL_TOPO_DEFEATURE_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_defeature

◆ occtl_topo_draft_faces()

occtl_status_t occtl_topo_draft_faces ( const occtl_graph_t graph,
const occtl_topo_draft_faces_options_t options,
occtl_graph_t **  out_graph,
occtl_node_id_t out_root 
)

Applies a draft angle to selected faces of a shape.

Output is a new graph; the input graph is not modified.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_graphOwns it. Receives a new graph on success.
[out]out_rootBorrows it. Receives the drafted root NodeId.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny required pointer is NULL, face_count is zero, or angle is zero.
OCCTL_VERSION_MISMATCHoptions has an unsupported struct_version.
OCCTL_NOT_FOUNDroot or a selected face is invalid, removed, or cannot be resolved.
OCCTL_WRONG_KINDA selected NodeId is not a Face.
OCCTL_GEOMETRY_INVALIDDraft failed to produce a valid result.
OCCTL_TOPOLOGY_INVALIDThe result could not be ingested into BRepGraph.

\par Thread Safety No — allocates a new graph.

See also
occtl_topo_blend_edges

◆ occtl_topo_draft_faces_options_init()

void occtl_topo_draft_faces_options_init ( occtl_topo_draft_faces_options_t opts)

Initialises opts to default values matching OCCTL_TOPO_DRAFT_FACES_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_draft_faces

◆ occtl_topo_edge_blend_options_init()

void occtl_topo_edge_blend_options_init ( occtl_topo_edge_blend_options_t opts)

Initialises opts to default values matching OCCTL_TOPO_EDGE_BLEND_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_blend_edges

◆ occtl_topo_extrude_faces_options_init()

void occtl_topo_extrude_faces_options_init ( occtl_topo_extrude_faces_options_t opts)

Initialises opts to default values matching OCCTL_TOPO_EXTRUDE_FACES_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_make_face_extrusion

◆ occtl_topo_face_to_arcs()

occtl_status_t occtl_topo_face_to_arcs ( const occtl_graph_t graph,
const occtl_topo_face_to_arcs_options_t options,
occtl_graph_t **  out_graph,
occtl_node_id_t out_root 
)

Converts planar face or wire boundaries to line and circular-arc edges.

Output is a new graph; the input graph is not modified. Face input returns a Face root. Wire input must be closed and planar enough to define a support face; the returned root is the converted outer Wire.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_graphOwns it. Receives a new graph on success.
[out]out_rootBorrows it. Receives the converted Face or Wire root.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny required pointer is NULL, or angular_tolerance is non-positive or non-finite.
OCCTL_VERSION_MISMATCHoptions has an unsupported struct_version.
OCCTL_NOT_FOUNDsource is invalid, removed, or cannot be resolved.
OCCTL_WRONG_KINDsource is neither Face nor Wire.
OCCTL_GEOMETRY_INVALIDOCCT could not build or convert the face.
OCCTL_TOPOLOGY_INVALIDThe result could not be ingested into the output graph.

\par Thread Safety No — allocates a new graph.

See also
occtl_topo_project_face_along_direction

◆ occtl_topo_face_to_arcs_options_init()

void occtl_topo_face_to_arcs_options_init ( occtl_topo_face_to_arcs_options_t opts)

Initialises opts to default values matching OCCTL_TOPO_FACE_TO_ARCS_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_face_to_arcs

◆ occtl_topo_fillet()

occtl_status_t occtl_topo_fillet ( occtl_graph_t graph,
const occtl_topo_fillet_options_t opts,
occtl_graph_t **  out_graph,
occtl_node_id_t out_root 
)

Applies a 3D fillet or chamfer to all solids and standalone shells in graph.

Every edge of every top-level solid and standalone shell is processed; the result shape is placed into a newly-allocated output graph.

Parameters
[in]graphBorrows it. Must be non-NULL. Provides the input topology (not modified).
[in]optsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_graphOwns it. Must be non-NULL. Receives a newly-allocated graph handle.
[out]out_rootBorrows it. Must be non-NULL. Receives the root NodeId of the filleted result in *out_graph.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, opts, out_graph, or out_root is NULL.
OCCTL_VERSION_MISMATCHopts has an unsupported struct_version.
OCCTL_GEOMETRY_INVALIDThe algorithm failed to produce a valid result (e.g. radius too large for the geometry).

\par Thread Safety No — allocates a new graph.

See also
occtl_topo_fillet_options_init

◆ occtl_topo_fillet_options_init()

void occtl_topo_fillet_options_init ( occtl_topo_fillet_options_t opts)

Initialises opts to default values matching OCCTL_TOPO_FILLET_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_fillet

◆ occtl_topo_filling_options_init()

void occtl_topo_filling_options_init ( occtl_topo_filling_options_t opts)

Initialises opts to default values matching OCCTL_TOPO_FILLING_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_make_filling

◆ occtl_topo_filling_patch_options_init()

void occtl_topo_filling_patch_options_init ( occtl_topo_filling_patch_options_t opts)

Initialises opts to default values matching OCCTL_TOPO_FILLING_PATCH_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_make_filling_patch

◆ occtl_topo_hlr_options_init()

void occtl_topo_hlr_options_init ( occtl_topo_hlr_options_t options)

Initialises options to default values matching OCCTL_TOPO_HLR_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_make_hlr_projection

◆ occtl_topo_hlr_result_init()

void occtl_topo_hlr_result_init ( occtl_topo_hlr_result_t result)

Initialises result to defaults matching OCCTL_TOPO_HLR_RESULT_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_make_hlr_projection

◆ occtl_topo_linear_pattern_options_init()

void occtl_topo_linear_pattern_options_init ( occtl_topo_linear_pattern_options_t opts)

Initialises opts to default values matching OCCTL_TOPO_LINEAR_PATTERN_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_make_linear_pattern

◆ occtl_topo_make_circular_pattern()

occtl_status_t occtl_topo_make_circular_pattern ( const occtl_graph_t graph,
occtl_node_id_t  root,
const occtl_topo_circular_pattern_options_t opts,
occtl_graph_t **  out_graph,
occtl_node_id_t out_root 
)

Creates count instances of the shape rooted at root, rotated around axis by multiples of angle.

The original shape is included as the first instance. Results are placed into a newly-allocated compound in a new graph.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]rootNodeId of the shape to pattern. Must be a valid solid, shell, or compound node.
[in]optsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_graphBorrows it. Must be non-NULL. Receives a newly-allocated graph handle (owns it).
[out]out_rootBorrows it. Must be non-NULL. Receives the root NodeId of the resulting compound in *out_graph.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, opts, out_graph, or out_root is NULL.
OCCTL_VERSION_MISMATCHopts has an unsupported struct_version.
OCCTL_NOT_FOUNDroot is invalid or removed.
OCCTL_GEOMETRY_INVALIDThe result compound is null.

\par Thread Safety No — allocates a new graph.

See also
occtl_topo_circular_pattern_options_init

◆ occtl_topo_make_face_extrusion()

occtl_status_t occtl_topo_make_face_extrusion ( const occtl_graph_t graph,
const occtl_topo_extrude_faces_options_t options,
occtl_graph_t **  out_graph,
occtl_node_id_t out_root 
)

Extrudes one or more Face nodes into prism solids.

Output is a new graph; the input graph is not modified. Each Face is swept with OCCT BRepPrimAPI_MakePrism. Without use_normal, the sweep direction is the oriented face normal evaluated at the middle of the face parameter bounds. Multiple faces are collected into a Compound result.

This is a sweep operation, distinct from the hollow/shell operation occtl_prim_make_thick_solid.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_graphOwns it. Receives a new graph on success.
[out]out_rootBorrows it. Receives the extrude result root NodeId.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny required pointer is NULL, face_count is zero, thickness is non-positive, or normal is invalid when requested.
OCCTL_VERSION_MISMATCHoptions has an unsupported struct_version.
OCCTL_NOT_FOUNDA selected face is invalid, removed, or cannot be resolved.
OCCTL_WRONG_KINDA selected NodeId is not a Face.
OCCTL_GEOMETRY_INVALIDExtrusion failed or a face normal could not be evaluated.
OCCTL_TOPOLOGY_INVALIDThe result could not be ingested into BRepGraph.

\par Thread Safety No. Allocates a new graph.

See also
occtl_prim_make_thick_solid, occtl_topo_section_by_planes

◆ occtl_topo_make_filling()

occtl_status_t occtl_topo_make_filling ( const occtl_graph_t graph,
const occtl_topo_filling_options_t options,
occtl_graph_t **  out_graph,
occtl_node_id_t out_root 
)

Builds an N-side filling face from ordered boundary edges.

Output is a new graph; the input graph is not modified.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_graphOwns it. Receives a new graph on success.
[out]out_rootBorrows it. Receives the filling face root NodeId.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny required pointer is NULL, edge_count is less than 2, or a solver option is invalid.
OCCTL_VERSION_MISMATCHoptions has an unsupported struct_version.
OCCTL_NOT_FOUNDA selected edge is invalid, removed, or cannot be resolved.
OCCTL_WRONG_KINDA selected NodeId is not an Edge.
OCCTL_GEOMETRY_INVALIDFilling failed to produce a valid result.
OCCTL_TOPOLOGY_INVALIDThe result could not be ingested into BRepGraph.

\par Thread Safety No — allocates a new graph.

See also
occtl_topo_project_on_face

◆ occtl_topo_make_filling_patch()

occtl_status_t occtl_topo_make_filling_patch ( const occtl_graph_t graph,
const occtl_topo_filling_patch_options_t options,
occtl_graph_t **  out_graph,
occtl_node_id_t out_root 
)

Builds an N-side filling patch from edge, support-face, and point constraints.

Output is a new graph; the input graph is not modified. This is the richer graph-facing variant of occtl_topo_make_filling: each edge may optionally name a support Face for G1/G2 continuity, and additional 3D points can be added as surface constraints.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_graphOwns it. Receives a new graph on success.
[out]out_rootBorrows it. Receives the filling patch face root NodeId.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny required pointer is NULL, p_next is non-NULL, edge_count is less than 2, points is NULL while point_count is non-zero, or a solver option is invalid.
OCCTL_VERSION_MISMATCHoptions has an unsupported struct_version.
OCCTL_NOT_FOUNDA selected edge or support face is invalid, removed, or cannot be resolved.
OCCTL_WRONG_KINDA selected edge is not an Edge, or a support node is not a Face.
OCCTL_GEOMETRY_INVALIDFilling failed to produce a valid result.
OCCTL_TOPOLOGY_INVALIDThe result could not be ingested into BRepGraph.

\par Thread Safety No — allocates a new graph.

See also
occtl_topo_make_filling

◆ occtl_topo_make_hlr_projection()

occtl_status_t occtl_topo_make_hlr_projection ( const occtl_graph_t graph,
const occtl_topo_hlr_options_t options,
occtl_topo_hlr_result_t out_result 
)

Projects a graph root with OCCT hidden-line removal.

The output graph contains one root per non-empty requested category. Each category is an OCCT-generated edge compound ingested into BRepGraph, so downstream drawing exporters can traverse ordinary graph topology instead of owning HLR-specific objects.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_resultBorrows it. Receives an owned output graph and category roots. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTA required pointer is NULL, p_next is non-NULL, or an option value is invalid.
OCCTL_VERSION_MISMATCHoptions has an unsupported struct_version.
OCCTL_NOT_FOUNDroot is invalid, removed, or cannot be resolved.
OCCTL_GEOMETRY_INVALIDOCCT HLR produced no requested edge category.
OCCTL_TOPOLOGY_INVALIDA projected category could not be ingested into the output graph.

\par Thread Safety No. Allocates a new graph and runs OCCT HLR algorithms.

See also
occtl_curve_to_bezier_segments, occtl_topo_face_to_arcs

◆ occtl_topo_make_linear_pattern()

occtl_status_t occtl_topo_make_linear_pattern ( const occtl_graph_t graph,
occtl_node_id_t  root,
const occtl_topo_linear_pattern_options_t opts,
occtl_graph_t **  out_graph,
occtl_node_id_t out_root 
)

Creates count instances of the shape rooted at root, translated along direction by multiples of step.

The original shape is included as the first instance. Results are placed into a newly-allocated compound in a new graph.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]rootNodeId of the shape to pattern. Must be a valid solid, shell, or compound node.
[in]optsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_graphBorrows it. Must be non-NULL. Receives a newly-allocated graph handle (owns it).
[out]out_rootBorrows it. Must be non-NULL. Receives the root NodeId of the resulting compound in *out_graph.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, opts, out_graph, or out_root is NULL.
OCCTL_VERSION_MISMATCHopts has an unsupported struct_version.
OCCTL_NOT_FOUNDroot is invalid or removed.
OCCTL_GEOMETRY_INVALIDThe result compound is null.

\par Thread Safety No — allocates a new graph.

See also
occtl_topo_linear_pattern_options_init

◆ occtl_topo_make_offset_features()

occtl_status_t occtl_topo_make_offset_features ( const occtl_graph_t graph,
const occtl_topo_offset_features_options_t options,
occtl_graph_t **  out_graph,
occtl_node_id_t out_root 
)

Offsets selected features of options->root.

Output is a new graph; the input graph is not modified. Each selected node may be a Face, Shell, Solid, CompSolid, or Compound. Non-face selections are expanded to their contained faces, and those faces receive selection_offset while unselected faces use base_offset.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_graphOwns it. Receives a new graph on success.
[out]out_rootBorrows it. Receives the offset result root NodeId.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny required pointer is NULL, selection_count is zero, tolerance is non-positive, or both offsets are zero.
OCCTL_VERSION_MISMATCHoptions has an unsupported struct_version.
OCCTL_NOT_FOUNDroot or a selected node is invalid, removed, or cannot be resolved.
OCCTL_WRONG_KINDA selected NodeId cannot be expanded to faces.
OCCTL_GEOMETRY_INVALIDOffset failed to produce a valid result.
OCCTL_TOPOLOGY_INVALIDThe result could not be ingested into BRepGraph.

\par Thread Safety No. Allocates a new graph.

See also
occtl_topo_defeature

◆ occtl_topo_make_sections_by_planes()

occtl_status_t occtl_topo_make_sections_by_planes ( const occtl_graph_t graph,
const occtl_topo_section_by_planes_options_t options,
occtl_graph_t **  out_graph,
occtl_node_id_t out_root 
)

Sections a shape by one or more planes.

Output is a new graph containing the generated section edges, usually as a Compound root. The input graph is not modified. Multiple planes are sectioned independently and collected into one compound.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_graphOwns it. Receives a new graph on success.
[out]out_rootBorrows it. Receives the section result root NodeId.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny required pointer is NULL or plane_count is zero.
OCCTL_VERSION_MISMATCHoptions has an unsupported struct_version.
OCCTL_NOT_FOUNDroot is invalid, removed, or cannot be resolved.
OCCTL_GEOMETRY_INVALIDSectioning failed or produced a null result.
OCCTL_TOPOLOGY_INVALIDThe result could not be ingested into BRepGraph.

\par Thread Safety No. Allocates a new graph.

See also
occtl_topo_make_split_by_plane

◆ occtl_topo_make_split_by_plane()

occtl_status_t occtl_topo_make_split_by_plane ( const occtl_graph_t graph,
const occtl_topo_split_by_plane_options_t options,
occtl_graph_t **  out_graph,
occtl_node_id_t out_root 
)

Splits a shape by a plane and returns selected side(s).

Output is a new graph; the input graph is not modified. Keeping all pieces uses OCCT's splitter with a finite plane face sized from the input bounds. Keeping one side intersects the shape with an OCCT half-space.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_graphOwns it. Receives a new graph on success.
[out]out_rootBorrows it. Receives the split result root NodeId.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny required pointer is NULL or keep is not a supported value.
OCCTL_VERSION_MISMATCHoptions has an unsupported struct_version.
OCCTL_NOT_FOUNDroot is invalid, removed, or cannot be resolved.
OCCTL_GEOMETRY_INVALIDThe split failed or produced a null result.
OCCTL_TOPOLOGY_INVALIDThe result could not be ingested into BRepGraph.

\par Thread Safety No. Allocates a new graph.

See also
occtl_topo_mirrored

◆ occtl_topo_max_fillet_radius()

occtl_status_t occtl_topo_max_fillet_radius ( const occtl_graph_t graph,
const occtl_topo_max_fillet_radius_options_t options,
double *  out_radius 
)

Estimates the largest constant-radius fillet accepted for selected edges.

The input graph is not modified. The estimate is conservative: each trial radius is validated by OCCT BRepFilletAPI_MakeFillet::Build(), and the largest successful trial within options->tolerance is returned.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_radiusBorrows it. Must be non-NULL. Receives the estimated maximum radius.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny required pointer is NULL, edge_count is zero, or a search option is invalid.
OCCTL_VERSION_MISMATCHoptions has an unsupported struct_version.
OCCTL_NOT_FOUNDroot or a selected edge is invalid, removed, or cannot be resolved.
OCCTL_WRONG_KINDA selected NodeId is not an Edge.
OCCTL_GEOMETRY_INVALIDOCCT could not find a successful radius.

\par Thread Safety No. Runs trial OCCT fillet builds.

See also
occtl_topo_blend_edges, occtl_topo_edge_blend_options_init

◆ occtl_topo_max_fillet_radius_options_init()

void occtl_topo_max_fillet_radius_options_init ( occtl_topo_max_fillet_radius_options_t opts)

Initialises opts to default values matching OCCTL_TOPO_MAX_FILLET_RADIUS_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_max_fillet_radius

◆ occtl_topo_mirrored()

occtl_status_t occtl_topo_mirrored ( const occtl_graph_t graph,
occtl_node_id_t  root,
occtl_point3_t  point,
occtl_direction3_t  normal,
occtl_graph_t **  out_graph,
occtl_node_id_t out_root 
)

Creates a mirrored copy of the shape rooted at root across a plane defined by point and normal.

Output is a new graph; the input graph is not modified.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]rootNodeId of the shape to mirror. Must be a valid solid, shell, or compound node.
[in]pointA point on the mirror plane.
[in]normalNormal direction of the mirror plane (must be unit-length).
[out]out_graphOwns it. Must be non-NULL. Receives a newly-allocated graph handle.
[out]out_rootBorrows it. Must be non-NULL. Receives the root NodeId of the mirrored result in *out_graph.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_graph, or out_root is NULL.
OCCTL_NOT_FOUNDroot is invalid, removed, or cannot be resolved to an OCCT shape.
OCCTL_GEOMETRY_INVALIDThe result shape is null.

\par Thread Safety No — allocates a new graph.

◆ occtl_topo_offset_features_options_init()

void occtl_topo_offset_features_options_init ( occtl_topo_offset_features_options_t opts)

Initialises opts to default values matching OCCTL_TOPO_OFFSET_FEATURES_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_make_offset_features

◆ occtl_topo_project_face_along_direction()

occtl_status_t occtl_topo_project_face_along_direction ( const occtl_graph_t graph,
const occtl_topo_project_face_direction_options_t options,
occtl_graph_t **  out_graph,
occtl_node_id_t out_root 
)

Projects a face onto target boundary faces along a fixed direction.

Output is a new graph; the input graph is not modified. Internally OCCT-Light builds a prism from source_face, intersects it with the target boundary faces using OCCT Boolean common, and stores the resulting faces or shells in a fresh BRepGraph. For Solid, CompSolid, and Compound targets, only boundary faces are used, so the operation returns projected surface fragments rather than a volumetric intersection.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_graphOwns it. Receives a new graph on success.
[out]out_rootBorrows it. Receives the projected result root NodeId.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny required pointer is NULL, direction is zero/non-finite, or max_distance is non-finite.
OCCTL_VERSION_MISMATCHoptions has an unsupported struct_version.
OCCTL_NOT_FOUNDsource_face or target is invalid, removed, or cannot be resolved.
OCCTL_WRONG_KINDsource_face is not a Face, or target has no boundary faces.
OCCTL_GEOMETRY_INVALIDProjection failed to produce a result.
OCCTL_TOPOLOGY_INVALIDThe result could not be ingested into BRepGraph.

\par Thread Safety No — allocates a new graph.

See also
occtl_topo_project_on_face

◆ occtl_topo_project_face_direction_options_init()

void occtl_topo_project_face_direction_options_init ( occtl_topo_project_face_direction_options_t opts)

Initialises opts to default values matching OCCTL_TOPO_PROJECT_FACE_DIRECTION_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_project_face_along_direction

◆ occtl_topo_project_on_face()

occtl_status_t occtl_topo_project_on_face ( const occtl_graph_t graph,
const occtl_topo_project_on_face_options_t options,
occtl_graph_t **  out_graph,
occtl_node_id_t out_root 
)

Projects an edge or wire onto a target face along face normals.

Output is a new graph; the input graph is not modified.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_graphOwns it. Receives a new graph on success.
[out]out_rootBorrows it. Receives the projected root NodeId.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny required pointer is NULL, or an option value is outside the supported range.
OCCTL_VERSION_MISMATCHoptions has an unsupported struct_version.
OCCTL_NOT_FOUNDsource or face is invalid, removed, or cannot be resolved.
OCCTL_WRONG_KINDsource is not an Edge or Wire, or face is not a Face.
OCCTL_GEOMETRY_INVALIDProjection failed to produce a result.
OCCTL_TOPOLOGY_INVALIDThe result could not be ingested into BRepGraph.

\par Thread Safety No — allocates a new graph.

See also
occtl_topo_make_filling

◆ occtl_topo_project_on_face_options_init()

void occtl_topo_project_on_face_options_init ( occtl_topo_project_on_face_options_t opts)

Initialises opts to default values matching OCCTL_TOPO_PROJECT_ON_FACE_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_project_on_face

◆ occtl_topo_recompute_same_parameter()

occtl_status_t occtl_topo_recompute_same_parameter ( occtl_graph_t graph,
const occtl_topo_same_parameter_options_t options,
uint32_t *  out_c0_fallback_count,
uint32_t *  out_approx_fallback_count 
)

Recomputes SameParameter on every active edge of graph.

Wraps BRepGraphAlgo_SameParameter::Perform on the full edge set. Tolerance is updated edge-by-edge.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. May be NULL for defaults.
[out]out_c0_fallback_countBorrows it. May be NULL. Receives the number of edges where a C0 BSpline PCurve could not be promoted to C1.
[out]out_approx_fallback_countBorrows it. May be NULL. Receives the number of edges where Approx SameParameter failed.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_VERSION_MISMATCHoptions has an unsupported struct_version.

\par Thread Safety No — mutates the graph.

See also
occtl_topo_sew

◆ occtl_topo_same_parameter_options_init()

void occtl_topo_same_parameter_options_init ( occtl_topo_same_parameter_options_t options)

Initialises options to default values matching OCCTL_TOPO_SEW_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_sew

◆ occtl_topo_section_by_planes_options_init()

void occtl_topo_section_by_planes_options_init ( occtl_topo_section_by_planes_options_t opts)

Initialises opts to default values matching OCCTL_TOPO_SECTION_BY_PLANES_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_make_sections_by_planes

◆ occtl_topo_sew()

occtl_status_t occtl_topo_sew ( occtl_graph_t graph,
const occtl_topo_sew_options_t options,
occtl_topo_sew_result_t out_result 
)

Sews free edges of graph in place.

Wraps BRepGraphAlgo_Sewing::Perform. Caller-allocated options and out_result; both versioned. Pass NULL for options to use the defaults; out_result is optional and may be NULL when the caller does not need diagnostics.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. May be NULL.
[out]out_resultBorrows it. May be NULL. When non-NULL must carry a supported struct_version.
Return values
OCCTL_OKOn success (sewing may still report is_done == 0).
OCCTL_INVALID_ARGUMENTgraph is NULL.
OCCTL_VERSION_MISMATCHoptions or out_result has an unsupported struct_version.

\par Thread Safety No — mutates the graph.

See also
occtl_topo_sew_options_init

◆ occtl_topo_sew_options_init()

void occtl_topo_sew_options_init ( occtl_topo_sew_options_t options)

Initialises options to default values matching OCCTL_TOPO_SEW_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_sew

◆ occtl_topo_sew_result_init()

void occtl_topo_sew_result_init ( occtl_topo_sew_result_t result)

Initialises result to default zeros, ready for filling by occtl_topo_sew.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_sew

◆ occtl_topo_split_by_plane_options_init()

void occtl_topo_split_by_plane_options_init ( occtl_topo_split_by_plane_options_t opts)

Initialises opts to default values matching OCCTL_TOPO_SPLIT_BY_PLANE_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_make_split_by_plane

◆ occtl_topo_transformed()

occtl_status_t occtl_topo_transformed ( const occtl_graph_t graph,
occtl_node_id_t  root,
occtl_transform_t  transform,
occtl_graph_t **  out_graph,
occtl_node_id_t out_root 
)

Creates a transformed copy of the shape rooted at root.

Output is a new graph; the input graph is not modified.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]rootNodeId of the shape to transform.
[in]transformAffine transform to apply.
[out]out_graphOwns it. Receives a new graph on success.
[out]out_rootBorrows it. Receives the transformed root NodeId.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_graph, or out_root is NULL.
OCCTL_NOT_FOUNDroot is invalid, removed, or cannot be resolved.
OCCTL_GEOMETRY_INVALIDThe transformed shape is null.
OCCTL_TOPOLOGY_INVALIDThe result could not be ingested into BRepGraph.

\par Thread Safety No — allocates a new graph.

See also
occtl_topo_blend_edges

◆ occtl_topo_wrap_on_face()

occtl_status_t occtl_topo_wrap_on_face ( const occtl_graph_t graph,
const occtl_topo_wrap_on_face_options_t options,
occtl_graph_t **  out_graph,
occtl_node_id_t out_root 
)

Wraps a planar Edge, Wire, or Face onto a target Face.

Output is a new graph; the input graph is not modified. The result conforms planar input to the target Face.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_graphOwns it. Receives a new graph on success.
[out]out_rootBorrows it. Receives the wrapped result root NodeId.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny required pointer is NULL or an option is invalid.
OCCTL_VERSION_MISMATCHoptions has an unsupported struct_version.
OCCTL_NOT_FOUNDsource or target_face is invalid or removed.
OCCTL_WRONG_KINDsource is not an Edge, Wire, or Face, or target_face is not a Face.
OCCTL_GEOMETRY_INVALIDOCCT could not construct a wrapped result.
OCCTL_TOPOLOGY_INVALIDThe result could not be ingested into the output graph.

\par Thread Safety No. Allocates a new graph and runs OCCT modeling algorithms.

See also
occtl_topo_project_on_face, occtl_topo_make_filling_patch

◆ occtl_topo_wrap_on_face_options_init()

void occtl_topo_wrap_on_face_options_init ( occtl_topo_wrap_on_face_options_t opts)

Initialises opts to default values matching OCCTL_TOPO_WRAP_ON_FACE_OPTIONS_INIT.

NULL-tolerant.

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

\par Thread Safety Yes.

See also
occtl_topo_wrap_on_face