|
OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
|
OCCT-Light: feature and recipe-based model construction API. More...
#include "occtl_core.h"#include "occtl_curves2d.h"#include "occtl_geom.h"#include "occtl_surfaces.h"#include "occtl_topo.h"

Go to the source code of this file.
Classes | |
| struct | occtl_prim_face_from_surface_options |
| struct | occtl_prim_face_from_point_grid_options |
| struct | occtl_prim_face_from_boundary_curves_options |
| struct | occtl_prim_face_from_curve_grid_options |
| struct | occtl_prim_brake_formed_options |
| struct | occtl_prim_draft_prism_info |
| struct | occtl_prim_extrude_tapered_info |
| struct | occtl_prim_ruled_surface_info |
| struct | occtl_prim_feat_prism_info |
| struct | occtl_prim_extrude_until_info |
| struct | occtl_prim_feat_draft_prism_info |
| struct | occtl_prim_cylindrical_hole_info |
Macros | |
| #define | OCCTL_PRIM_FACE_FROM_SURFACE_OPTIONS_VERSION_1 1u |
| #define | OCCTL_PRIM_FACE_FROM_SURFACE_OPTIONS_INIT |
| #define | OCCTL_PRIM_FACE_FROM_POINT_GRID_OPTIONS_VERSION_1 1u |
| #define | OCCTL_PRIM_FACE_FROM_POINT_GRID_OPTIONS_INIT |
| #define | OCCTL_PRIM_FACE_FROM_BOUNDARY_CURVES_OPTIONS_VERSION_1 1u |
| #define | OCCTL_PRIM_FACE_FROM_BOUNDARY_CURVES_OPTIONS_INIT |
| #define | OCCTL_PRIM_FACE_FROM_CURVE_GRID_OPTIONS_VERSION_1 1u |
| #define | OCCTL_PRIM_FACE_FROM_CURVE_GRID_OPTIONS_INIT |
| #define | OCCTL_PRIM_BRAKE_FORMED_OPTIONS_VERSION_1 1u |
| #define | OCCTL_PRIM_BRAKE_FORMED_OPTIONS_INIT |
| #define | OCCTL_PRIM_DRAFT_PRISM_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_DRAFT_PRISM_INFO_INIT {OCCTL_PRIM_DRAFT_PRISM_INFO_VERSION_1, NULL, OCCTL_NODE_ID_INVALID, 1.0, 0.0} |
| #define | OCCTL_PRIM_EXTRUDE_TAPERED_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_EXTRUDE_TAPERED_INFO_INIT {OCCTL_PRIM_EXTRUDE_TAPERED_INFO_VERSION_1, NULL, OCCTL_NODE_ID_INVALID, 1.0, 0.0} |
| #define | OCCTL_PRIM_RULED_SURFACE_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_RULED_SURFACE_INFO_INIT {OCCTL_PRIM_RULED_SURFACE_INFO_VERSION_1, NULL, OCCTL_NODE_ID_INVALID, OCCTL_NODE_ID_INVALID} |
| #define | OCCTL_PRIM_FEAT_PRISM_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_FEAT_PRISM_INFO_INIT |
| #define | OCCTL_PRIM_EXTRUDE_UNTIL_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_EXTRUDE_UNTIL_INFO_INIT |
| #define | OCCTL_PRIM_FEAT_DRAFT_PRISM_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_FEAT_DRAFT_PRISM_INFO_INIT |
| #define | OCCTL_PRIM_CYLINDRICAL_HOLE_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_CYLINDRICAL_HOLE_INFO_INIT |
Enumerations | |
| enum | occtl_prim_brake_side { OCCTL_PRIM_BRAKE_SIDE_LEFT = 0 , OCCTL_PRIM_BRAKE_SIDE_RIGHT = 1 , OCCTL_PRIM_BRAKE_SIDE_RESERVED_FUTURE = 0x7fffffff } |
| enum | occtl_prim_until_kind { OCCTL_UNTIL_LENGTH = 0 , OCCTL_UNTIL_SHAPE = 1 , OCCTL_UNTIL_THRU_ALL = 2 , OCCTL_UNTIL_HEIGHT = 3 , OCCTL_UNTIL_RESERVED_FUTURE = 0x7fffffff } |
| enum | occtl_prim_feat_combine { OCCTL_FEAT_SEPARATE = 0 , OCCTL_FEAT_CUT = 1 , OCCTL_FEAT_FUSE = 2 , OCCTL_FEAT_COMBINE_RESERVED_FUTURE = 0x7fffffff } |
| enum | occtl_prim_extrude_until_side { OCCTL_EXTRUDE_UNTIL_NEXT = 0 , OCCTL_EXTRUDE_UNTIL_LAST = 1 , OCCTL_EXTRUDE_UNTIL_PREVIOUS = 2 , OCCTL_EXTRUDE_UNTIL_FIRST = 3 , OCCTL_EXTRUDE_UNTIL_RESERVED_FUTURE = 0x7fffffff } |
| enum | occtl_prim_cylindrical_hole_kind { OCCTL_CYLINDRICAL_HOLE_THROUGH_ALL , OCCTL_CYLINDRICAL_HOLE_BETWEEN_PARAMS , OCCTL_CYLINDRICAL_HOLE_THRU_NEXT = 2 , OCCTL_CYLINDRICAL_HOLE_UNTIL_END = 3 , OCCTL_CYLINDRICAL_HOLE_BLIND = 4 , OCCTL_CYLINDRICAL_HOLE_RESERVED_FUTURE = 0x7fffffff } |
OCCT-Light: feature and recipe-based model construction API.
| #define OCCTL_PRIM_BRAKE_FORMED_OPTIONS_INIT |
| #define OCCTL_PRIM_CYLINDRICAL_HOLE_INFO_INIT |
| #define OCCTL_PRIM_EXTRUDE_UNTIL_INFO_INIT |
| #define OCCTL_PRIM_FACE_FROM_BOUNDARY_CURVES_OPTIONS_INIT |
| #define OCCTL_PRIM_FACE_FROM_CURVE_GRID_OPTIONS_INIT |
| #define OCCTL_PRIM_FACE_FROM_POINT_GRID_OPTIONS_INIT |
| #define OCCTL_PRIM_FACE_FROM_SURFACE_OPTIONS_INIT |
| #define OCCTL_PRIM_FEAT_DRAFT_PRISM_INFO_INIT |
| #define OCCTL_PRIM_FEAT_PRISM_INFO_INIT |
| typedef struct occtl_prim_brake_formed_options occtl_prim_brake_formed_options_t |
Configuration for occtl_prim_make_brake_formed.
Builds a sheet-metal style solid from a planar bend line. station_widths may contain one width reused for every bend-line station, or one width per station vertex in line.
| typedef enum occtl_prim_brake_side occtl_prim_brake_side_t |
Offset side for occtl_prim_make_brake_formed.
Info for occtl_prim_make_cylindrical_hole.
Cuts one cylindrical hole feature from base_shape. axis.location is the start point for directed modes and axis.direction gives the drilling direction. The result is inserted as a new topology root; the input body is left unchanged in the graph.
Cylindrical-hole termination mode for occtl_prim_make_cylindrical_hole.
Selects how far the cylindrical cutting volume extends along the supplied axis. The default through-all mode cuts with an infinite cylinder.
| typedef struct occtl_prim_draft_prism_info occtl_prim_draft_prism_info_t |
Info for occtl_prim_make_draft_prism.
Builds a tapered solid from one planar Face using OCCT LocOpe_DPrism. This is the accurate fast path for draft/tapered extrusion of a single closed profile.
| typedef struct occtl_prim_extrude_tapered_info occtl_prim_extrude_tapered_info_t |
Info for occtl_prim_make_extrude_tapered.
Semantic wrapper for tapered extrusion of one Face profile. The taper follows the profile Face normal.
| typedef struct occtl_prim_extrude_until_info occtl_prim_extrude_until_info_t |
Info for occtl_prim_make_extrude_until.
Builds a feature extrusion from profile on base_shape until target_shape. FIRST/PREVIOUS map to the opposite of direction, and NEXT/LAST map to direction.
Target side for occtl_prim_make_extrude_until.
| typedef struct occtl_prim_face_from_boundary_curves_options occtl_prim_face_from_boundary_curves_options_t |
Configuration for occtl_prim_make_face_from_boundary_curves.
Builds a B-spline surface from two, three, or four contiguous boundary curves and inserts a Face using the generated surface's natural bounds.
Configuration for occtl_prim_make_face_from_curve_grid.
Builds a Gordon B-spline surface from an intersecting U/V curve network and inserts a Face using the generated surface's natural bounds.
Configuration for occtl_prim_make_face_from_point_grid.
Builds a B-spline surface from a row-major point grid and inserts a Face using the generated surface's natural bounds. This is the graph-facing counterpart to occtl_surface_create_from_point_grid.
Configuration for occtl_prim_make_face_from_surface.
Builds a Face from a surface rep and optional boundary wires. When outer_wire is invalid, no boundary wires may be supplied and OCCT builds a face from the surface's natural bounds. When outer_wire is valid, it is used as the outer boundary and inner_wires, if any, are added as holes.
| typedef enum occtl_prim_feat_combine occtl_prim_feat_combine_t |
Combine-mode for feature operations.
Controls how the produced material interacts with the base shape.
Info for occtl_prim_make_feat_draft_prism.
Builds a draft prism feature on an existing body. Unlike occtl_prim_make_draft_prism, this operation delegates to OCCT BRepFeat_MakeDPrism and combines the tapered feature with base_shape.
| typedef struct occtl_prim_feat_prism_info occtl_prim_feat_prism_info_t |
Info for occtl_prim_make_feat_prism.
Builds a feature prism on an existing body: extrudes profile and combines the result with base_shape (fuse / cut / separate). Supports termination by target shape or height.
| typedef struct occtl_prim_ruled_surface_info occtl_prim_ruled_surface_info_t |
Info for occtl_prim_make_ruled_surface.
Builds a ruled surface between two existing graph sections using OCCT BRepFill. Both sections must have the same topological kind: Edge + Edge produces a Face, while Wire + Wire produces a Shell.
| typedef enum occtl_prim_until_kind occtl_prim_until_kind_t |
Until-mode for occtl_prim_make_feat_prism.
Selects how the extrusion is terminated (fixed length, until a target shape, all the way through, or until a target capped at a length).
Offset side for occtl_prim_make_brake_formed.
| Enumerator | |
|---|---|
| OCCTL_PRIM_BRAKE_SIDE_LEFT | Offset to OCCT's positive planar-wire side. |
| OCCTL_PRIM_BRAKE_SIDE_RIGHT | Offset to OCCT's negative planar-wire side. |
Cylindrical-hole termination mode for occtl_prim_make_cylindrical_hole.
Selects how far the cylindrical cutting volume extends along the supplied axis. The default through-all mode cuts with an infinite cylinder.
Target side for occtl_prim_make_extrude_until.
Combine-mode for feature operations.
Controls how the produced material interacts with the base shape.
Until-mode for occtl_prim_make_feat_prism.
Selects how the extrusion is terminated (fixed length, until a target shape, all the way through, or until a target capped at a length).
| void occtl_prim_brake_formed_options_init | ( | occtl_prim_brake_formed_options_t * | opts | ) |
Initialises opts to default values matching OCCTL_PRIM_BRAKE_FORMED_OPTIONS_INIT.
NULL-tolerant.
| [out] | opts | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| void occtl_prim_cylindrical_hole_info_init | ( | occtl_prim_cylindrical_hole_info_t * | info | ) |
Runtime initialiser for occtl_prim_cylindrical_hole_info_t.
Sets all fields to OCCTL_PRIM_CYLINDRICAL_HOLE_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_draft_prism_info_init | ( | occtl_prim_draft_prism_info_t * | info | ) |
Runtime initialiser for occtl_prim_draft_prism_info_t.
Sets all fields to OCCTL_PRIM_DRAFT_PRISM_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_extrude_tapered_info_init | ( | occtl_prim_extrude_tapered_info_t * | info | ) |
Runtime initialiser for occtl_prim_extrude_tapered_info_t.
Sets all fields to OCCTL_PRIM_EXTRUDE_TAPERED_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_extrude_until_info_init | ( | occtl_prim_extrude_until_info_t * | info | ) |
Runtime initialiser for occtl_prim_extrude_until_info_t.
Sets all fields to OCCTL_PRIM_EXTRUDE_UNTIL_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_face_from_boundary_curves_options_init | ( | occtl_prim_face_from_boundary_curves_options_t * | options | ) |
Initialises options to defaults matching OCCTL_PRIM_FACE_FROM_BOUNDARY_CURVES_OPTIONS_INIT.
NULL-tolerant.
| [out] | options | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| void occtl_prim_face_from_curve_grid_options_init | ( | occtl_prim_face_from_curve_grid_options_t * | options | ) |
Initialises options to defaults matching OCCTL_PRIM_FACE_FROM_CURVE_GRID_OPTIONS_INIT.
NULL-tolerant.
| [out] | options | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| void occtl_prim_face_from_point_grid_options_init | ( | occtl_prim_face_from_point_grid_options_t * | options | ) |
Initialises options to defaults matching OCCTL_PRIM_FACE_FROM_POINT_GRID_OPTIONS_INIT.
NULL-tolerant.
| [out] | options | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| void occtl_prim_face_from_surface_options_init | ( | occtl_prim_face_from_surface_options_t * | options | ) |
Initialises options to defaults matching OCCTL_PRIM_FACE_FROM_SURFACE_OPTIONS_INIT.
NULL-tolerant.
| [out] | options | Borrows it. May be NULL (no-op). |
\par Thread Safety Yes.
| void occtl_prim_feat_draft_prism_info_init | ( | occtl_prim_feat_draft_prism_info_t * | info | ) |
Runtime initialiser for occtl_prim_feat_draft_prism_info_t.
Sets all fields to OCCTL_PRIM_FEAT_DRAFT_PRISM_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_feat_prism_info_init | ( | occtl_prim_feat_prism_info_t * | info | ) |
Runtime initialiser for occtl_prim_feat_prism_info_t.
Sets all fields to OCCTL_PRIM_FEAT_PRISM_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| occtl_status_t occtl_prim_make_brake_formed | ( | const occtl_graph_t * | graph, |
| const occtl_prim_brake_formed_options_t * | options, | ||
| occtl_graph_t ** | out_graph, | ||
| occtl_node_id_t * | out_root | ||
| ) |
Builds a sheet-metal brake-formed solid from a planar bend line.
The operation offsets line by thickness, creates station sections between the original and offset stations, extends those sections by the supplied station widths, and delegates solid skinning to OCCT.
| [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 brake-formed Solid NodeId. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any required pointer is NULL, p_next is non-NULL, thickness / tolerance / widths are invalid, or side / join flags are unknown. |
| OCCTL_VERSION_MISMATCH | options has an unsupported struct_version. |
| OCCTL_NOT_FOUND | line is invalid or removed. |
| OCCTL_WRONG_KIND | line is neither an Edge nor a Wire. |
| OCCTL_GEOMETRY_INVALID | Offset, station construction, or solid skinning failed. |
| OCCTL_TOPOLOGY_INVALID | The result could not be ingested into the output graph. |
\par Thread Safety No. Allocates a new graph.
| occtl_status_t occtl_prim_make_cylindrical_hole | ( | occtl_graph_t * | graph, |
| const occtl_prim_cylindrical_hole_info_t * | info, | ||
| occtl_node_id_t * | out_shape | ||
| ) |
Cuts a cylindrical hole feature into an existing shape.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_shape | Borrows it. Must be non-NULL. On success receives the new Shape NodeId; on failure set to OCCTL_NODE_ID_INVALID. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL, p_next is non-NULL, axis contains non-finite components, with_control is not 0/1, radius is non-positive, axis.direction has zero length, p_from or p_to is non-finite, p_to <= p_from in BETWEEN_PARAMS mode, length is non-positive in BLIND mode, or kind is unknown. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_NOT_FOUND | base_shape refers to a removed / absent node. |
| OCCTL_GEOMETRY_INVALID | OCCT rejected the hole placement or failed to build the feature. |
| OCCTL_TOPOLOGY_INVALID | The resulting topology was rejected. |
| OCCTL_INTERNAL | An unexpected internal error occurred. |
\par Thread Safety No.
| occtl_status_t occtl_prim_make_draft_prism | ( | occtl_graph_t * | graph, |
| const occtl_prim_draft_prism_info_t * | info, | ||
| occtl_node_id_t * | out_shape | ||
| ) |
Builds a tapered prism solid from one Face profile.
The result is inserted into graph as a new topology root. The input profile is not modified.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_shape | Borrows it. Must be non-NULL. On success receives the new Solid NodeId; on failure set to OCCTL_NODE_ID_INVALID. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL, or height is non-positive. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_NOT_FOUND | profile refers to a removed / absent node. |
| OCCTL_WRONG_KIND | profile is not a Face. |
| OCCTL_GEOMETRY_INVALID | OCCT rejected the draft prism. |
| OCCTL_TOPOLOGY_INVALID | The resulting topology was rejected. |
| OCCTL_INTERNAL | An unexpected internal error occurred. |
\par Thread Safety No.
| occtl_status_t occtl_prim_make_extrude_tapered | ( | occtl_graph_t * | graph, |
| const occtl_prim_extrude_tapered_info_t * | info, | ||
| occtl_node_id_t * | out_shape | ||
| ) |
Builds a tapered extrusion from one Face profile.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_shape | Borrows it. Must be non-NULL. On success receives the new Solid NodeId. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL, p_next is non-NULL, or height is non-positive. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_NOT_FOUND | profile_face refers to a removed / absent node. |
| OCCTL_WRONG_KIND | profile_face is not a Face. |
| OCCTL_GEOMETRY_INVALID | OCCT rejected the tapered extrusion. |
| OCCTL_TOPOLOGY_INVALID | The resulting topology was rejected. |
| OCCTL_INTERNAL | An unexpected internal error occurred. |
\par Thread Safety No.
| occtl_status_t occtl_prim_make_extrude_until | ( | occtl_graph_t * | graph, |
| const occtl_prim_extrude_until_info_t * | info, | ||
| occtl_node_id_t * | out_shape | ||
| ) |
Builds a feature extrusion until a target shape.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_shape | Borrows it. Must be non-NULL. On success receives the new Shape NodeId. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL, p_next is non-NULL, direction is zero, side / combine / modify is invalid, or limit is negative. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_NOT_FOUND | A node id refers to a removed / absent node. |
| OCCTL_WRONG_KIND | sketch_face is not a Face. |
| OCCTL_GEOMETRY_INVALID | OCCT rejected the feature extrusion. |
| OCCTL_TOPOLOGY_INVALID | The resulting topology was rejected. |
| OCCTL_INTERNAL | An unexpected internal error occurred. |
\par Thread Safety No.
| occtl_status_t occtl_prim_make_face_from_boundary_curves | ( | occtl_graph_t * | graph, |
| const occtl_prim_face_from_boundary_curves_options_t * | options, | ||
| occtl_node_id_t * | out_face | ||
| ) |
Builds a graph Face directly from boundary-curve surface filling.
The operation delegates surface construction to OCCT through occtl_surface_create_from_boundary_curves, delegates face construction to OCCT, and inserts the resulting Face topology into graph.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_face | Borrows it. Must be non-NULL. Receives the new Face. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | A required pointer is NULL, p_next is non-NULL, tolerance is invalid, or the embedded boundary-curve options are invalid. |
| OCCTL_VERSION_MISMATCH | options or the embedded surface options have an unsupported struct_version. |
| OCCTL_GEOMETRY_INVALID | OCCT rejected the boundary curves or face build. |
| OCCTL_TOPOLOGY_INVALID | The result could not be ingested as a Face. |
| OCCTL_OUT_OF_MEMORY | Allocation failed. |
\par Thread Safety No (mutates graph).
| occtl_status_t occtl_prim_make_face_from_curve_grid | ( | occtl_graph_t * | graph, |
| const occtl_prim_face_from_curve_grid_options_t * | options, | ||
| occtl_node_id_t * | out_face | ||
| ) |
Builds a graph Face directly from a curve-grid Gordon surface.
The operation delegates surface construction to OCCT through occtl_surface_create_from_curve_grid, delegates face construction to OCCT, and inserts the resulting Face topology into graph.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_face | Borrows it. Must be non-NULL. Receives the new Face. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | A required pointer is NULL, p_next is non-NULL, tolerance is invalid, or the embedded curve-grid options are invalid. |
| OCCTL_VERSION_MISMATCH | options or the embedded surface options have an unsupported struct_version. |
| OCCTL_GEOMETRY_INVALID | OCCT rejected the curve grid or face build. |
| OCCTL_TOPOLOGY_INVALID | The result could not be ingested as a Face. |
| OCCTL_OUT_OF_MEMORY | Allocation failed. |
\par Thread Safety No (mutates graph).
| occtl_status_t occtl_prim_make_face_from_point_grid | ( | occtl_graph_t * | graph, |
| const occtl_prim_face_from_point_grid_options_t * | options, | ||
| occtl_node_id_t * | out_face | ||
| ) |
Builds a graph Face directly from a point-grid B-spline surface.
The operation delegates surface fitting to OCCT through occtl_surface_create_from_point_grid, delegates face construction to OCCT, and inserts the resulting Face topology into graph.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_face | Borrows it. Must be non-NULL. Receives the new Face. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | A required pointer is NULL, p_next is non-NULL, tolerance is invalid, or the embedded point-grid surface options are invalid. |
| OCCTL_VERSION_MISMATCH | options or the embedded surface options have an unsupported struct_version. |
| OCCTL_GEOMETRY_INVALID | OCCT rejected the point grid or face build. |
| OCCTL_TOPOLOGY_INVALID | The result could not be ingested as a Face. |
| OCCTL_OUT_OF_MEMORY | Allocation failed. |
\par Thread Safety No (mutates graph).
| occtl_status_t occtl_prim_make_face_from_surface | ( | occtl_graph_t * | graph, |
| const occtl_prim_face_from_surface_options_t * | options, | ||
| occtl_node_id_t * | out_face | ||
| ) |
Builds a Face from a surface handle and optional boundary wires.
The operation inserts a Face node into graph from a graph-owned surface rep and optional boundary Wires. The source surface handle and boundary wires are not modified.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | options | Borrows it. Must be non-NULL and carry a supported struct_version. |
| [out] | out_face | Borrows it. Must be non-NULL. Receives the new Face. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | A required pointer is NULL, p_next is non-NULL, tolerance is invalid, or inner wires are supplied without an outer wire. |
| OCCTL_VERSION_MISMATCH | options has an unsupported struct_version. |
| OCCTL_NOT_FOUND | A boundary Wire node is invalid or removed. |
| OCCTL_WRONG_KIND | A boundary node is not a Wire. |
| OCCTL_GEOMETRY_INVALID | OCCT rejected the surface/wire combination. |
| OCCTL_TOPOLOGY_INVALID | The result could not be ingested as a Face. |
\par Thread Safety No (mutates graph).
| occtl_status_t occtl_prim_make_feat_draft_prism | ( | occtl_graph_t * | graph, |
| const occtl_prim_feat_draft_prism_info_t * | info, | ||
| occtl_node_id_t * | out_shape | ||
| ) |
Builds a draft-prism feature on an existing body.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version and NULL p_next. |
| [out] | out_shape | Borrows it. Must be non-NULL. On success receives the new Shape NodeId; on failure set to OCCTL_NODE_ID_INVALID. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL, p_next is non-NULL, length is non-positive for LENGTH/HEIGHT modes, taper_angle is not finite, or an enum value is unknown. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_NOT_FOUND | A node id refers to a removed / absent node. |
| OCCTL_WRONG_KIND | profile_face or sketch_face is not a Face, or until_shape is required but has wrong kind. |
| OCCTL_GEOMETRY_INVALID | Construction failed. |
| OCCTL_TOPOLOGY_INVALID | The resulting topology was rejected. |
| OCCTL_INTERNAL | An unexpected internal error occurred. |
\par Thread Safety No.
| occtl_status_t occtl_prim_make_feat_prism | ( | occtl_graph_t * | graph, |
| const occtl_prim_feat_prism_info_t * | info, | ||
| occtl_node_id_t * | out_shape | ||
| ) |
Builds a feature prism — the canonical "extrude profile on existing body until …" operation.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_shape | Borrows it. Must be non-NULL. On success receives the new Shape NodeId; on failure set to OCCTL_NODE_ID_INVALID. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL, or length is non-positive for LENGTH/HEIGHT modes, or direction has zero length. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_NOT_FOUND | A node id refers to a removed / absent node. |
| OCCTL_WRONG_KIND | sketch_face is not a Face, or until_shape is required but missing / has wrong kind. |
| OCCTL_GEOMETRY_INVALID | Construction failed. |
| OCCTL_TOPOLOGY_INVALID | The resulting topology was rejected. |
| OCCTL_INTERNAL | An unexpected internal error occurred. |
\par Thread Safety No.
| occtl_status_t occtl_prim_make_ruled_surface | ( | occtl_graph_t * | graph, |
| const occtl_prim_ruled_surface_info_t * | info, | ||
| occtl_node_id_t * | out_shape | ||
| ) |
Builds a ruled Face or Shell between two Edge or Wire sections.
The result is inserted into graph as a new topology root. The input sections are not modified. Wire sections must be compatible for OCCT ruled-shell construction, including matching edge counts.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_shape | Borrows it. Must be non-NULL. On success receives the new Face or Shell NodeId; on failure set to OCCTL_NODE_ID_INVALID. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL, p_next is non-NULL, or the sections do not have the same kind. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_NOT_FOUND | A section refers to a removed / absent node. |
| OCCTL_WRONG_KIND | A section is neither an Edge nor a Wire. |
| OCCTL_GEOMETRY_INVALID | OCCT rejected the ruled surface. |
| OCCTL_TOPOLOGY_INVALID | The resulting topology was rejected. |
| OCCTL_INTERNAL | An unexpected internal error occurred. |
\par Thread Safety No.
| void occtl_prim_ruled_surface_info_init | ( | occtl_prim_ruled_surface_info_t * | info | ) |
Runtime initialiser for occtl_prim_ruled_surface_info_t.
Sets all fields to OCCTL_PRIM_RULED_SURFACE_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.