|
OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
|
OCCT-Light: shape healing module. More...


Go to the source code of this file.
Classes | |
| struct | occtl_heal_options |
| struct | occtl_heal_unify_same_domain_options |
Macros | |
| #define | OCCTL_HEAL_OPTIONS_VERSION_1 1u |
| #define | OCCTL_HEAL_OPTIONS_INIT {OCCTL_HEAL_OPTIONS_VERSION_1, NULL, OCCTL_HEAL_MODE_STANDARD, 0.0, 1, 1, 1, 0} |
| #define | OCCTL_HEAL_UNIFY_SAME_DOMAIN_OPTIONS_VERSION_1 1u |
| #define | OCCTL_HEAL_UNIFY_SAME_DOMAIN_OPTIONS_INIT {OCCTL_HEAL_UNIFY_SAME_DOMAIN_OPTIONS_VERSION_1, NULL, 1, 1, 0, 0, 1, 0.0, 0.0} |
Typedefs | |
| typedef enum occtl_heal_mode | occtl_heal_mode_t |
| typedef struct occtl_heal_options | occtl_heal_options_t |
| typedef struct occtl_heal_unify_same_domain_options | occtl_heal_unify_same_domain_options_t |
Enumerations | |
| enum | occtl_heal_mode { OCCTL_HEAL_MODE_BASIC = 0 , OCCTL_HEAL_MODE_STANDARD = 1 , OCCTL_HEAL_MODE_FULL = 2 , OCCTL_HEAL_MODE_RESERVED_FUTURE = 0x7fffffff } |
Functions | |
| void | occtl_heal_options_init (occtl_heal_options_t *options) |
| void | occtl_heal_unify_same_domain_options_init (occtl_heal_unify_same_domain_options_t *options) |
| occtl_status_t | occtl_heal_shape (occtl_graph_t *graph, occtl_node_id_t node_id, const occtl_heal_options_t *options) |
| occtl_status_t | occtl_heal_unify_same_domain (occtl_graph_t *graph, occtl_node_id_t node_id, const occtl_heal_unify_same_domain_options_t *options, occtl_node_id_t *out_root) |
OCCT-Light: shape healing module.
Exposes OCCT's ShapeFix, ShapeAnalysis, ShapeProcess, and ShapeUpgrade toolkits for repairing and validating CAD geometry.
| typedef enum occtl_heal_mode occtl_heal_mode_t |
Healing mode selector.
Controls which family of OCCT repair tools is activated during occtl_heal_shape. Each mode is cumulative — the higher modes include every check from the lower ones.
| typedef struct occtl_heal_options occtl_heal_options_t |
Versioned options for shape healing.
Call occtl_heal_options_init for a runtime fill; use OCCTL_HEAL_OPTIONS_INIT for static zero-cost initialisation. Pass NULL as the options argument to occtl_heal_shape to accept every default.
Versioned options for unifying same-domain edges and faces.
Call occtl_heal_unify_same_domain_options_init for a runtime fill; use OCCTL_HEAL_UNIFY_SAME_DOMAIN_OPTIONS_INIT for static zero-cost initialisation. Pass NULL as the options argument to occtl_heal_unify_same_domain to accept every default.
| enum occtl_heal_mode |
Healing mode selector.
Controls which family of OCCT repair tools is activated during occtl_heal_shape. Each mode is cumulative — the higher modes include every check from the lower ones.
| void occtl_heal_options_init | ( | occtl_heal_options_t * | options | ) |
Runtime initialiser for occtl_heal_options_t.
| [out] | options | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| occtl_status_t occtl_heal_shape | ( | occtl_graph_t * | graph, |
| occtl_node_id_t | node_id, | ||
| const occtl_heal_options_t * | options | ||
| ) |
Performs shape healing on a shape referenced by node_id.
Wraps ShapeFix_Shape from OCCT's TKShHealing toolkit. The healed shape is ingested back into graph as a new topology root (the old node is unaffected). Caller must ensure exclusive access to the graph during the call.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | node_id | Node whose OCCT shape will be healed. The node must resolve to a valid, non-null shape. |
| [in] | options | Borrows it. May be NULL for defaults (OCCTL_HEAL_OPTIONS_INIT). |
| OCCTL_OK | Healing completed (may produce warnings). |
| OCCTL_INVALID_ARGUMENT | graph is NULL; or options has invalid fields (non-NULL p_next, non-finite/negative tolerance, non-0/1 fix flags). |
| OCCTL_NOT_FOUND | node_id does not resolve to a valid shape. |
| OCCTL_VERSION_MISMATCH | Unsupported struct_version in options. |
| OCCTL_OUT_OF_RANGE | options->mode is outside supported enum values. |
| OCCTL_TOPOLOGY_INVALID | The healed result could not be added to the graph. |
\par Thread Safety No — mutates the graph.
| occtl_status_t occtl_heal_unify_same_domain | ( | occtl_graph_t * | graph, |
| occtl_node_id_t | node_id, | ||
| const occtl_heal_unify_same_domain_options_t * | options, | ||
| occtl_node_id_t * | out_root | ||
| ) |
Unifies same-domain edges and faces of a shape.
Wraps OCCT's ShapeUpgrade_UnifySameDomain. The unified shape is ingested back into graph as a new topology root; the original node is unaffected.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | node_id | Node whose OCCT shape will be unified. |
| [in] | options | Borrows it. May be NULL for defaults (OCCTL_HEAL_UNIFY_SAME_DOMAIN_OPTIONS_INIT). |
| [out] | out_root | Borrows it. Receives the new topology root. Must be non-NULL. |
| OCCTL_OK | Shape was unified and ingested. |
| OCCTL_INVALID_ARGUMENT | graph or out_root is NULL; or options has invalid fields (non-NULL p_next, non-0/1 flags, non-finite/negative tolerances). |
| OCCTL_NOT_FOUND | node_id does not resolve to a valid shape. |
| OCCTL_VERSION_MISMATCH | Unsupported struct_version in options. |
| OCCTL_TOPOLOGY_INVALID | The unified result could not be added to the graph. |
\par Thread Safety No — mutates the graph.
| void occtl_heal_unify_same_domain_options_init | ( | occtl_heal_unify_same_domain_options_t * | options | ) |
Runtime initialiser for occtl_heal_unify_same_domain_options_t.
| [out] | options | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.