|
OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
|
OCCT-Light: sketch, curve, wire, and planar 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_polyline_info |
| struct | occtl_prim_regular_polygon_info |
| struct | occtl_prim_rectangle_info |
| struct | occtl_prim_circle_info |
| struct | occtl_prim_ellipse_info |
| struct | occtl_prim_planar_face_info |
| struct | occtl_prim_convex_hull_2d_info |
| struct | occtl_prim_trace_info |
| struct | occtl_prim_constrained_edge_info |
| struct | occtl_prim_arc_3pt_info |
| struct | occtl_prim_arc_center_info |
| struct | occtl_prim_spline_info |
| struct | occtl_prim_plane_info |
| struct | occtl_prim_disk_info |
| struct | occtl_prim_slot_info |
| struct | occtl_prim_tube_info |
| struct | occtl_prim_helix_info |
| struct | occtl_prim_fillet_2d_info |
| struct | occtl_prim_full_round_2d_info |
Macros | |
| #define | OCCTL_PRIM_POLYLINE_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_POLYLINE_INFO_INIT {OCCTL_PRIM_POLYLINE_INFO_VERSION_1, NULL, NULL, 0, 0} |
| #define | OCCTL_PRIM_REGULAR_POLYGON_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_REGULAR_POLYGON_INFO_INIT |
| #define | OCCTL_PRIM_RECTANGLE_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_RECTANGLE_INFO_INIT |
| #define | OCCTL_PRIM_CIRCLE_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_CIRCLE_INFO_INIT {OCCTL_PRIM_CIRCLE_INFO_VERSION_1, NULL, {{0.0, 0.0, 0.0}, {0.0, 0.0, 1.0}, {1.0, 0.0, 0.0}}, 0.0} |
| #define | OCCTL_PRIM_ELLIPSE_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_ELLIPSE_INFO_INIT |
| #define | OCCTL_PRIM_PLANAR_FACE_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_PLANAR_FACE_INFO_INIT {OCCTL_PRIM_PLANAR_FACE_INFO_VERSION_1, NULL, OCCTL_NODE_ID_INVALID, NULL, 0} |
| #define | OCCTL_PRIM_CONVEX_HULL_2D_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_CONVEX_HULL_2D_INFO_INIT |
| #define | OCCTL_PRIM_TRACE_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_TRACE_INFO_INIT |
| #define | OCCTL_PRIM_CONSTRAINED_EDGE_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_CONSTRAINED_EDGE_INFO_INIT |
| #define | OCCTL_PRIM_ARC_3PT_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_ARC_3PT_INFO_INIT {OCCTL_PRIM_ARC_3PT_INFO_VERSION_1, NULL, {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}} |
| #define | OCCTL_PRIM_ARC_CENTER_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_ARC_CENTER_INFO_INIT |
| #define | OCCTL_PRIM_SPLINE_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_SPLINE_INFO_INIT {OCCTL_PRIM_SPLINE_INFO_VERSION_1, NULL, NULL, 0, 3, 8, 1.0e-3} |
| #define | OCCTL_PRIM_PLANE_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_PLANE_INFO_INIT |
| #define | OCCTL_PRIM_DISK_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_DISK_INFO_INIT {OCCTL_PRIM_DISK_INFO_VERSION_1, NULL, {{0.0, 0.0, 0.0}, {0.0, 0.0, 1.0}, {1.0, 0.0, 0.0}}, 0.0} |
| #define | OCCTL_PRIM_SLOT_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_SLOT_INFO_INIT |
| #define | OCCTL_PRIM_TUBE_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_TUBE_INFO_INIT |
| #define | OCCTL_PRIM_HELIX_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_HELIX_INFO_INIT |
| #define | OCCTL_PRIM_FILLET_2D_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_FILLET_2D_INFO_INIT {OCCTL_PRIM_FILLET_2D_INFO_VERSION_1, NULL, OCCTL_NODE_ID_INVALID, NULL, 0, 0.0} |
| #define | OCCTL_PRIM_FULL_ROUND_2D_INFO_VERSION_1 1u |
| #define | OCCTL_PRIM_FULL_ROUND_2D_INFO_INIT |
OCCT-Light: sketch, curve, wire, and planar construction API.
| #define OCCTL_PRIM_ARC_3PT_INFO_VERSION_1 1u |
Trihedron mode for occtl_prim_make_pipe_shell.
Selects the rotation rule applied to the profile as it is swept along the spine.
| #define OCCTL_PRIM_ARC_CENTER_INFO_INIT |
| #define OCCTL_PRIM_CONSTRAINED_EDGE_INFO_INIT |
| #define OCCTL_PRIM_CONVEX_HULL_2D_INFO_INIT |
| #define OCCTL_PRIM_ELLIPSE_INFO_INIT |
| #define OCCTL_PRIM_FULL_ROUND_2D_INFO_INIT |
| #define OCCTL_PRIM_HELIX_INFO_INIT |
| #define OCCTL_PRIM_PLANE_INFO_INIT |
| #define OCCTL_PRIM_RECTANGLE_INFO_INIT |
| #define OCCTL_PRIM_REGULAR_POLYGON_INFO_INIT |
| #define OCCTL_PRIM_SLOT_INFO_INIT |
| #define OCCTL_PRIM_TRACE_INFO_INIT |
| #define OCCTL_PRIM_TUBE_INFO_INIT |
| typedef struct occtl_prim_arc_3pt_info occtl_prim_arc_3pt_info_t |
Info for occtl_prim_make_arc_3pt.
Builds a single-edge wire on the arc of the unique circle passing through start, via, and end. via must lie strictly between the other two on the arc.
| typedef struct occtl_prim_arc_center_info occtl_prim_arc_center_info_t |
Info for occtl_prim_make_arc_center.
Builds a single-edge wire on a circular arc defined by its supporting circle (placement + radius) and the start_angle / end_angle sweep (radians). end_angle > start_angle; the sweep direction follows the placement's Z axis (right-hand rule).
| typedef struct occtl_prim_circle_info occtl_prim_circle_info_t |
Info for occtl_prim_make_circle.
Builds a one-edge closed wire for a full circle of radius radius lying in the XY plane of placement.
Info for occtl_prim_make_constrained_edge.
Projects a 2D curve handle (for example a tangent/blend solution from occtl_curves2d.h) onto a 3D sketch plane and builds one Edge from it. OCCT performs the 2D-to-3D conversion; OCCT-Light only validates the ABI inputs and inserts the resulting Edge into the graph. Unbounded curves such as 2D lines need an explicit finite parameter range.
| typedef struct occtl_prim_convex_hull_2d_info occtl_prim_convex_hull_2d_info_t |
Info for occtl_prim_make_convex_hull_2d.
Builds a closed convex hull from explicit points and/or existing graph Vertex nodes projected into placement. The result is either a Wire or a planar Face depending on make_face. OCCT constructs the resulting topology; the hull ordering is a deterministic 2D projected ordering in the requested sketch plane.
| typedef struct occtl_prim_disk_info occtl_prim_disk_info_t |
Info for occtl_prim_make_disk.
Builds a circular planar Face on the XY plane of placement, with the boundary being a single-edge circular wire of radius.
| typedef struct occtl_prim_ellipse_info occtl_prim_ellipse_info_t |
Info for occtl_prim_make_ellipse.
Builds a one-edge closed wire for a full ellipse of semi-axes major (along placement X) and minor (along placement Y), with the centre at placement.location.
| typedef struct occtl_prim_fillet_2d_info occtl_prim_fillet_2d_info_t |
Info for occtl_prim_make_fillet_2d.
Rounds corners of face to radius. If vertices is NULL or vertex_count is 0, every Vertex of face is filleted; otherwise only the listed Vertex nodes.
| typedef struct occtl_prim_full_round_2d_info occtl_prim_full_round_2d_info_t |
Info for occtl_prim_make_full_round_2d.
Replaces an end Edge of a planar Face with the largest same-radius pair of OCCT 2D fillets that can be applied at the Edge's two vertices. When radius is positive, that exact radius is used. When radius is 0, OCCT-Light searches for the largest radius up to half of the selected Edge length by repeatedly asking OCCT's 2D fillet builder to construct the result.
| typedef struct occtl_prim_helix_info occtl_prim_helix_info_t |
Info for occtl_prim_make_helix.
Builds a Wire on a helical edge of radius, pitch (height gained per full turn), and total height. The helix winds around the Z axis of placement, centred at placement.location. Right-handedness is the default (counter-clockwise rotation as the helix advances along +Z).
| typedef struct occtl_prim_planar_face_info occtl_prim_planar_face_info_t |
Info for occtl_prim_make_planar_face.
Builds a planar face from one closed outer_wire and zero or more inner_wires (holes). The face's supporting plane is inferred from outer_wire (OCCT auto-detects); inner wires must lie in the same plane.
| typedef struct occtl_prim_plane_info occtl_prim_plane_info_t |
Info for occtl_prim_make_plane.
Builds a planar Face on the XY plane of placement, bounded by a rectangle of width by height centred on placement.location. Equivalent to building a rectangle wire and feeding it to occtl_prim_make_planar_face, but built directly for slightly less topology churn.
| typedef struct occtl_prim_polyline_info occtl_prim_polyline_info_t |
Info for occtl_prim_make_polyline.
Builds an open or closed wire from a sequence of straight-line edges threaded between points (a polygon wire).
| typedef struct occtl_prim_rectangle_info occtl_prim_rectangle_info_t |
Info for occtl_prim_make_rectangle.
Builds a closed four-edge wire centred on placement.location, with width along the placement's X axis and height along its Y axis.
| typedef struct occtl_prim_regular_polygon_info occtl_prim_regular_polygon_info_t |
Info for occtl_prim_make_regular_polygon.
Builds a closed sides-sided wire inscribed in a circle of radius circumradius lying in the XY plane of placement. rotation offsets the first vertex from the placement's X axis (radians).
| typedef struct occtl_prim_slot_info occtl_prim_slot_info_t |
Info for occtl_prim_make_slot.
Builds a closed "stadium" (slot) wire: two straight edges along the X axis of placement connected by two semicircular arcs at the ends. The slot is centred on placement.location with overall length length along X and width width along Y. The two end caps each have radius width / 2; therefore length must be strictly greater than width (else there is no straight section).
| typedef struct occtl_prim_spline_info occtl_prim_spline_info_t |
Info for occtl_prim_make_spline.
Builds a one-edge Wire on a B-spline curve approximating the supplied points.
| typedef struct occtl_prim_trace_info occtl_prim_trace_info_t |
Info for occtl_prim_make_trace.
Builds a constant-width planar face around an Edge or open Wire path. OCCT constructs the offset contour; OCCT-Light only wraps the resulting closed contour as a planar Face and inserts it into the graph. For a single linear Edge, normal defines the sketch plane normal used to centre the rectangular trace around the edge.
| typedef struct occtl_prim_tube_info occtl_prim_tube_info_t |
Info for occtl_prim_make_tube.
Builds a Solid hollow cylinder with outer radius outer_radius and inner radius inner_radius, centred on placement.location and extruded along placement's Z axis by height. Internally a rectangular cross-section is revolved a full turn around the placement Z axis. Both annular caps are present in the resulting Solid.
| void occtl_prim_arc_3pt_info_init | ( | occtl_prim_arc_3pt_info_t * | info | ) |
Runtime initialiser for occtl_prim_arc_3pt_info_t.
Sets all fields to OCCTL_PRIM_ARC_3PT_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_arc_center_info_init | ( | occtl_prim_arc_center_info_t * | info | ) |
Runtime initialiser for occtl_prim_arc_center_info_t.
Sets all fields to OCCTL_PRIM_ARC_CENTER_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_circle_info_init | ( | occtl_prim_circle_info_t * | info | ) |
Runtime initialiser for occtl_prim_circle_info_t.
Sets all fields to OCCTL_PRIM_CIRCLE_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_constrained_edge_info_init | ( | occtl_prim_constrained_edge_info_t * | info | ) |
Runtime initialiser for occtl_prim_constrained_edge_info_t.
Sets all fields to OCCTL_PRIM_CONSTRAINED_EDGE_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_convex_hull_2d_info_init | ( | occtl_prim_convex_hull_2d_info_t * | info | ) |
Runtime initialiser for occtl_prim_convex_hull_2d_info_t.
Sets all fields to OCCTL_PRIM_CONVEX_HULL_2D_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_disk_info_init | ( | occtl_prim_disk_info_t * | info | ) |
Runtime initialiser for occtl_prim_disk_info_t.
Sets all fields to OCCTL_PRIM_DISK_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_ellipse_info_init | ( | occtl_prim_ellipse_info_t * | info | ) |
Runtime initialiser for occtl_prim_ellipse_info_t.
Sets all fields to OCCTL_PRIM_ELLIPSE_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_fillet_2d_info_init | ( | occtl_prim_fillet_2d_info_t * | info | ) |
Runtime initialiser for occtl_prim_fillet_2d_info_t.
Sets all fields to OCCTL_PRIM_FILLET_2D_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_full_round_2d_info_init | ( | occtl_prim_full_round_2d_info_t * | info | ) |
Runtime initialiser for occtl_prim_full_round_2d_info_t.
Sets all fields to OCCTL_PRIM_FULL_ROUND_2D_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_helix_info_init | ( | occtl_prim_helix_info_t * | info | ) |
Runtime initialiser for occtl_prim_helix_info_t.
Sets all fields to OCCTL_PRIM_HELIX_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| occtl_status_t occtl_prim_make_arc_3pt | ( | occtl_graph_t * | graph, |
| const occtl_prim_arc_3pt_info_t * | info, | ||
| occtl_node_id_t * | out_wire | ||
| ) |
Builds a single-edge wire for the circular arc through three points.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_wire | Borrows it. Must be non-NULL. On success receives the new Wire NodeId; on failure set to OCCTL_NODE_ID_INVALID. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_GEOMETRY_INVALID | The three points are collinear / coincident. |
| 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_arc_center | ( | occtl_graph_t * | graph, |
| const occtl_prim_arc_center_info_t * | info, | ||
| occtl_node_id_t * | out_wire | ||
| ) |
Builds a single-edge wire for a circular arc swept around a placement's Z axis.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_wire | Borrows it. Must be non-NULL. On success receives the new Wire NodeId; on failure set to OCCTL_NODE_ID_INVALID. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_GEOMETRY_INVALID | radius is non-positive or end_angle <= start_angle. |
| 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_circle | ( | occtl_graph_t * | graph, |
| const occtl_prim_circle_info_t * | info, | ||
| occtl_node_id_t * | out_wire | ||
| ) |
Builds a one-edge closed Wire on a full circle.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_wire | Borrows it. Must be non-NULL. On success receives the new Wire NodeId; on failure set to OCCTL_NODE_ID_INVALID. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_GEOMETRY_INVALID | radius is non-positive. |
| 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_constrained_edge | ( | occtl_graph_t * | graph, |
| const occtl_prim_constrained_edge_info_t * | info, | ||
| occtl_node_id_t * | out_edge | ||
| ) |
Builds one Edge from a 2D curve placed on a 3D sketch plane.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_edge | Borrows it. Must be non-NULL. On success receives the new Edge 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, the placement is degenerate, use_parameter_range is not 0/1, or the explicit range is non-finite / reversed. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_GEOMETRY_INVALID | OCCT could not build an Edge from the placed curve. |
| 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_convex_hull_2d | ( | occtl_graph_t * | graph, |
| const occtl_prim_convex_hull_2d_info_t * | info, | ||
| occtl_node_id_t * | out_node | ||
| ) |
Builds a convex-hull Wire or planar Face from points and/or Vertex nodes.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_node | Borrows it. Must be non-NULL. On success receives the new Wire or Face 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, both input arrays are empty, an array pointer is NULL while its count is non-zero, tolerance is non-positive/non-finite, or make_face is not 0/1. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_NOT_FOUND | A Vertex node is removed / absent. |
| OCCTL_WRONG_KIND | A node in vertices is not a Vertex. |
| OCCTL_GEOMETRY_INVALID | Fewer than three non-collinear projected points remain, or OCCT cannot build the requested topology. |
| 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_disk | ( | occtl_graph_t * | graph, |
| const occtl_prim_disk_info_t * | info, | ||
| occtl_node_id_t * | out_face | ||
| ) |
Builds a circular planar Face (disk).
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_face | Borrows it. Must be non-NULL. On success receives the new Face NodeId; on failure set to OCCTL_NODE_ID_INVALID. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_GEOMETRY_INVALID | radius is non-positive. |
| 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_ellipse | ( | occtl_graph_t * | graph, |
| const occtl_prim_ellipse_info_t * | info, | ||
| occtl_node_id_t * | out_wire | ||
| ) |
Builds a one-edge closed Wire on a full ellipse.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_wire | Borrows it. Must be non-NULL. On success receives the new Wire NodeId; on failure set to OCCTL_NODE_ID_INVALID. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_GEOMETRY_INVALID | major < minor or either non-positive. |
| 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_fillet_2d | ( | occtl_graph_t * | graph, |
| const occtl_prim_fillet_2d_info_t * | info, | ||
| occtl_node_id_t * | out_face | ||
| ) |
Fillets the corners of a planar Face with a single uniform radius.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_face | Borrows it. Must be non-NULL. On success receives the new Face NodeId; on failure set to OCCTL_NODE_ID_INVALID. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL, or vertices is NULL while vertex_count is greater than 0. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_NOT_FOUND | face refers to a removed / absent node, or a vertex does. |
| OCCTL_WRONG_KIND | face is not of kind OCCTL_KIND_FACE, or a listed node is not a Vertex. |
| OCCTL_GEOMETRY_INVALID | radius is non-positive, or construction failed (e.g. radius too large for corner). |
| 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_full_round_2d | ( | occtl_graph_t * | graph, |
| const occtl_prim_full_round_2d_info_t * | info, | ||
| occtl_node_id_t * | out_face | ||
| ) |
Builds a planar Face with a selected Edge replaced by a full-round arc.
The topology construction delegates to OCCT BRepFilletAPI_MakeFillet2d. The result is inserted into graph as a new bare Face root; the input Face is left unchanged.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_face | Borrows it. Must be non-NULL. On success receives the new Face 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, radius is negative/non-finite, or search_steps is too large. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_NOT_FOUND | face or edge refers to a removed / absent node. |
| OCCTL_WRONG_KIND | face is not a Face, or edge is not an Edge. |
| OCCTL_GEOMETRY_INVALID | OCCT cannot construct the full round. |
| 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_helix | ( | occtl_graph_t * | graph, |
| const occtl_prim_helix_info_t * | info, | ||
| occtl_node_id_t * | out_wire | ||
| ) |
Builds a helical Wire (one edge).
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_wire | Borrows it. Must be non-NULL. On success receives the new Wire NodeId; on failure set to OCCTL_NODE_ID_INVALID. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_GEOMETRY_INVALID | Any of radius / pitch / height is non-positive. |
| 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_planar_face | ( | occtl_graph_t * | graph, |
| const occtl_prim_planar_face_info_t * | info, | ||
| occtl_node_id_t * | out_face | ||
| ) |
Builds a planar Face from a closed planar wire and optional hole wires.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_face | Borrows it. Must be non-NULL. On success receives the new Face NodeId; on failure set to OCCTL_NODE_ID_INVALID. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL, or inner_wires is NULL while inner_wire_count > 0. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_NOT_FOUND | A wire NodeId refers to a removed / absent node. |
| OCCTL_WRONG_KIND | A wire NodeId is not of kind OCCTL_KIND_WIRE. |
| OCCTL_GEOMETRY_INVALID | The wire is not planar / not closed / inconsistent with the inferred plane. |
| 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_plane | ( | occtl_graph_t * | graph, |
| const occtl_prim_plane_info_t * | info, | ||
| occtl_node_id_t * | out_face | ||
| ) |
Builds a rectangular planar Face.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_face | Borrows it. Must be non-NULL. On success receives the new Face NodeId; on failure set to OCCTL_NODE_ID_INVALID. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_GEOMETRY_INVALID | width or height is non-positive. |
| 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_polyline | ( | occtl_graph_t * | graph, |
| const occtl_prim_polyline_info_t * | info, | ||
| occtl_node_id_t * | out_wire | ||
| ) |
Builds a Wire from a sequence of straight-line edges.
Convenience entry point for sketch construction; avoids the verbose make_vertex / make_edge / make_wire trio when the segments are purely linear.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_wire | Borrows it. Must be non-NULL. On success receives the new Wire NodeId; on failure set to OCCTL_NODE_ID_INVALID. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL or point_count < 2. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_GEOMETRY_INVALID | Two consecutive points coincide. |
| 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_rectangle | ( | occtl_graph_t * | graph, |
| const occtl_prim_rectangle_info_t * | info, | ||
| occtl_node_id_t * | out_wire | ||
| ) |
Builds a closed Wire for an axis-aligned rectangle.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_wire | Borrows it. Must be non-NULL. On success receives the new Wire NodeId; on failure set to OCCTL_NODE_ID_INVALID. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_GEOMETRY_INVALID | width or height is non-positive. |
| 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_regular_polygon | ( | occtl_graph_t * | graph, |
| const occtl_prim_regular_polygon_info_t * | info, | ||
| occtl_node_id_t * | out_wire | ||
| ) |
Builds a closed Wire for a regular n-gon.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_wire | Borrows it. Must be non-NULL. On success receives the new Wire NodeId; on failure set to OCCTL_NODE_ID_INVALID. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL or sides < 3 or circumradius <= 0. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| 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_slot | ( | occtl_graph_t * | graph, |
| const occtl_prim_slot_info_t * | info, | ||
| occtl_node_id_t * | out_wire | ||
| ) |
Builds a closed slot (stadium) Wire.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_wire | Borrows it. Must be non-NULL. On success receives the new Wire NodeId; on failure set to OCCTL_NODE_ID_INVALID. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_GEOMETRY_INVALID | width is non-positive or length <= width. |
| 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_spline | ( | occtl_graph_t * | graph, |
| const occtl_prim_spline_info_t * | info, | ||
| occtl_node_id_t * | out_wire | ||
| ) |
Builds a B-spline Wire approximating a sequence of points.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_wire | Borrows it. Must be non-NULL. On success receives the new Wire NodeId; on failure set to OCCTL_NODE_ID_INVALID. |
| OCCTL_OK | On success. |
| OCCTL_INVALID_ARGUMENT | Any pointer is NULL, point_count < 2, or the degree range is invalid (degree_min < 1 or degree_max < degree_min). |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_GEOMETRY_INVALID | Construction failed (coincident / collinear points beyond tolerance, etc.). |
| 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_trace | ( | occtl_graph_t * | graph, |
| const occtl_prim_trace_info_t * | info, | ||
| occtl_node_id_t * | out_face | ||
| ) |
Builds a constant-width planar Face around an Edge or open Wire path.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_face | Borrows it. Must be non-NULL. On success receives the new Face 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, width is non-positive / non-finite, or normal / join / approximate is invalid. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_NOT_FOUND | path refers to a removed / absent node. |
| OCCTL_WRONG_KIND | path is neither Edge nor Wire. |
| OCCTL_GEOMETRY_INVALID | OCCT could not construct a closed planar offset contour or planar face. |
| 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_tube | ( | occtl_graph_t * | graph, |
| const occtl_prim_tube_info_t * | info, | ||
| occtl_node_id_t * | out_solid | ||
| ) |
Builds a hollow-cylinder (tube) Solid.
| [in,out] | graph | Borrows it. Must be non-NULL. |
| [in] | info | Borrows it. Must be non-NULL with a recognised struct_version. |
| [out] | out_solid | 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. |
| OCCTL_VERSION_MISMATCH | struct_version is unrecognised. |
| OCCTL_GEOMETRY_INVALID | inner_radius / outer_radius / height are degenerate (non-positive, or outer_radius <= inner_radius). |
| OCCTL_TOPOLOGY_INVALID | The resulting topology was rejected. |
| OCCTL_INTERNAL | An unexpected internal error occurred. |
\par Thread Safety No.
| void occtl_prim_planar_face_info_init | ( | occtl_prim_planar_face_info_t * | info | ) |
Runtime initialiser for occtl_prim_planar_face_info_t.
Sets all fields to OCCTL_PRIM_PLANAR_FACE_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_plane_info_init | ( | occtl_prim_plane_info_t * | info | ) |
Runtime initialiser for occtl_prim_plane_info_t.
Sets all fields to OCCTL_PRIM_PLANE_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_polyline_info_init | ( | occtl_prim_polyline_info_t * | info | ) |
Runtime initialiser for occtl_prim_polyline_info_t.
Sets all fields to OCCTL_PRIM_POLYLINE_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_rectangle_info_init | ( | occtl_prim_rectangle_info_t * | info | ) |
Runtime initialiser for occtl_prim_rectangle_info_t.
Sets all fields to OCCTL_PRIM_RECTANGLE_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_regular_polygon_info_init | ( | occtl_prim_regular_polygon_info_t * | info | ) |
Runtime initialiser for occtl_prim_regular_polygon_info_t.
Sets all fields to OCCTL_PRIM_REGULAR_POLYGON_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_slot_info_init | ( | occtl_prim_slot_info_t * | info | ) |
Runtime initialiser for occtl_prim_slot_info_t.
Sets all fields to OCCTL_PRIM_SLOT_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_spline_info_init | ( | occtl_prim_spline_info_t * | info | ) |
Runtime initialiser for occtl_prim_spline_info_t.
Sets all fields to OCCTL_PRIM_SPLINE_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_trace_info_init | ( | occtl_prim_trace_info_t * | info | ) |
Runtime initialiser for occtl_prim_trace_info_t.
Sets all fields to OCCTL_PRIM_TRACE_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.
| void occtl_prim_tube_info_init | ( | occtl_prim_tube_info_t * | info | ) |
Runtime initialiser for occtl_prim_tube_info_t.
Sets all fields to OCCTL_PRIM_TUBE_INFO_INIT.
| [out] | info | Borrows it. NULL-tolerant; no-op when NULL. |
\par Thread Safety Yes.