|
OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
|
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"

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 |
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 } |
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.
| #define OCCTL_TOPO_CIRCULAR_PATTERN_OPTIONS_INIT |
Default-value initialiser for occtl_topo_circular_pattern_options_t.
| #define OCCTL_TOPO_DRAFT_FACES_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.
| #define OCCTL_TOPO_FILLING_OPTIONS_INIT |
| #define OCCTL_TOPO_FILLING_PATCH_OPTIONS_INIT |
| #define OCCTL_TOPO_HLR_OPTIONS_INIT |
| #define OCCTL_TOPO_HLR_RESULT_INIT |
Default-value initialiser for occtl_topo_hlr_result_t.
| #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.
| #define OCCTL_TOPO_MAX_FILLET_RADIUS_OPTIONS_INIT |
| #define OCCTL_TOPO_OFFSET_FEATURES_OPTIONS_INIT |
| #define OCCTL_TOPO_PROJECT_FACE_DIRECTION_OPTIONS_INIT |
| #define OCCTL_TOPO_PROJECT_ON_FACE_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.
| #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.
| #define OCCTL_TOPO_SPLIT_BY_PLANE_OPTIONS_INIT |
| #define OCCTL_TOPO_WRAP_ON_FACE_OPTIONS_INIT |
| typedef struct occtl_topo_check_issue 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).
| typedef enum occtl_topo_check_severity occtl_topo_check_severity_t |
Severity classification for occtl_topo_check_issue_t.
Configuration for occtl_topo_make_circular_pattern.
| typedef struct occtl_topo_defeature_options occtl_topo_defeature_options_t |
Configuration for occtl_topo_defeature.
| typedef struct occtl_topo_draft_faces_options occtl_topo_draft_faces_options_t |
Configuration for occtl_topo_draft_faces.
| typedef struct occtl_topo_edge_blend_options 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.
Configuration for occtl_topo_make_face_extrusion.
| typedef struct occtl_topo_face_to_arcs_options occtl_topo_face_to_arcs_options_t |
Configuration for occtl_topo_face_to_arcs.
| typedef struct occtl_topo_fillet_options 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.
| typedef struct occtl_topo_filling_options occtl_topo_filling_options_t |
Configuration for occtl_topo_make_filling.
| typedef struct occtl_topo_filling_patch_edge occtl_topo_filling_patch_edge_t |
Edge constraint for occtl_topo_make_filling_patch.
Configuration for occtl_topo_make_filling_patch.
| typedef enum occtl_topo_hlr_mode occtl_topo_hlr_mode_t |
Hidden-line removal algorithm used by occtl_topo_make_hlr_projection.
| typedef struct occtl_topo_hlr_options 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.
| typedef struct occtl_topo_hlr_result 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.
Configuration for occtl_topo_make_linear_pattern.
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.
Configuration for occtl_topo_make_offset_features.
| typedef struct occtl_topo_project_face_direction_options occtl_topo_project_face_direction_options_t |
Configuration for occtl_topo_project_face_along_direction.
Configuration for occtl_topo_project_on_face.
Configuration for occtl_topo_recompute_same_parameter.
Configuration for occtl_topo_make_sections_by_planes.
| typedef struct occtl_topo_section_plane occtl_topo_section_plane_t |
One plane used by occtl_topo_make_sections_by_planes.
| typedef struct occtl_topo_sew_options 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.
| typedef struct occtl_topo_sew_result occtl_topo_sew_result_t |
Diagnostic snapshot produced by occtl_topo_sew.
Configuration for occtl_topo_make_split_by_plane.
| typedef struct occtl_topo_wrap_on_face_options 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.
Severity classification for occtl_topo_check_issue_t.
| enum 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_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.
| [in] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_graph | Owns it. Receives a new graph on success. |
| [out] | out_root | Borrows it. Receives the modified root NodeId. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any required pointer is NULL, edge_count is zero, or a distance/radius is invalid. |
| OCCTL_VERSION_MISMATCH | options has an unsupported struct_version. |
| OCCTL_NOT_FOUND | root or a selected edge is invalid, removed, or cannot be resolved. |
| OCCTL_WRONG_KIND | A selected NodeId is not an Edge. |
| OCCTL_GEOMETRY_INVALID | The algorithm failed to produce a valid result. |
| OCCTL_TOPOLOGY_INVALID | The result could not be ingested into BRepGraph. |
\par Thread Safety No — allocates a new graph.
| 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.
| [in] | graph | Must be non-NULL. |
| [out] | out_issues | Borrows it. Length cap. May be NULL on the sizing call. |
| [in] | cap | Capacity of out_issues. |
| [out] | out_count | Borrows it. Receives the total issue count. |
| OCCTL_OK | Success — either sizing or full fill. |
| OCCTL_INVALID_ARGUMENT | graph or out_count is NULL. |
| OCCTL_BUFFER_TOO_SMALL | cap < total issue count and out_issues is non-NULL. |
\par Thread Safety Yes (read-only on graph).
| 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.
| [out] | opts | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| 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.
| [in] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_graph | Owns it. Receives a new graph on success. |
| [out] | out_root | Borrows it. Receives the defeatured root NodeId. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any required pointer is NULL, or selection_count is zero. |
| OCCTL_VERSION_MISMATCH | options has an unsupported struct_version. |
| OCCTL_NOT_FOUND | root or a selected node is invalid, removed, or cannot be resolved. |
| OCCTL_WRONG_KIND | A selected NodeId cannot be expanded to faces. |
| OCCTL_GEOMETRY_INVALID | Defeaturing failed to produce a valid result. |
| OCCTL_TOPOLOGY_INVALID | The result could not be ingested into BRepGraph. |
\par Thread Safety No. Allocates a new graph.
| 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.
| [out] | opts | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| 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.
| [in] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_graph | Owns it. Receives a new graph on success. |
| [out] | out_root | Borrows it. Receives the drafted root NodeId. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any required pointer is NULL, face_count is zero, or angle is zero. |
| OCCTL_VERSION_MISMATCH | options has an unsupported struct_version. |
| OCCTL_NOT_FOUND | root or a selected face is invalid, removed, or cannot be resolved. |
| OCCTL_WRONG_KIND | A selected NodeId is not a Face. |
| OCCTL_GEOMETRY_INVALID | Draft failed to produce a valid result. |
| OCCTL_TOPOLOGY_INVALID | The result could not be ingested into BRepGraph. |
\par Thread Safety No — allocates a new graph.
| 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.
| [out] | opts | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| 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.
| [out] | opts | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| 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.
| [out] | opts | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| 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.
| [in] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_graph | Owns it. Receives a new graph on success. |
| [out] | out_root | Borrows it. Receives the converted Face or Wire root. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any required pointer is NULL, or angular_tolerance is non-positive or non-finite. |
| OCCTL_VERSION_MISMATCH | options has an unsupported struct_version. |
| OCCTL_NOT_FOUND | source is invalid, removed, or cannot be resolved. |
| OCCTL_WRONG_KIND | source is neither Face nor Wire. |
| OCCTL_GEOMETRY_INVALID | OCCT could not build or convert the face. |
| OCCTL_TOPOLOGY_INVALID | The result could not be ingested into the output graph. |
\par Thread Safety No — allocates a new graph.
| 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.
| [out] | opts | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| 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.
| [in] | graph | Borrows it. Must be non-NULL. Provides the input topology (not modified). |
| [in] | opts | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_graph | Owns it. Must be non-NULL. Receives a newly-allocated graph handle. |
| [out] | out_root | Borrows it. Must be non-NULL. Receives the root NodeId of the filleted result in *out_graph. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | graph, opts, out_graph, or out_root is NULL. |
| OCCTL_VERSION_MISMATCH | opts has an unsupported struct_version. |
| OCCTL_GEOMETRY_INVALID | The algorithm failed to produce a valid result (e.g. radius too large for the geometry). |
\par Thread Safety No — allocates a new graph.
| 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.
| [out] | opts | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| 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.
| [out] | opts | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| 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.
| [out] | opts | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| 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.
| [out] | options | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| void occtl_topo_hlr_result_init | ( | occtl_topo_hlr_result_t * | result | ) |
Initialises result to defaults matching OCCTL_TOPO_HLR_RESULT_INIT.
NULL-tolerant.
| [out] | result | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| 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.
| [out] | opts | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| 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.
| [in] | graph | Borrows it. Must be non-NULL. |
| [in] | root | NodeId of the shape to pattern. Must be a valid solid, shell, or compound node. |
| [in] | opts | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_graph | Borrows it. Must be non-NULL. Receives a newly-allocated graph handle (owns it). |
| [out] | out_root | Borrows it. Must be non-NULL. Receives the root NodeId of the resulting compound in *out_graph. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | graph, opts, out_graph, or out_root is NULL. |
| OCCTL_VERSION_MISMATCH | opts has an unsupported struct_version. |
| OCCTL_NOT_FOUND | root is invalid or removed. |
| OCCTL_GEOMETRY_INVALID | The result compound is null. |
\par Thread Safety No — allocates a new graph.
| 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.
| [in] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_graph | Owns it. Receives a new graph on success. |
| [out] | out_root | Borrows it. Receives the extrude result root NodeId. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any required pointer is NULL, face_count is zero, thickness is non-positive, or normal is invalid when requested. |
| OCCTL_VERSION_MISMATCH | options has an unsupported struct_version. |
| OCCTL_NOT_FOUND | A selected face is invalid, removed, or cannot be resolved. |
| OCCTL_WRONG_KIND | A selected NodeId is not a Face. |
| OCCTL_GEOMETRY_INVALID | Extrusion failed or a face normal could not be evaluated. |
| OCCTL_TOPOLOGY_INVALID | The result could not be ingested into BRepGraph. |
\par Thread Safety No. Allocates a new graph.
| 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.
| [in] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_graph | Owns it. Receives a new graph on success. |
| [out] | out_root | Borrows it. Receives the filling face root NodeId. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any required pointer is NULL, edge_count is less than 2, or a solver option is invalid. |
| OCCTL_VERSION_MISMATCH | options has an unsupported struct_version. |
| OCCTL_NOT_FOUND | A selected edge is invalid, removed, or cannot be resolved. |
| OCCTL_WRONG_KIND | A selected NodeId is not an Edge. |
| OCCTL_GEOMETRY_INVALID | Filling failed to produce a valid result. |
| OCCTL_TOPOLOGY_INVALID | The result could not be ingested into BRepGraph. |
\par Thread Safety No — allocates a new graph.
| 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.
| [in] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_graph | Owns it. Receives a new graph on success. |
| [out] | out_root | Borrows it. Receives the filling patch face root NodeId. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any 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_MISMATCH | options has an unsupported struct_version. |
| OCCTL_NOT_FOUND | A selected edge or support face is invalid, removed, or cannot be resolved. |
| OCCTL_WRONG_KIND | A selected edge is not an Edge, or a support node is not a Face. |
| OCCTL_GEOMETRY_INVALID | Filling failed to produce a valid result. |
| OCCTL_TOPOLOGY_INVALID | The result could not be ingested into BRepGraph. |
\par Thread Safety No — allocates a new graph.
| 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.
| [in] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_result | Borrows it. Receives an owned output graph and category roots. Must be non-NULL. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | A required pointer is NULL, p_next is non-NULL, or an option value is invalid. |
| OCCTL_VERSION_MISMATCH | options has an unsupported struct_version. |
| OCCTL_NOT_FOUND | root is invalid, removed, or cannot be resolved. |
| OCCTL_GEOMETRY_INVALID | OCCT HLR produced no requested edge category. |
| OCCTL_TOPOLOGY_INVALID | A projected category could not be ingested into the output graph. |
\par Thread Safety No. Allocates a new graph and runs OCCT HLR algorithms.
| 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.
| [in] | graph | Borrows it. Must be non-NULL. |
| [in] | root | NodeId of the shape to pattern. Must be a valid solid, shell, or compound node. |
| [in] | opts | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_graph | Borrows it. Must be non-NULL. Receives a newly-allocated graph handle (owns it). |
| [out] | out_root | Borrows it. Must be non-NULL. Receives the root NodeId of the resulting compound in *out_graph. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | graph, opts, out_graph, or out_root is NULL. |
| OCCTL_VERSION_MISMATCH | opts has an unsupported struct_version. |
| OCCTL_NOT_FOUND | root is invalid or removed. |
| OCCTL_GEOMETRY_INVALID | The result compound is null. |
\par Thread Safety No — allocates a new graph.
| 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.
| [in] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_graph | Owns it. Receives a new graph on success. |
| [out] | out_root | Borrows it. Receives the offset result root NodeId. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any required pointer is NULL, selection_count is zero, tolerance is non-positive, or both offsets are zero. |
| OCCTL_VERSION_MISMATCH | options has an unsupported struct_version. |
| OCCTL_NOT_FOUND | root or a selected node is invalid, removed, or cannot be resolved. |
| OCCTL_WRONG_KIND | A selected NodeId cannot be expanded to faces. |
| OCCTL_GEOMETRY_INVALID | Offset failed to produce a valid result. |
| OCCTL_TOPOLOGY_INVALID | The result could not be ingested into BRepGraph. |
\par Thread Safety No. Allocates a new graph.
| 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.
| [in] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_graph | Owns it. Receives a new graph on success. |
| [out] | out_root | Borrows it. Receives the section result root NodeId. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any required pointer is NULL or plane_count is zero. |
| OCCTL_VERSION_MISMATCH | options has an unsupported struct_version. |
| OCCTL_NOT_FOUND | root is invalid, removed, or cannot be resolved. |
| OCCTL_GEOMETRY_INVALID | Sectioning failed or produced a null result. |
| OCCTL_TOPOLOGY_INVALID | The result could not be ingested into BRepGraph. |
\par Thread Safety No. Allocates a new graph.
| 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.
| [in] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_graph | Owns it. Receives a new graph on success. |
| [out] | out_root | Borrows it. Receives the split result root NodeId. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any required pointer is NULL or keep is not a supported value. |
| OCCTL_VERSION_MISMATCH | options has an unsupported struct_version. |
| OCCTL_NOT_FOUND | root is invalid, removed, or cannot be resolved. |
| OCCTL_GEOMETRY_INVALID | The split failed or produced a null result. |
| OCCTL_TOPOLOGY_INVALID | The result could not be ingested into BRepGraph. |
\par Thread Safety No. Allocates a new graph.
| 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.
| [in] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_radius | Borrows it. Must be non-NULL. Receives the estimated maximum radius. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any required pointer is NULL, edge_count is zero, or a search option is invalid. |
| OCCTL_VERSION_MISMATCH | options has an unsupported struct_version. |
| OCCTL_NOT_FOUND | root or a selected edge is invalid, removed, or cannot be resolved. |
| OCCTL_WRONG_KIND | A selected NodeId is not an Edge. |
| OCCTL_GEOMETRY_INVALID | OCCT could not find a successful radius. |
\par Thread Safety No. Runs trial OCCT fillet builds.
| 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.
| [out] | opts | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| 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.
| [in] | graph | Borrows it. Must be non-NULL. |
| [in] | root | NodeId of the shape to mirror. Must be a valid solid, shell, or compound node. |
| [in] | point | A point on the mirror plane. |
| [in] | normal | Normal direction of the mirror plane (must be unit-length). |
| [out] | out_graph | Owns it. Must be non-NULL. Receives a newly-allocated graph handle. |
| [out] | out_root | Borrows it. Must be non-NULL. Receives the root NodeId of the mirrored result in *out_graph. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | graph, out_graph, or out_root is NULL. |
| OCCTL_NOT_FOUND | root is invalid, removed, or cannot be resolved to an OCCT shape. |
| OCCTL_GEOMETRY_INVALID | The result shape is null. |
\par Thread Safety No — allocates a new graph.
| 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.
| [out] | opts | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| 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.
| [in] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_graph | Owns it. Receives a new graph on success. |
| [out] | out_root | Borrows it. Receives the projected result root NodeId. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any required pointer is NULL, direction is zero/non-finite, or max_distance is non-finite. |
| OCCTL_VERSION_MISMATCH | options has an unsupported struct_version. |
| OCCTL_NOT_FOUND | source_face or target is invalid, removed, or cannot be resolved. |
| OCCTL_WRONG_KIND | source_face is not a Face, or target has no boundary faces. |
| OCCTL_GEOMETRY_INVALID | Projection failed to produce a result. |
| OCCTL_TOPOLOGY_INVALID | The result could not be ingested into BRepGraph. |
\par Thread Safety No — allocates a new graph.
| 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.
| [out] | opts | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| 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.
| [in] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_graph | Owns it. Receives a new graph on success. |
| [out] | out_root | Borrows it. Receives the projected root NodeId. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any required pointer is NULL, or an option value is outside the supported range. |
| OCCTL_VERSION_MISMATCH | options has an unsupported struct_version. |
| OCCTL_NOT_FOUND | source or face is invalid, removed, or cannot be resolved. |
| OCCTL_WRONG_KIND | source is not an Edge or Wire, or face is not a Face. |
| OCCTL_GEOMETRY_INVALID | Projection failed to produce a result. |
| OCCTL_TOPOLOGY_INVALID | The result could not be ingested into BRepGraph. |
\par Thread Safety No — allocates a new graph.
| 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.
| [out] | opts | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| 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.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. May be NULL for defaults. |
| [out] | out_c0_fallback_count | Borrows it. May be NULL. Receives the number of edges where a C0 BSpline PCurve could not be promoted to C1. |
| [out] | out_approx_fallback_count | Borrows it. May be NULL. Receives the number of edges where Approx SameParameter failed. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | graph is NULL. |
| OCCTL_VERSION_MISMATCH | options has an unsupported struct_version. |
\par Thread Safety No — mutates the graph.
| 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.
| [out] | options | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| 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.
| [out] | opts | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| 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.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. May be NULL. |
| [out] | out_result | Borrows it. May be NULL. When non-NULL must carry a supported struct_version. |
| OCCTL_OK | On success (sewing may still report is_done == 0). |
| OCCTL_INVALID_ARGUMENT | graph is NULL. |
| OCCTL_VERSION_MISMATCH | options or out_result has an unsupported struct_version. |
\par Thread Safety No — mutates the graph.
| 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.
| [out] | options | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| 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.
| [out] | result | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| 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.
| [out] | opts | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| 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.
| [in] | graph | Borrows it. Must be non-NULL. |
| [in] | root | NodeId of the shape to transform. |
| [in] | transform | Affine transform to apply. |
| [out] | out_graph | Owns it. Receives a new graph on success. |
| [out] | out_root | Borrows it. Receives the transformed root NodeId. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | graph, out_graph, or out_root is NULL. |
| OCCTL_NOT_FOUND | root is invalid, removed, or cannot be resolved. |
| OCCTL_GEOMETRY_INVALID | The transformed shape is null. |
| OCCTL_TOPOLOGY_INVALID | The result could not be ingested into BRepGraph. |
\par Thread Safety No — allocates a new graph.
| 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.
| [in] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_graph | Owns it. Receives a new graph on success. |
| [out] | out_root | Borrows it. Receives the wrapped result root NodeId. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any required pointer is NULL or an option is invalid. |
| OCCTL_VERSION_MISMATCH | options has an unsupported struct_version. |
| OCCTL_NOT_FOUND | source or target_face is invalid or removed. |
| OCCTL_WRONG_KIND | source is not an Edge, Wire, or Face, or target_face is not a Face. |
| OCCTL_GEOMETRY_INVALID | OCCT could not construct a wrapped result. |
| OCCTL_TOPOLOGY_INVALID | The result could not be ingested into the output graph. |
\par Thread Safety No. Allocates a new graph and runs OCCT modeling algorithms.
| 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.
| [out] | opts | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.